npx skills add ...
npx skills add neolabhq/context-engineering-kit --skill setup-codemap-cli
Guide for setup Codemap CLI for intelligent codebase visualization and navigation
npx skills add neolabhq/context-engineering-kit --skill setup-codemap-cli
User Input:
Ask the user where they want to store the configuration:
Options:
Project level (shared via git) - Configuration tracked in version control, shared with team
./CLAUDE.md./.claude/settings.jsonProject level (personal preferences) - Configuration stays local, not tracked in git
./CLAUDE.local.md./.claude/settings.local.json.gitignore, add them if notUser level (global) - Configuration applies to all projects for this user
~/.claude/CLAUDE.md~/.claude/settings.jsonStore the user's choice and use the appropriate paths in subsequent steps.
Check whether codemap is installed by running codemap -help.
If not installed, proceed with setup.
Read the following documentation to understand Codemap's capabilities:
After installation, verify codemap works:
Use the path determined in step 1. Once Codemap is successfully installed, update the appropriate CLAUDE.md file with the following content:
| Flag | Description |
|---|---|
--depth, -d <n> | Limit tree depth (0 = unlimited) |
--only <exts> | Only show files with these extensions |
--exclude <patterns> | Exclude files matching patterns |
--diff | Show files changed vs main branch |
--ref <branch> | Branch to compare against (with --diff) |
--deps | Dependency flow mode |
--importers <file> | Check who imports a file |
--skyline | City skyline visualization |
--json | Output JSON |
Smart pattern matching - no quotes needed:
.png - any .png fileFonts - any /Fonts/ directory*Test* - glob patternSee what you're working on:
Run a quick test to verify everything works:
Use the settings path determined in step 1. Create the settings file if it doesn't exist and add the following content:
if default branch is not main, but instead master (or something else) update content accordingly:
codemap hook session-start --ref=master instead of regular codemap hook session-start--ref=master flag.Ask user whether he want to add any other hooks and provide list of options with descriptions. Add hooks that he asks for.
| Command | Trigger | Description |
|---|---|---|
codemap hook session-start | SessionStart | Full tree, hubs, branch diff, last session context |
codemap hook pre-edit | PreToolUse (Edit|Write) | Who imports file + what hubs it imports |
codemap hook post-edit | PostToolUse (Edit|Write) | Impact of changes (same as pre-edit) |
codemap hook prompt-submit | UserPromptSubmit | Hub context for mentioned files + session progress |
codemap hook pre-compact | PreCompact | Saves hub state to .codemap/hubs.txt |
codemap hook session-stop | SessionEnd | Edit timeline with line counts and stats |
codemap .codemap .
codemap --diff