A Claude Code skill that generates a persistent code-context.md for your project — models, routes, components, stores, architecture, data flows, and key patterns — so every Claude session starts with full codebase understanding instead of re-exploring from scratch.
Why use it:
- Eliminates cold-start exploration — Claude knows your codebase immediately
- Auto-updates when your code changes — tracks a git hash marker, detects drift, and updates itself
- Conflict-free —
code-context.mdis gitignored and generated per developer, so concurrent work on shared branches never produces merge conflicts on it
git clone https://github.com/leverj/claude-code-context.git /tmp/cc && cp -r /tmp/cc/skills/* ~/.claude/skills/ && rm -rf /tmp/ccSame command as install — it overwrites the existing skill files with the latest version:
git clone https://github.com/leverj/claude-code-context.git /tmp/cc && cp -r /tmp/cc/skills/* ~/.claude/skills/ && rm -rf /tmp/ccYour project's code-context.md and CLAUDE.md are not affected — only the skill definition files in ~/.claude/skills/ are updated. After updating, run /code-context init in any project to refresh its CLAUDE.md section with the latest wording.
/code-context init # Generate context for your project
/code-context update # Update after structural changes
/code-context uninstall # Remove from project (keeps code-context.md)
/code-context global-uninstall # Full removal (deletes skill files too)
You can also pass hints to init:
/code-context init focus on the API layer and database models
After init, every new Claude session automatically checks if the codebase has changed and updates the context file — no manual upkeep needed.
- Exploration — Reads package configs, directory structure, and key source files (read-only)
- Generation — Writes
code-context.md(with a git hash marker) and adds a "Code Context" section toCLAUDE.md - Auto-maintenance — Each session compares the marker hash against current HEAD; if the codebase changed, it auto-updates the affected sections
- Uninstall — Cleanly removes
CLAUDE.mdintegration while preserving the generated documentation
The skill adapts to your tech stack:
| Stack | What it captures |
|---|---|
| Node.js/Express/Koa | Routes, middleware, models (Mongoose/Sequelize/Prisma) |
| React/Next.js | Components, hooks, stores (Redux/Zustand/Context), pages |
| React Native/Expo | Screens, navigation, platform-specific files, native modules |
| Swift/iOS | Views, ViewModels, models, networking, persistence |
| Python/Django/Flask | Models, views/routes, serializers, management commands |
| Go | Handlers, models, middleware, packages |
| Rust | Modules, traits, handlers, types |
| General | Config files, CI/CD, Docker, environment setup, scripts |
This skill touches exactly three files in your project root. Nothing else.
| File | Action | When |
|---|---|---|
code-context.md |
Created / edited | init, update, or auto-update on session start |
CLAUDE.md |
Created / appended / section removed | init adds a section, uninstall removes it |
.gitignore |
Created / appended | init ensures code-context.md is listed |
On init, if code-context.md was previously tracked in git, the skill runs git rm --cached code-context.md to untrack it (the working-tree file is preserved) and warns you to commit the .gitignore change so teammates stop pulling it.
It only reads your source files — never modifies source code, configs, or any other project files.
- Does not modify any source code files
- Does not install dependencies or run build commands
- Does not make git commits or push to remote
- Does not access the network or external APIs
- Does not delete any files (uninstall leaves
code-context.mdin place) - Does not stage or commit
code-context.md— it is gitignored and stays per-developer
- Deep over broad — Lists individual fields/props, not just file names
- Relationships matter — Documents how pieces connect across packages
- Living document — Auto-updated via git hash change detection, not a one-time snapshot
- Reversible — Uninstall disables without destroying; re-init picks up where you left off
MIT