Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

phantom-limb幻肢

Agent Skill

phantom-limb 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,856

周安装

334

GitHub Stars

公开资料未说明

下载量

2,752
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:phantom-limb(幻肢)
来源仓库:https://github.com/jcools1977/phantom-limb
安装命令:
openclaw skills install phantom-limb
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install phantom-limb

简介

检测代码库中的幻影依赖与孤立引用问题。

  • 识别模块间隙间的无效状态与断裂连接关系。
  • 帮助维护项目结构完整性与依赖清晰度。phantom-limb 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 安装命令:openclaw skills install phantom-limb,适用于 OpenClaw。
  • 需配合具体项目结构分析才能定位真实风险点。

SKILL.md

name
phantom-limb
version
1.0.0
description
>
author
J. DeVere Cooley
category
cognitive-diagnostics
tags
metadata
openclaw
emoji
🦾
os
["darwin", "linux", "win32"]
cost
free
requires_api
false
tags

Phantom Limb

"The most dangerous dependency is the one that used to exist."

What It Does

Phantom Limb detects ghost references — code that reaches for things that aren't there anymore. Not broken imports (your linter catches those). The subtle kind: environment variables nobody sets, config keys that were renamed three sprints ago, API endpoints that were deprecated but never removed from the client, file paths that point to directories that exist only on the original developer's machine.

Every codebase accumulates phantoms. They don't cause errors — they cause *mystery*. They're the reason a feature "works everywhere except production." They're the reason onboarding takes two weeks instead of two days.

Why This Exists

Static analysis catches what's wrong. Linters catch what's ugly. Phantom Limb catches what's missing — the negative space between your code and reality.

Traditional Tools FindPhantom Limb Finds
Broken importsImports that resolve but reference dead code paths
Syntax errorsSemantically valid references to deleted concepts
Unused variablesUsed variables that reference phantom state
Missing filesFiles that exist but contain assumptions from a previous architecture
Type mismatchesTypes that match but describe something that no longer exists

The Six Classes of Phantoms

1. Environmental Phantoms

References to environment variables, config files, or system state that no process ever sets.

// This worked when we ran Redis locally
const cache = process.env.REDIS_URL || 'redis://localhost:6379';
// Redis was replaced with Memcached 8 months ago.
// Nobody removed this. The fallback silently runs. Against nothing.

Detection method: Cross-reference every process.env, os.environ, ENV[] read against actual .env, .env.example, CI/CD configs, and deployment manifests.

2. Referential Phantoms

Code that references functions, classes, or modules that were moved, renamed, or deleted — but the reference still "works" because a shim, re-export, or fallback catches it.

# utils.py re-exports calculate_tax for "backwards compatibility"
# Nobody imports calculate_tax from the original location anymore
# But nobody removed the re-export either
# And the original calculate_tax was rewritten. The re-export points to the old version.
from legacy.tax import calculate_tax  # pragma: no cover

Detection method: Trace every import chain to its terminal definition. Flag chains longer than 2 hops. Flag anything with "legacy", "compat", "old", or "deprecated" in the path that has no deprecation deadline.

3. Temporal Phantoms

Code that depends on timing, ordering, or sequencing that was true under a previous architecture but is no longer guaranteed.

// This worked when auth was synchronous middleware
// After the async rewrite, user might not be populated yet
app.get('/dashboard', (req, res) => {
  const name = req.user.displayName; // Sometimes undefined. Sometimes not.
});

Detection method: Map all implicit ordering assumptions. Flag any data access that assumes a prior middleware/hook/lifecycle event has already completed without explicit await/guard.

4. Contractual Phantoms

API contracts, database schemas, or wire formats that the code expects but the other side no longer honors.

# The payments API v2 removed the 'discount_code' field
# Our code still sends it. The API silently ignores it.
# Nobody knows the discount feature has been broken for 3 months.
payload = {
    "amount": total,
    "discount_code": user.discount,  # Phantom. Silently ignored.
}

Detection method: Compare every outbound payload construction against the latest API schema/docs. Compare every database query against the current schema. Flag fields that are constructed but never consumed.

5. Intentional Phantoms

