| name | onboard-codebase |
| description | Rapidly build a mental map of an unfamiliar repository — architecture, entry points, key modules, how to build/test/run — and persist it to project memory. Invoke manually with /onboard-codebase. |
| disable-model-invocation | true |
/onboard-codebase
Human-driven: help the DEVELOPER get productive in an unfamiliar repo fast, and leave durable
notes so the next session starts ahead. This is for your understanding — invoke it yourself when
you land in a repo you don't know. (For setting up a project's Claude config, use
/init-project instead; that one serves both you and the agent.)
Steps
- Map, don't read everything. Delegate to the
explore subagent to identify:
- Languages, frameworks, package manager.
- Entry points (main, server bootstrap, CLI).
- Top-level architecture and the handful of modules that matter.
- How to build, test, run, and lint (the exact commands).
- External dependencies and integration points (DBs, APIs, queues).
- Answer the onboarding questions a new engineer would ask: How does a request flow
through? Where does config/secrets loading happen? How is it tested? What are the
non-obvious conventions?
- Summarize concisely for the user: architecture in a few bullets + the key commands +
the
path:line anchors for the important pieces.
- Persist to project memory. Write/update
<repo>/.claude/memory/PROJECT.md with the
stack, build/test/lint/run commands, architecture summary, and gotchas. This is committed
for the team. (Do NOT put this in docs/ — that's human-authored documentation.)
- If the repo has no
.claude/ config at all, suggest /init-project to scaffold it.
Guardrails
- Read-heavy work stays in the
explore subagent to protect the main context window.
- Verify commands exist before writing them into memory (check
package.json, Makefile,
pyproject.toml, CI config) rather than guessing.