Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

spec-coverage-map规格覆盖图

Agent Skill

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

总安装

384

周安装

16

GitHub Stars

1

下载量

128
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:spec-coverage-map(规格覆盖图)
来源仓库:https://github.com/jschulte/claude-plugins
仓库路径:skills/spec-coverage-map
安装命令:
npx skills add https://github.com/jschulte/claude-plugins --skill spec-coverage-map
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/jschulte/claude-plugins --skill spec-coverage-map

简介

spec-coverage-map 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据任务场景快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 使用前需确认权限范围、维护状态及是否触发联网或文件操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Spec-to-Code Coverage Map

Generate a coverage map showing the relationship between specs and implementation files.

Output: docs/spec-coverage-map.md (overwrite if it already exists -- the file is regenerated from scratch each run)

Dependencies: This skill expects specs produced by /stackshift.create-specs or /speckit.analyze with file references in sections named "Files", "File Structure", "Implementation Status", "Components Implemented", or "Technical Details". If those sections are absent, fall back to regex extraction of backtick-wrapped paths.

Cross-skill references: /stackshift.create-specs, /speckit.clarify, /speckit.analyze


Process

Step 1: Discover All Specs

Check BOTH directories unconditionally and merge results. Do NOT use || fallback.

# Collect from both locations
SPECS_SPECIFY=$(find ".specify/memory/specifications" -name "*.md" -type f 2>/dev/null)
SPECS_DIR=$(find "specs" -name "*.md" -type f 2>/dev/null)

# Merge results and deduplicate
ALL_SPECS=$(echo "$SPECS_SPECIFY"$'\n'"$SPECS_DIR" | sort -u | sed '/^$/d')
SPEC_COUNT=$(echo "$ALL_SPECS" | wc -l)
echo "Found $SPEC_COUNT specs"

If zero specs found after checking all locations, emit the error from the Error Handling section and stop.

Step 2: Extract File References from Each Spec

For each spec, extract file paths using these patterns:

  • Backtick-wrapped paths: ` path/to/file.ext `
  • Bold paths: File: path/to/file.ext
  • Paths in "Files", "Implementation Status", "Components Implemented", or "Technical Details" sections
  • File extensions:.ts,.tsx,.js,.jsx,.py,.go,.tf,.yml, etc.

For full extraction pattern details, see operations/implementation-details.md.

Per-spec guard: If a spec contains no extractable file paths, include it in the coverage map with an empty file list and a warning marker ([NO FILE REFERENCES]). Note it in the Gap Analysis section as "Spec with no file references."

CHECKPOINT: Validate Step 2 Output

After extracting file references from all specs:

  1. For each extracted path, verify it exists in the codebase using Glob or Bash. Mark non-existent files with an X indicator.
  2. Count total specs processed vs. total specs discovered. They MUST match.
  3. If more than 50% of specs have zero file references, emit the "specs have no file references" error and stop.

Proceed to Step 3 only after validation passes.

Step 3: Categorize Files

Group extracted files by type:

  • Backend: api/, src/handlers/, src/services/, lib/
  • Frontend: site/, pages/, components/, app/
  • Infrastructure: infrastructure/, terraform/,.github/workflows/
  • Database: prisma/, migrations/, schema/
  • Scripts: scripts/, bin/
  • Config: package.json, tsconfig.json, etc.
  • Tests: *.test.ts, *.spec.ts, tests/

Step 4: Generate ASCII Box Diagrams

For each spec, create a box diagram:

┌─────────────────────────────────┐
│  001-feature-name               │ Status: COMPLETE
├─────────────────────────────────┤
│ Backend:                        │
│  ├─ api/src/handlers/foo.js     │
│  └─ api/src/services/bar.js     │
│ Frontend:                       │
│  └─ site/src/pages/Foo.tsx      │
│ Infrastructure:                 │
│  └─ .github/workflows/deploy.yml│
└─────────────────────────────────┘

Use unicode box-drawing characters: ┌ ─ ┐ │ ├ ─ ┤ └ ─ ┘

