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: codemap3description: To generate, populate, and use a project codemap4license: Apache-2.05---67<codemap>89<role>1011Workspace cartographer. Produces a lightweight, top-level structural map of a project — folder/module layout, key entry points, and ownership — for fast architectural orientation.1213</role>1415Precedence: **LSPs** > **graphify** > **gitnexus** > **shell scripts** — use the first that is **REQUESTED** and available.1617Keep CODEMAP.md initialized and updated REGARDLESS.1819Do not guess or try to figure out those above => if tools existed you would know that already => fallback to scripts and processes below.2021<lsp>22IF LSP tools are already in current context:23- The Language Server Protocol (LSP)24- Use already available tools / capabilities in context25- Combine with semantic search / code index tools already available in context 26- Prefer LSP over Grep/Read for code navigation27</lsp>2829<graphify>3031IF graphify is already **REQUESTED** in current context:32- querying the codebase, tracing dependency paths between symbols, or explaining concepts (`graphify query/path/explain`): MUST USE SKILL `graphify`33- building or incrementally updating the knowledge graph (`/graphify <path>`, `--update`): MUST USE SKILL `graphify`34- After modifying code, run `graphify update .` to keep the graph current (AST-only, no API cost)3536</graphify>3738<gitnexus>3940IF gitnexus is already **REQUESTED** in current context:41- code graph queries, exploring code, debugging errors, analyzing impact, or refactoring: MUST APPLY SKILL FILE `assets/gitnexus-use.md`42- running CLI commands, indexing, checking status, cleaning index, or generating wiki: MUST APPLY SKILL FILE `assets/gitnexus-cli.md`43- Worked examples: READ SKILL FILE `assets/gitnexus-examples.md`44- After modifying code, run `npx gitnexus analyze --force` in the workspace root4546</gitnexus>4748<core_concepts>4950- 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.51- 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.52- Noise, caches, build artifacts, binaries, and `.gitignore`-excluded files are excluded (the scripts use `git ls-files`).5354</core_concepts>5556<how_to_generate>57581. Get the generator for the current OS (Unix/macOS: make executable first):59 - Unix/macOS: READ SKILL FILE `assets/codemap.sh.txt`60 - Windows: READ SKILL FILE `assets/codemap.ps1.txt`612. Execute the script:62 - Unix/macOS: `codemap.sh [WORKSPACE_ROOT] [MAX_DEPTH]`63 - Windows: `codemap.ps1 -WorkspaceRoot <path> -MaxDepth <n>`64 - Defaults: current directory, depth 4. Writes `CODEMAP.md` to workspace root.653. Read the generated `CODEMAP.md` and incorporate it into the current task's discovery notes or working context.6667</how_to_generate>6869<how_to_use_output>7071- 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.72- For large workspaces, the codemap is the partitioning input: USE SKILL `large-workspace-handling`, which scopes subagents against `CODEMAP.md` headers.73- Keep only current structural state in `CODEMAP.md` — no deltas, no changelogs.7475</how_to_use_output>7677</codemap>