Claude Skill

scan-codebase

`$codemap-py:scan-codebase [flags]` only: Python index; never auto-invoke; skip query/integration.

LLM Mart · 0 points · 18 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download Borda-AI-Rig-plugins_codemap-py_codex-skills_scan-codebase-39e3a48.zip · 1 KB
borda/ai-rig 27 4 forks Apache-2.0 Updated 2d ago
Part of borda/ai-rig — 82 skills

Install

skills CLI npx skills add https://github.com/Borda/AI-Rig/tree/main/plugins/codemap-py/codex-skills/scan-codebase
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install borda-ai-rig@llmmart
Git git clone https://github.com/Borda/AI-Rig.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole borda/ai-rig collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Before asking, read User Questions.

Scan Codebase

Python only: ast.parse records imports plus classes/functions/methods and line ranges for every .py; non-Python files excluded. Writes .cache/codemap/<project>.json, no external dependencies. A zero-Python project writes a valid empty index; downstream queries return no results. Symbol data lets $codemap-py:query-code symbol/find-symbol return target source instead of full-file reads (~70–94% fewer Read tokens).

NOT for: existing-index query (use $codemap-py:query-code); integration health (use $codemap-py:integration).

Explicit invocation only — Codex cannot declare disable-model-invocation; never call this skill autonomously, only for the user's literal $codemap-py:scan-codebase trigger.

Runtime note

Codex has no bin/ PATH entry or plugin-root variable. Resolve installed root once, replace PLUGIN_ROOT literally in commands, retain in reasoning; shell state doesn't persist.

Workflow

1. Scan

Parse only --root <path> and --incremental. For any other -- token, report ! Unknown flag(s): <tokens> then Supported: --root <path>, --incremental and stop; do not guess. Use this exact Unknown flag(s) wording.

PLUGIN_ROOT/bin/codemap-py index [--root <path>] [--incremental]

On Windows use PLUGIN_ROOT\bin\codemap-py.cmd index .... --root names index from basename(<path>), unlike default git-root basename. After a custom-root scan, retain exact path printed by scanner as <emitted-index-path>; later query must use --index <emitted-index-path> --root <same-root>. --root is path resolution only, doesn't select the index. Scanner writes <root>/.cache/codemap/<project>.json (or $CODEMAP_INDEX_DIR/<project>.json), prints indexed/degraded counts. On non-zero exit, report it and stop; never retry silently (1 index/filesystem failure, 2 syntax).

2. Report

Report module and degraded counts; degraded is informational and the index remains usable. For zero Python, report valid but empty. Then suggest:

Index ready. Query it with $codemap-py:query-code — central --top 10, deps/rdeps <module>, coupled --top 10.
See $codemap-py:query-code for the full subcommand list.
Files (ai-rig)
  • SKILL.md 2.4 KB
    ---
    name: scan-codebase
    description: '`$codemap-py:scan-codebase [flags]` only: Python index; never auto-invoke; skip query/integration.'
    ---
    
    > Before asking, read [User Questions](../../shared/codex-user-questions.md).
    
    # Scan Codebase
    
    Python only: `ast.parse` records imports plus classes/functions/methods and line ranges for every `.py`; non-Python files excluded. Writes `.cache/codemap/<project>.json`, no external dependencies. A zero-Python project writes a valid empty index; downstream queries return no results. Symbol data lets `$codemap-py:query-code symbol`/`find-symbol` return target source instead of full-file reads (~70–94% fewer `Read` tokens).
    
    NOT for: existing-index query (use `$codemap-py:query-code`); integration health (use `$codemap-py:integration`).
    
    **Explicit invocation only** — Codex cannot declare `disable-model-invocation`; never call this skill autonomously, only for the user's literal `$codemap-py:scan-codebase` trigger.
    
    ## Runtime note
    
    Codex has no `bin/` PATH entry or plugin-root variable. Resolve installed root once, replace `PLUGIN_ROOT` literally in commands, retain in reasoning; shell state doesn't persist.
    
    ## Workflow
    
    ### 1. Scan
    
    Parse only `--root <path>` and `--incremental`. For any other `--` token, report `! Unknown flag(s): <tokens>` then `Supported: --root <path>, --incremental` and stop; do not guess. Use this exact `Unknown flag(s)` wording.
    
    ```bash
    PLUGIN_ROOT/bin/codemap-py index [--root <path>] [--incremental]
    ```
    
    On Windows use `PLUGIN_ROOT\bin\codemap-py.cmd index ...`. `--root` names index from `basename(<path>)`, unlike default git-root basename. After a custom-root scan, retain exact path printed by scanner as `<emitted-index-path>`; later query must use `--index <emitted-index-path> --root <same-root>`. `--root` is path resolution only, doesn't select the index. Scanner writes `<root>/.cache/codemap/<project>.json` (or `$CODEMAP_INDEX_DIR/<project>.json`), prints indexed/degraded counts. On non-zero exit, report it and stop; never retry silently (`1` index/filesystem failure, `2` syntax).
    
    ### 2. Report
    
    Report module and degraded counts; degraded is informational and the index remains usable. For zero Python, report valid but empty. Then suggest:
    
    ```text
    Index ready. Query it with $codemap-py:query-code — central --top 10, deps/rdeps <module>, coupled --top 10.
    See $codemap-py:query-code for the full subcommand list.
    ```
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related