.claude/skills/codemap/SKILL.md
Navigate codebases efficiently using structural indexes. Use when finding symbol definitions (classes, functions, methods), exploring file structure, or locating code by name. Reduces token consumption by 60-80% through targeted line-range reads instead of full file scans.
npx skillsauth add azidan/codemap codemapInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Navigate codebases efficiently using pre-built structural indexes stored in .codemap/ directories.
USE CodeMap when:
READ full files when:
# Find a symbol by name (case-insensitive)
codemap find "SymbolName"
# Filter by type
codemap find "handle" --type method
codemap find "User" --type class
codemap find "Config" --type interface
# Show file structure with all symbols
codemap show path/to/file.ts
# Check if index is up-to-date
codemap validate
# View index statistics
codemap stats
codemap find "UserService"
Output:
src/services/user.ts:15-189 [class] UserService
(config: Config)
Instead of reading the entire file, read just lines 15-189:
Read src/services/user.ts lines 15-189
codemap show src/services/user.ts
Output:
File: src/services/user.ts (hash: a3f2b8c1)
Lines: 542
Language: typescript
Symbols:
- UserService [class] L15-189
- constructor [method] L20-35
- getUser [method] L37-98
(userId: string) : Promise<User>
- createUser [async_method] L100-145
(data: CreateUserDto) : Promise<User>
| Type | Description |
|------|-------------|
| class | Class declaration |
| function | Function declaration |
| method | Class method |
| async_function | Async function |
| async_method | Async class method |
| interface | TypeScript interface |
| type | TypeScript type alias |
| enum | Enum declaration |
The .codemap/ directory mirrors the project structure:
.codemap/
├── .codemap.json # Root manifest
├── _root.codemap.json # Files in project root
├── src/
│ ├── .codemap.json # Files in src/
│ └── services/
│ └── .codemap.json # Files in src/services/
For programmatic access, read the JSON files directly:
cat .codemap/src/services/.codemap.json
Before trusting cached line numbers (especially after context compaction):
codemap validate path/to/file.ts
codemap updateIf a project doesn't have a .codemap/ directory:
python3 --version && pip --version# Install codemap from GitHub (NOT from PyPI - there's a different package there)
pip install git+https://github.com/AZidan/codemap.git
# Initialize index
codemap init .
IMPORTANT: Do NOT use pip install codemap - that installs a different package from PyPI. Always use the GitHub URL above.
Start watch mode in the background to keep the index automatically updated:
codemap watch . &
This runs in the background and updates the index whenever files change. No need to manually run codemap update.
To stop watch mode later:
pkill -f "codemap watch"
codemap find before grep/globcodemap validate before trusting cached line numberscodemap show to understand file layout before diving inTask: "Fix the authentication bug in the login handler"
# 1. Find relevant symbols
codemap find "login"
# → src/auth/handlers.ts:45-92 [function] handleLogin
# 2. Check file structure
codemap show src/auth/handlers.ts
# Shows handleLogin and related functions with line ranges
# 3. Read only the relevant function (lines 45-92)
# ... make your fix ...
# 4. If you need related code, find it
codemap find "validateToken"
# → src/auth/utils.ts:12-38 [function] validateToken
development
Navigate codebases efficiently using structural indexes. Use when finding symbol definitions (classes, functions, methods), exploring file structure, or locating code by name. Reduces token consumption by 60-80% through targeted line-range reads instead of full file scans.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.