explore-codebase
Skill9 starsChanged 5 months agoApache-2.0View on GitHub
Explores an unfamiliar codebase to map architecture, locate where a feature lives, and find reusable utilities before writing code — returning a concise summary of entrypoints, key modules, and conventions. Use when entering a new repo or before a change that spans files you don't know yet.
- Reads credentials
7 other projects use a version of this.
Adopted by
Most recently taken up by
- aprameyak/coding-skillstheir own version, first seen Oct 2, 2026
- imMamdouhaboammar/get-things-donetheir own version, first seen Sep 1, 2026
- leandrodslv/claude-skills-librarytheir own version, first seen Aug 14, 2026
- pablodiazjorge/prompt-forgetheir own version, first seen Jun 27, 2026
- tirth8205/code-review-graphtheir own version, first seen Jun 10, 2026
- olafgeibig/skillstheir own version, first seen May 16, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- tirth8205/code-review-graph★ 32ksame name
- imMamdouhaboammar/get-things-done★ 2same name
- pablodiazjorge/prompt-forge★ 2same name
- aprameyak/coding-skills★ 1same name
- leandrodslv/claude-skills-library★ 0same name
- olafgeibig/skills★ 0same name
- ravichaudharylt/claude-fe-agent★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository147 other files it gives its agents.
- second-brain/AGENTS.mdAGENTS.md
- second-brain/CLAUDE.mdCLAUDE.md
- agent-tool-mcp-builderSkill
- api-design-reviewSkill
- async-concurrency-correctnessSkill
- audit-accessibility-wcagSkill
- audit-license-complianceSkill
- audit-technical-seoSkill
- auth-jwt-sessionSkill
- author-codemodSkill
- brainstorm-designSkill
- build-audit-loggingSkill
- build-cdc-streaming-pipelineSkill
- build-cli-toolSkill
- build-data-tableSkill
- build-etl-pipelineSkill
- build-form-validationSkill
- build-native-mobile-uiSkill
- build-office-docsSkill
- build-offline-first-syncSkill
- build-react-componentSkill
- build-realtime-channelSkill
- build-spreadsheetSkill
- build-vector-searchSkill
- caching-strategySkill
- cicd-pipeline-authorSkill
- cloud-cost-optimizeSkill
- code-commentsSkill
- code-reviewSkill
- compose-local-dev-stackSkill
- configure-bundler-buildSkill
- configure-dns-tlsSkill
- configure-reverse-proxy-lbSkill
- configure-security-headers-cspSkill
- contract-testingSkill
- datetime-timezone-correctnessSkill
- db-migration-safetySkill
- debug-ci-pipeline-failureSkill
- debug-flaky-testsSkill
- debug-frontend-browserSkill
- debug-root-causeSkill
- defend-llm-prompt-injectionSkill
- deliver-webhooksSkill
- dependency-upgradeSkill
- deploy-releaseSkill
- design-api-paginationSkill
- design-authorization-modelSkill
- design-backup-dr-recoverySkill
- design-event-sourcing-cqrsSkill
- design-multi-tenancySkill
- design-protobuf-grpc-serviceSkill
- design-relational-schemaSkill
- design-search-index-infraSkill
- design-state-machineSkill
- design-token-systemSkill
- diff-table-paritySkill
- distributed-locks-leasesSkill
- dockerfile-optimizeSkill
- encrypt-sensitive-dataSkill
- error-messageSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 3 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Run this before writing or changing code in a repo you don't already have a mental model of.
- Very specific: line 22
Read README* and any CONTRIBUTING/docs/ index.
- Very specific: line 23
Read the package/build manifest to learn language, deps, scripts, and entry: package.json, pyproject.toml/setup.cfg, go.mod, Cargo.toml, …
- Very specific: line 33
Test runner and how a single test runs (jest/vitest/pytest/go test/...).
- Very specific: line 35
Import/module style, path aliases (tsconfig paths, jsconfig), error-handling and logging patterns.
- Very specific: line 38
Use ripgrep for the concept: rg -n <symbol|route|string|error message>.
- Distinctive: line 40
Follow imports outward from the entrypoint or from the matched file to see how pieces wire together.
- Very specific: line 59
Guessing build/test commands: instead of reading them from the manifest/CI.
- Very specific: line 60
Monorepo blindness: If you see packages/, apps/, workspaces, pnpm-workspace.yaml, turbo.json, or go.work, identify which package owns the …
- Distinctive: line 73
If you can't point to where the change goes, you haven't finished exploring — search more, or delegate a scoped Explore subagent.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When to Use
Run this before writing or changing code in a repo you don't already have a mental model of. Concretely:
- First time touching this repo, or returning after major churn.
- The change spans files you can't name yet ("add auth to the API", "rename this config everywhere").
- You suspect a helper/util already exists and don't want to reinvent it.
Skip it when the change is fully described by a one-line diff in a file you already know (typo, log line, single rename). Exploring then is wasted context.
Goal of the skill: produce a short, reusable map — not to read the whole repo. Stop as soon as you can answer: where does the relevant code live, what conventions must I follow, what can I reuse.
Steps
- Anchor on the manifest + docs first (cheap, high signal).
- Read
README*and anyCONTRIBUTING/docs/index. - Read the package/build manifest to learn language, deps, scripts, and entry:
package.json,pyproject.toml/setup.cfg,go.mod,Cargo.toml,pom.xml/build.gradle,Gemfile,composer.json. - From
scripts/targets, note the real build / test / lint / start commands. Do not guess them.
- Read
- Map structure shallowly — directories before files.
- List the top 1–2 levels of source dirs (e.g.
src/,app/,lib/,cmd/,internal/,pkg/). Use a depth-limited listing, not a full recursive dump. - Find the entrypoint(s):
main,index,app,cmd/*/main.go,bin/*, themain/modulefield in the manifest, or framework conventions (pages/,app/,routes/,controllers/). - Note where tests live (
test/,tests/,__tests__/,*_test.go,*.spec.*) and config (config/,*.config.*, dotfiles,.env.example).
- List the top 1–2 levels of source dirs (e.g.
- Extract conventions (so your code matches the repo, not your defaults).
- Framework / runtime + version (from manifest + lockfile).
- Test runner and how a single test runs (jest/vitest/pytest/go test/...).
- Lint/format tool and config (
.eslintrc*,ruff/flake8,.prettierrc,.editorconfig,gofmt). - Import/module style, path aliases (
tsconfigpaths,jsconfig), error-handling and logging patterns. Open 1–2 representative source files to confirm, don't infer from names alone.
- Locate the target feature + reusable utils with search, not browsing.
- Use ripgrep for the concept:
rg -n <symbol|route|string|error message>. Search user-facing strings and route paths — they pin down the real implementation fast. - Find existing helpers before writing new ones:
rg -n "function|def|export (function|const)" <util-or-helpers-dir>, or grep for likely names (format,parse,client,validate,retry). - Follow imports outward from the entrypoint or from the matched file to see how pieces wire together. Read only the files on that path.
- Use ripgrep for the concept:
- For a large/sprawling repo, delegate the wide read.
- Spin up a read-only Explore subagent with a narrow brief ("find where X is handled and what utils exist for Y; return file:line refs + summary"). It reads in its own context and returns a digest, keeping the main context lean.
- Return a tight summary — references, not contents.
Report only:
- Entrypoints: file:line where execution/requests start.
- Where it lives: the modules/files relevant to the task, with one-line roles.
- Conventions: framework, test/lint/build commands, code-style notes to follow.
- Reuse: existing utils/helpers to call instead of writing new ones (file:line).
- Gotchas: anything surprising (codegen, monorepo boundaries, generated dirs, indirection).
Common Errors / Gotchas
- Reading everything until context fills up. The most common failure. Cap your exploration; prefer
rg+ targeted reads over opening files to "get a feel". If you're reading the 10th file without a hypothesis, stop and search. - Vague summary nobody can act on ("it's a typical web app"). Every claim must carry a
file:lineor exact command. If it isn't specific enough to start the change, it isn't done. - Grepping inside generated/vendored trees. Exclude
node_modules/,dist/,build/,.next/,coverage/,target/,vendor/,.venv/. Userg(respects.gitignoreby default) and don't override it with-uuunless needed. - Trusting folder names over reality — a
utils/may be dead, the real helpers elsewhere. Confirm by checking who imports it (rg "from .*utils"/rg "import.*utils"). - Guessing build/test commands instead of reading them from the manifest/CI. Wrong command wastes a cycle; pull the exact one from
scripts/CI config. - Monorepo blindness. If you see
packages/,apps/,workspaces,pnpm-workspace.yaml,turbo.json, orgo.work, identify which package owns the task before mapping — the root manifest isn't the whole story. - Subagent brief too broad. "Explain the codebase" returns a wall of text. Scope it to the task: one feature to locate, one question to answer.
Verify
The exploration succeeded when all are true:
- You can name the entrypoint and the specific files/modules the upcoming change will touch, each with
file:line. - You have the exact build, test, and lint commands (copied from manifest/CI, not guessed).
- You listed any reusable utils relevant to the task, or confirmed none exist.
- A teammate could start the change from your summary without re-reading the repo.
- Your context is not bloated with full file contents you didn't need — references over dumps.
If you can't point to where the change goes, you haven't finished exploring — search more, or delegate a scoped Explore subagent.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

