/spectra:spectra-difffrom spectra
Detects specification drift between .spec.md files and source code using AST analysis. Useful after code changes to keep specs current or before refactoring.
Ships in spectra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Detect specification drift between a .spec.md and its corresponding source code. Useful after code changes to keep specs current, or before refactoring to understand what's changed.
Expected format: <spec-file> [source-target]
<spec-file>: Path to existing .spec.md (required)[source-target]: Path to source code (optional — inferred from spec's related_files frontmatter)If spec file doesn't exist, suggest running /spectra first.
Execute the drift detection using the globally installed spectra CLI:
spectra diff <spec-file> <source-target>
如果需要自定义输出目录:
spectra diff <spec-file> <source-target> --output-dir drift-logs/
流水线自动执行以下步骤:
CodeSkeletoncompareSkeletons)DriftReport 并写入 drift-logs/如果 CLI 流水线不可用(依赖未安装、编译错误等),手动执行:
报告自动写入 drift-logs/{module}-drift-{date}.md,包含:
在任何 spec 更新前必须提示用户确认。
Ask: "是否需要更新 spec 以匹配当前代码?这将运行 /spectra 并使用现有 spec 作为基线。"
Do NOT auto-update. Wait for user confirmation.
所有漂移报告的正文内容必须使用中文撰写。 具体规则:
| 项目 | 类型 | 位置 | 描述 |What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub connor-git-yaml/cc-plugin-market --plugin spectra3 skills in this plugin
/spectraUse this skill when the user asks to:
- Generate a spec/specification from existing code
- Document or analyze a module's architecture
- Reverse engineer what a piece of code does
- Create .spec.md documentation for a file, directory, or module
- Understand the intent, interfaces, and business logic of existing code
Supports single files (e.g., src/auth/login.ts), directories (e.g., src/auth/), or entire modules.
/spectra-batchUse this skill when the user asks to:
- Generate specs for an entire project or codebase
- Document all modules systematically
- Create a complete specification index for the project
- Batch process multiple modules for spec generation
This skill generates an architecture overview index, then iterates through modules producing individual .spec.md files.
Other plugins' skills for the same job