codemap

GitHub

为智能体生成代码地图,作为渐进式代码地形索引。支持项目概览、功能追踪及漂移检查,旨在降低上下文负载,引导智能体快速定位源码证据并理解代码结构。

skills/codemap/SKILL.md huisezhiyin/sdd-riper

Trigger Scenarios

需要快速熟悉陌生代码库时 映射特定功能或能力的实现路径 检查现有代码地图是否因代码变更而过时 准备无需加载全仓库的研究任务

Install

npx skills add huisezhiyin/sdd-riper --skill codemap -g -y
More Options

Use without installing

npx skills use huisezhiyin/sdd-riper@codemap

指定 Agent (Claude Code)

npx skills add huisezhiyin/sdd-riper --skill codemap -a claude-code -g -y

安装 repo 全部 skill

npx skills add huisezhiyin/sdd-riper --all -g -y

预览 repo 内 skill

npx skills add huisezhiyin/sdd-riper --list

SKILL.md

Frontmatter
{
    "name": "codemap",
    "description": "Generate, update, or drift-check agent-facing CodeMaps as progressive code terrain indexes for projects, features, capabilities, functions, modules, or bug chains. Use when Codex needs to inspect an unfamiliar codebase, map a feature\/capability from entry to effect, create or update `mydocs\/codemap\/*`, answer `create_codemap`, `MAP`, `PROJECT MAP`, code terrain, impact-map, \"where should the agent look first\", check whether existing CodeMaps are stale after a diff, or prepare SDD-RIPER Research without loading the whole repository into context."
}

Codemap

Core Position

Create CodeMaps for agents, not CodeWiki for humans.

CodeMap saves context attention, not necessarily raw token count. It does not replace source code, tests, logs, or the current Spec. It routes the agent toward the right source-linked evidence, in the right order, with progressive disclosure.

Use a CodeMap as:

  • Project CodeMap: breadth-first project terrain, capability index, module boundaries, dependency index, and drill-down pointers.
  • Feature CodeMap: depth-first capability terrain from entry to effect, including branches, dependencies, risks, and validation entry points.

Workflow

  1. Restate the requested scope and choose mode:
    • feature: capability, business feature, bug chain, API flow, function/class-centered investigation.
    • project: repository, service, package, subsystem, or first-time onboarding map.
    • drift-check: compare current diff or touched files with existing CodeMaps.
    • update-existing: refresh an existing CodeMap after code terrain changes.
  2. Before writing a durable CodeMap, tell the user why a map/update is useful, the selected mode, scope, and expected path. Do not silently write persistent maps unless current task approval already covers it.
  3. Read references/principles.md when the output shape, boundary, or CodeWiki-vs-CodeMap distinction matters.
  4. For drift checks, read references/drift-check.md.
  5. For updating an existing map, read references/update-existing.md.
  6. Inspect code with search first (rg, rg --files, language-aware tools if available). Prefer source facts over inferred naming matches.
  7. Build progressive Context Tree Nodes:
    • start with a small orientation node;
    • add capability, module, entry, branch, effect, dependency, risk, and validation nodes only where they route future context;
    • keep compact indexes as lookup tables, not as the main structure;
    • point nodes to files, functions, classes, tests, configs, logs, and related maps;
    • mark each important relationship as confirmed, inferred, or unknown.
  8. Write the map under mydocs/codemap/ when the user requests a durable artifact or the work feeds SDD-RIPER Research:
    • feature: mydocs/codemap/YYYY-MM-DD_hh-mm_<feature>功能.md
    • project: mydocs/codemap/YYYY-MM-DD_hh-mm_<project>项目总图.md
  9. Keep the CodeMap narrow enough to guide the next agent action. Do not paste large source blocks or turn it into a narrative system document.

Templates

  • For feature/capability maps, follow references/feature-template.md.
  • For project/system maps, follow references/project-template.md.
  • For drift checks, follow references/drift-check.md.
  • For existing map updates, follow references/update-existing.md.
  • If a task spans multiple repositories, create one Project CodeMap per relevant project, then add a separate interface or cross-service flow summary.

Output Rules

  • Prefer path-linked, source-grounded bullets over prose.
  • Separate Confirmed, Inferred, and Unknown.
  • Include Next Drill-Down so the next agent knows what to read only if needed.
  • Include Validation Entry so the map can feed Spec / Plan / Review.
  • Treat stale or conflicting CodeMaps as indexes to re-check, not truth.
  • Do not treat CodeMap as a changelog. Update only terrain-changing facts: entries, flows, module boundaries, dependencies, risks, validation entry points, or behavior rule locations.

Version History

  • 837ddf7 Current 2026-07-24 21:06

Same Skill Collection

skills/new-chat-ready/SKILL.md
skills/sdd-riper-one-light/SKILL.md
skills/sdd-riper-one/SKILL.md

Metadata

Files
0
Version
0369cc4
Hash
04ca13ae
Indexed
2026-07-24 21:06

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 08:17
浙ICP备14020137号-1 $Гость$