query-code

Solid

Query the codemap structural index — module deps/rdeps/central/coupled/path, symbol-level source extraction, function call graph (fn-deps, fn-rdeps, fn-central, fn-blast), plus quality/coverage queries. Trigger with `$codemap-py:query-code <subcommand> ...` for: "what depends on", "who calls", "imports of", "dependency graph", "blast radius of", "list central modules". Skip for: rename intent (use `$codemap-py:rename-refs`); simple grep suffices; non-Python repo. Missing/stale index auto-builds — no manual scan-codebase needed.

AI & Automation 23 stars 3 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
46
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Query Code Python import-graph + symbol queries via the codemap-py unified CLI's `query` subcommand. Module: `central [--top N]`, `coupled [--top N]`, `deps <mod>`, `rdeps <mod>`, `path <from> <to>` Symbol: `symbol <name> [--with-imports]`, `symbols <mod>`, `find-symbol <pattern>` Function call-graph (v3 index): `fn-deps <qname>`, `fn-rdeps <qname>`, `fn-central [--top N]`, `fn-blast <qname>` qname format: `mypackage.auth::validate_token` NOT for: repo rebuild (use `$codemap-py:scan-codebase`); renaming symbols (use `$codemap-py:rename-refs`); non-Python files. ## Runtime note Codex has no `bin/` PATH entry and no `$CLAUDE_PLUGIN_ROOT`-equivalent environment variable, so there is no PATH → env-var → cache three-tier fallback to run here. Resolve this skill's installed plugin-root path once, substitute it for `PLUGIN_ROOT` below, and invoke the unified CLI directly: ```bash PLUGIN_ROOT/bin/codemap-py query <subcommand> <args> ``` Shell state does not persist across tool calls — keep the resolved path in reasoning, not a shell variable. ## Step 0: Index freshness (once per task) ```bash PLUGIN_ROOT/bin/codemap-py query central --top 1 >/dev/null 2>&1; echo $? ``` A missing index reports a resolvable error; distinguish "index missing" from "index present but query failed" by the error body, not just the exit code. Auto-build opt-out via `SCAN_NO_AUTOBUILD=1` (queries run against the index exactly as-is — no refresh, no full build); echo build wall-time when a build ...

Details

Author
Borda
Repository
Borda/AI-Rig
Created
5 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category