Comments, TODOs, and documentation that describe behavior the code no longer exhibits. The specification has become a ghost story.

/**
 * Retries up to 3 times with exponential backoff.
 * Falls back to cache on failure.
 */
// Retry logic was removed in PR #847. Cache fallback was never implemented.
public Response fetchData() {
    return client.get(url); // One shot. No retry. No fallback.
}

Detection method: Parse doc comments and compare claimed behavior against actual implementation. Flag docstrings that mention patterns (retry, cache, fallback, queue, batch) that don't appear in the method body.

6. Identity Phantoms

Variables, functions, or modules whose names describe something they no longer do. The name is a phantom of their original purpose.

// This was a temporary cache. Three years ago.
func getTempCache() *PermanentStore {
    return &PermanentStore{ttl: 0} // TTL of zero = lives forever
}

Detection method: Semantic analysis of identifier names vs. their actual behavior. Flag contradictions between name semantics and implementation semantics (e.g., temp + no expiry, async + synchronous execution, safe + no error handling).

How It Works

Phase 1: EXCAVATION
├── Scan all source files for external references
├── Build a reference graph (what reaches for what)
├── Map all environment reads, config lookups, API calls
└── Catalog all import chains and their terminal definitions

Phase 2: REALITY CHECK
├── Cross-reference against actual environment state
├── Compare API contracts against current schemas
├── Trace import chains to detect phantom re-exports
└── Compare documentation claims against implementation

Phase 3: PHANTOM CLASSIFICATION
├── Classify each phantom by type (1-6 above)
├── Score severity (silent failure vs. loud failure vs. latent)
├── Estimate blast radius (how many codepaths are affected)
└── Calculate haunting duration (how long has this been phantom)

Phase 4: EXORCISM REPORT
├── Prioritized list of phantoms by severity × blast radius
├── For each phantom: what it references, what's actually there, and what to do
├── Quick-fix suggestions for each class
└── Dependency reality map (what your code thinks exists vs. what does)

Severity Scoring

SeverityDescriptionExample
CriticalPhantom causes silent data loss or corruptionAPI field silently ignored, data never saved
HighPhantom causes intermittent failuresTemporal phantom, race condition with ghost state
MediumPhantom causes confusion but no runtime errorsIdentity phantom, misleading names
LowPhantom is inert but adds cognitive loadDead re-exports, orphaned configs
VestigialPhantom is harmless but indicates architectural rotTODO comments from 2+ years ago

Output Format

╔══════════════════════════════════════════════════════════════╗
║                    PHANTOM LIMB SCAN                        ║
║                    12 phantoms detected                     ║
╠══════════════════════════════════════════════════════════════╣
║                                                              ║
║  CRITICAL (2)                                                ║
║  ├── [Contractual] POST /api/payments sends 'discount_code'  ║
║  │   → Field removed in API v2 (2024-11-03)                 ║
║  │   → 3 months of silent discount failures                  ║
║  │   → Fix: Remove field from payload builder                ║
║  │                                                           ║
║  ├── [Environmental] REDIS_URL referenced in 4 files         ║
║  │   → No process sets this variable                         ║
║  │   → Fallback to localhost:6379 connects to nothing        ║
║  │   → Fix: Remove Redis references, use Memcached client    ║
║  │                                                           ║
║  HIGH (3)                                                    ║
║  ├── [Temporal] req.user accessed before auth middleware      ║
║  │   ...                                                     ║
╚══════════════════════════════════════════════════════════════╝

Integration

Invoke when:

  • Onboarding a new developer (show them where the ghosts live)
  • After a major refactor (find what the refactor left behind)
  • Before a production deploy (catch phantoms before users do)
  • During architecture review (map the gap between intent and reality)

Why It Matters

Every codebase has a phantom architecture — the system it *thinks* it is, layered on top of the system it *actually* is. The gap between these two architectures is where bugs hide, onboarding stalls, and technical debt compounds silently.

Phantom Limb doesn't find bugs. It finds the *conditions* that make bugs inevitable.

Zero external dependencies. Zero API calls. Pure structural analysis.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

93.45%
按下载量换算2,572

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills