Repository Understanding
A fast, repeatable method for mapping an unfamiliar repository — entry points, build and test commands, conventions, ownership and risk areas — and producing a concise repo map before changing any code.
What it does
A fast, repeatable method for mapping an unfamiliar repository — entry points, build and test commands, conventions, ownership and risk areas — and producing a concise repo map before changing any code.
- Category
- coreonboardinganalysis
- Platforms
- generic
- Capabilities
- analysisdocumentation
Example tasks
- “Map this unfamiliar monorepo and tell me how to build, test and run it before I change anything.”
- “Find where authentication is implemented and which conventions a new endpoint must follow.”
- “Produce a one-page repo map I can paste into AGENTS.md.”
Works with
Recommended alongside
Permissions summary
Files
Reads files only
Shell
No shell commands
Network
No network
Permissions are declared in the component manifest and compiled into each client's tool list. Components are built for least privilege.
Supported environments
| Client | Support | Installed as |
|---|---|---|
| Claude Code | Native | .claude/skills/<id>/SKILL.md |
| OpenAI Codex | Adapter | .codex/skills/<id>/SKILL.md |
| Cursor | Adapter | .cursor/rules/<id>.mdc |
| VS Code (Copilot) | Adapter | .github/instructions/<id>.instructions.md |
| Generic markdown | Adapter | docs/forgekit/skills/<id>.md |
Claude Code is the native reference. Other clients use adapters, so behaviour is close but not identical. See the compatibility matrix.
Included in packs
Full skill (free preview)
This is a free component, so its complete content is public. It is exactly what gets installed (before client-specific formatting).
Repository Understanding
Use this method when you land in a repository you have not seen, or before any non-trivial change. The goal is a small, accurate map built from evidence in the repo, not from assumptions about "how projects like this usually work". Spend minutes, not hours: read manifests and docs first, source second.
1. Order of investigation (stop as soon as you can answer the task)
- Agent and contributor docs:
AGENTS.md,CLAUDE.md,.cursor/rules/,.github/copilot-instructions.md,CONTRIBUTING.md,README.md,docs/. These override your defaults. Note any conflicts between them. - Manifests and lockfiles tell you the stack and the real commands:
package.json(scripts,workspaces,engines,packageManager),pnpm-workspace.yaml,turbo.json,nx.json,pyproject.toml,go.mod,Cargo.toml,build.gradle(.kts),settings.gradle,Package.swift,pubspec.yaml,Makefile,justfile,Taskfile.yml. - CI config is the ground truth for what must pass:
.github/workflows/*.yml,.gitlab-ci.yml,azure-pipelines.yml,.circleci/. Copy the exact lint/test/build commands from here. - Top-level layout: list the root and one level down. Identify apps vs libraries (
apps/,packages/,services/,libs/,src/,cmd/,internal/). - Entry points: web
src/main.*,app/layout.tsx,pages/_app.*; serversmain.go,server.ts,manage.py,app/main.py; CLIsbin/,cmd/; mobileAndroidManifest.xml,App.swift. - Git signals: recent history and churn show what is alive (
git log --oneline -20,git log --stat -5),CODEOWNERSshows ownership, andgit blameon a surprising line explains intent. Only run read-only git commands when a shell is available; otherwise use the files.
2. What to extract
| Item | Where to look | Record as |
|---|---|---|
| Install / build / test / lint / typecheck / dev-server commands | CI, manifest scripts, Makefile | Exact copy-pastable commands, per package if monorepo |
| Language and runtime versions | .nvmrc, .tool-versions, engines, go.mod, rust-toolchain.toml | Version constraints |
| Module boundaries | Directory structure, tsconfig paths, import lint rules, settings.gradle | Allowed dependency direction |
| Conventions | Linter/formatter config, existing code of the same kind | Naming, file layout, error handling, test placement |
| Data and config | .env.example, docker-compose.yml, migrations folder | Services needed locally; env var NAMES only |
| Test strategy | Test dirs, runner config, fixtures | Unit vs integration vs e2e, how to run one test |
| Ownership and risk | CODEOWNERS, generated dirs, vendor/, migrations, auth/payment code | Areas needing extra care |
3. Techniques that save time
- Follow one real flow end to end. Pick a feature close to the task (for example an existing endpoint or screen) and trace UI/route -> handler -> service -> data access -> test. This reveals the real layering faster than reading directories.
- Search for the closest sibling of what you must build and copy its structure (file names, test names, registration points).
- Find registration points: where routes, DI modules, feature flags, translations or schema types are registered; forgetting one is the most common silent failure.
- Identify generated code (
*.generated.*,__generated__,dist/,build/,.next/, protobuf/OpenAPI outputs) and the command that regenerates it. Never hand-edit it. - Check what is not there: no tests for an area means raise the verification bar and say so.
- In monorepos, locate the package that owns the change, its local scripts, and its dependents (
pnpm why,nx graph,turbo run --dry,go list ./...).
4. Output: the repo map (aim for under 60 lines)
# Repo map: <name>
Purpose: one sentence.
Stack: language/runtime versions, frameworks, package manager.
Layout: path -> responsibility (only meaningful dirs).
Entry points: ...
Commands: install / dev / build / test (all) / test (single file) / lint / typecheck.
Conventions: 5-10 bullets with a file example for each.
Flow example: route -> handler -> service -> repo -> test (with paths).
Risk areas: generated code, migrations, auth, billing, shared packages.
Open questions: things you could not verify.
5. Rules
- Every claim in the map must be traceable to a file you read; mark guesses as "unverified".
- Prefer reading config over source; prefer source over tests; prefer tests over comments, which go stale.
- Run the narrowest verification command that proves your change, then the CI-equivalent one before finishing.
- Do not install, upgrade or reformat anything while mapping. Mapping is read-only.
Common mistakes
- Trusting the README build steps without comparing to CI; READMEs rot, CI does not.
- Reading the whole
src/tree top-down instead of tracing one flow. - Missing a nested
AGENTS.md/rules file in a subdirectory that overrides the root one. - Editing generated files, lockfiles by hand, or vendored code.
- Assuming the monorepo root commands apply to every package.
- Producing a 500-line map nobody reads; cut anything the task does not need.
Version and changelog
Latest version 1.0.0. Requires DevBuildKit CLI 1.0.0 or newer.
Changelog — Repository Understanding
1.0.0
- Initial release.