Help us improve
Share bugs, ideas, or general feedback.
From codemap
Scans Python codebase using ast.parse to build JSON index of import graph and blast-radius metrics for dependency and coupling analysis.
npx claudepluginhub borda/ai-rig --plugin codemapHow this skill is triggered — by the user, by Claude, or both
Slash command
/codemap:scanThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<objective>
Queries Python codemap index for central/coupled modules, direct/reverse dependencies, and import paths between modules. Use after /codemap:scan for dependency analysis.
Runs a 7-phase codebase analysis using typegraph-mcp tools, producing a detailed architectural report. Useful when onboarding to an unfamiliar codebase or before making significant changes.
Share bugs, ideas, or general feedback.
Python only — uses ast.parse to extract the import graph across all .py files; non-Python files are not indexed. Writes .cache/scan/<project>.json. No external dependencies required.
Agents and develop skills query this index via scan-query to understand module dependencies, blast radius, and coupling before editing code.
NOT for: querying an existing index (use /codemap:query).
# timeout: 360000
${CLAUDE_PLUGIN_ROOT}/bin/scan-index
If --root was passed as an argument, forward it:
# timeout: 360000
${CLAUDE_PLUGIN_ROOT}/bin/scan-index --root <path>
The scanner writes to .cache/scan/<project>.json and prints a summary line:
[codemap] ✓ .cache/scan/<project>.json
[codemap] N modules indexed, M degraded
After the scan completes, read the index and report a compact summary:
# Note: $(...) inside the double-quoted python3 -c "..." string is shell-expanded before Python sees it.
# basename/git rev-parse resolve the project name at call time — intentional shell substitution.
python3 -c "
import json, sys
with open('.cache/scan/\$(basename \$(git rev-parse --show-toplevel)).json') as f:
d = json.load(f)
ok = [m for m in d['modules'] if m.get('status') == 'ok']
deg = [m for m in d['modules'] if m.get('status') == 'degraded']
top = sorted(ok, key=lambda m: m.get('rdep_count', 0), reverse=True)[:5]
print(f\"Modules: {len(ok)} indexed, {len(deg)} degraded\")
print(f\"Most central (by rdep_count):\")
for m in top:
print(f\" {m.get('rdep_count', 0):>3} {m['name']}\")
"
If degraded files exist: list them with their reason. Do not treat degraded files as a failure — the index is still useful.
Index ready. Query it with:
/codemap:query central --top 10
/codemap:query deps <module>
/codemap:query rdeps <module>
/codemap:query coupled --top 10