Workspace cartographer. Produces a lightweight, top-level structural map of a project — folder/module layout, key entry points, and ownership — for fast architectural orientation.
Precedence: LSPs > graphify > gitnexus > shell scripts — use the first that is REQUESTED and available.
Keep CODEMAP.md initialized and updated REGARDLESS.
Do not guess or try to figure out those above => if tools existed you would know that already => fallback to scripts and processes below.
IF graphify is already REQUESTED in current context:
- querying the codebase, tracing dependency paths between symbols, or explaining concepts (
graphify query/path/explain): MUST USE SKILL graphify
- building or incrementally updating the knowledge graph (
/graphify <path>, --update): MUST USE SKILL graphify
- After modifying code, run
graphify update . to keep the graph current (AST-only, no API cost)
IF gitnexus is already REQUESTED in current context:
- code graph queries, exploring code, debugging errors, analyzing impact, or refactoring: MUST APPLY SKILL FILE
assets/gitnexus-use.md
- running CLI commands, indexing, checking status, cleaning index, or generating wiki: MUST APPLY SKILL FILE
assets/gitnexus-cli.md
- Worked examples: READ SKILL FILE
assets/gitnexus-examples.md
- After modifying code, run
npx gitnexus analyze --force in the workspace root
- The codemap is a structural orientation tool — folder/module layout, entry points, recursive file counts, and short per-directory descriptions. It feeds structural awareness into planning and discovery; it does not capture symbol-level or call-graph detail.
- The output is written to
CODEMAP.md at the workspace root: markdown headers = workspace-relative path + recursive children count + short (<10 words) description, listing only immediate children file names per directory, 3-4 levels deep.
- Noise, caches, build artifacts, binaries, and
.gitignore-excluded files are excluded (the scripts use git ls-files).
- Get the generator for the current OS (Unix/macOS: make executable first):
- Unix/macOS: READ SKILL FILE
assets/codemap.sh.txt
- Windows: READ SKILL FILE
assets/codemap.ps1.txt
- Execute the script:
- Unix/macOS:
codemap.sh [WORKSPACE_ROOT] [MAX_DEPTH]
- Windows:
codemap.ps1 -WorkspaceRoot <path> -MaxDepth <n>
- Defaults: current directory, depth 4. Writes
CODEMAP.md to workspace root.
- Read the generated
CODEMAP.md and incorporate it into the current task's discovery notes or working context.
- Treat the codemap as the structural baseline for planning and discovery — use it to locate entry points, module boundaries, and ownership before diving into code.
- For large workspaces, the codemap is the partitioning input: USE SKILL
large-workspace-handling, which scopes subagents against CODEMAP.md headers.
- Keep only current structural state in
CODEMAP.md — no deltas, no changelogs.
1---2name: codemap-33description: To generate, populate, and use a project codemap4---56<codemap>78<role>910Workspace cartographer. Produces a lightweight, top-level structural map of a project — folder/module layout, key entry points, and ownership — for fast architectural orientation.1112</role>1314Precedence: **LSPs** > **graphify** > **gitnexus** > **shell scripts** — use the first that is **REQUESTED** and available.1516Keep CODEMAP.md initialized and updated REGARDLESS.1718Do not guess or try to figure out those above => if tools existed you would know that already => fallback to scripts and processes below.1920<lsp>21IF LSP tools are already in current context:22- The Language Server Protocol (LSP)23- Use already available tools / capabilities in context24- Combine with semantic search / code index tools already available in context 25- Prefer LSP over Grep/Read for code navigation26</lsp>2728<graphify>2930IF graphify is already **REQUESTED** in current context:31- querying the codebase, tracing dependency paths between symbols, or explaining concepts (`graphify query/path/explain`): MUST USE SKILL `graphify`32- building or incrementally updating the knowledge graph (`/graphify <path>`, `--update`): MUST USE SKILL `graphify`33- After modifying code, run `graphify update .` to keep the graph current (AST-only, no API cost)3435</graphify>3637<gitnexus>3839IF gitnexus is already **REQUESTED** in current context:40- code graph queries, exploring code, debugging errors, analyzing impact, or refactoring: MUST APPLY SKILL FILE `assets/gitnexus-use.md`41- running CLI commands, indexing, checking status, cleaning index, or generating wiki: MUST APPLY SKILL FILE `assets/gitnexus-cli.md`42- Worked examples: READ SKILL FILE `assets/gitnexus-examples.md`43- After modifying code, run `npx gitnexus analyze --force` in the workspace root4445</gitnexus>4647<core_concepts>4849- The codemap is a structural orientation tool — folder/module layout, entry points, recursive file counts, and short per-directory descriptions. It feeds structural awareness into planning and discovery; it does not capture symbol-level or call-graph detail.50- The output is written to `CODEMAP.md` at the workspace root: markdown headers = workspace-relative path + recursive children count + short (<10 words) description, listing only immediate children file names per directory, 3-4 levels deep.51- Noise, caches, build artifacts, binaries, and `.gitignore`-excluded files are excluded (the scripts use `git ls-files`).5253</core_concepts>5455<how_to_generate>56571. Get the generator for the current OS (Unix/macOS: make executable first):58 - Unix/macOS: READ SKILL FILE `assets/codemap.sh.txt`59 - Windows: READ SKILL FILE `assets/codemap.ps1.txt`602. Execute the script:61 - Unix/macOS: `codemap.sh [WORKSPACE_ROOT] [MAX_DEPTH]`62 - Windows: `codemap.ps1 -WorkspaceRoot <path> -MaxDepth <n>`63 - Defaults: current directory, depth 4. Writes `CODEMAP.md` to workspace root.643. Read the generated `CODEMAP.md` and incorporate it into the current task's discovery notes or working context.6566</how_to_generate>6768<how_to_use_output>6970- Treat the codemap as the structural baseline for planning and discovery — use it to locate entry points, module boundaries, and ownership before diving into code.71- For large workspaces, the codemap is the partitioning input: USE SKILL `large-workspace-handling`, which scopes subagents against `CODEMAP.md` headers.72- Keep only current structural state in `CODEMAP.md` — no deltas, no changelogs.7374</how_to_use_output>7576</codemap>