NEVER reproduce example data from reference files. Derive all file names and structure from the actual codebase.

Step 5: Create Reverse Index

Build a table showing which spec(s) cover each file:

| File | Covered By | Count | Risk |
|------|------------|-------|------|
| path/to/file.ts | 001-name, 003-name | 2 | MEDIUM |

Risk levels:

  • 1 spec = LOW (single spec, normal coverage)
  • 2-3 specs = MEDIUM (shared across features)
  • 4+ specs = HIGH (critical shared utility)

CHECKPOINT: Validate Step 5 Output

  1. Total unique files in the reverse index MUST equal total unique files across all spec boxes from Step 4.
  2. Every file in the reverse index MUST appear in at least one spec box, and vice versa.
  3. If counts do not match, re-examine Steps 2-4 for dropped or duplicated entries before proceeding.

Step 6: Calculate Coverage Statistics

Build a table with coverage per category and an overall total:

| Category | Total Files | Covered | Coverage % |
|----------|-------------|---------|------------|
| Backend | [N] | [N] | [N]% |
| ...      | ...         | ...     | ...        |
| **TOTAL** | **[N]** | **[N]** | **[N]%** |

Generate a heat map bar per category (20 blocks, filled proportional to percentage):

Category      [████████████████░░░░] 80%

See operations/implementation-details.md for calculation formulas.

Step 7: Identify Gaps

List all code files NOT covered by any spec, grouped by category.

For each gap file, annotate with a likely reason (deprecated, dev-only, utility, WIP).

Generate actionable recommendations:

  • Remove deprecated files
  • Create specs for utilities containing business logic
  • Document dev-only tools in a utilities spec

Step 8: Highlight Shared Files

List files referenced by 3+ specs in a table with risk levels.

For high-risk files (4+ specs):

  • Flag that changes affect multiple features
  • Flag that comprehensive testing is required
  • Recommend splitting if too coupled

Steps 5-8 are independent and may be generated in any order. All depend on the file-to-spec mapping established in Steps 1-4.


Output Assembly

Assemble all sections into docs/spec-coverage-map.md following the template in operations/implementation-details.md.

For a complete example of the expected output structure, see operations/example-output.md. Use it as a structural guide only -- derive all data from the actual codebase.


Success Criteria

Verify the following are present in the generated output:

  • docs/spec-coverage-map.md file created
  • ASCII box diagram for every discovered spec
  • Reverse index table (files to specs) with risk levels
  • Coverage statistics by category with heat map
  • Gap analysis with actionable recommendations
  • Shared files risk assessment
  • Overall coverage percentage calculated

Error Handling

If no specs found:

No specs found in .specify/memory/specifications/ or specs/.
Cannot generate coverage map without specs.
Run /stackshift.create-specs to generate specs first.

If a spec has no file references (per-spec): Include the spec in the map with an empty file list and [NO FILE REFERENCES] marker. Note it in Gap Analysis.

If ALL specs have no file references:

Specs do not contain file references.
Cannot generate coverage map.

Likely causes:
1. Specs were created but implementation has not started
2. Specs need "Files" or "Implementation Status" sections
3. Using old spec format -- update specs

If coverage is very low (< 50%):

Coverage is only [N]%.

This indicates:
- Many files not documented in specs
- Specs may be incomplete

Run /speckit.analyze to validate alignment.

If file path validation fails (Step 2 checkpoint): Mark non-existent files with X in the coverage map. Include a "Stale References" subsection listing paths that appear in specs but do not exist in the codebase.


Integration Points

After Gear 6 (Implement) completion or during cleanup/documentation phases, generate the coverage map and report the summary (total coverage, gap count, high-risk shared files).

Parse specs in sorted order (001, 002, etc.) for consistent output. Use relative paths from project root. Include a timestamp in the output header.

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

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

平台分布

Claude Code

30.96%
按下载量换算40

OpenCode

24.66%
按下载量换算32

Codex

19.25%
按下载量换算25

github-copilot

13.38%
按下载量换算17

Antigravity

7.23%
按下载量换算9

Gemini CLI

3.33%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills