agentleFS
bnemabnema/pi-public/skills/exploring-codebases/SKILL.md

exploring-codebases

Skill1 starsChanged 4 months agoMITView on GitHub

Use when starting work in an unfamiliar repository, onboarding to a codebase, doing repository reconnaissance, or needing project-wide context before planning, editing, debugging, refactoring, or review.

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check repo state: branch/status, README/docs, package/build files, recent commits if relevant.

    line 12
  2. Very specific:

    If tree is unavailable: find .

    line 15
  3. Distinctive:

    Stop expanding when another scan is unlikely to change the next decision.

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Exploring Codebases

Principle: map first, edit later. Spend enough context to avoid blind patches; do not read everything line by line.

Workflow

  1. Check repo state: branch/status, README/docs, package/build files, recent commits if relevant.
  2. Visualize the tree before detailed reading: run a bounded tree command to see structure, naming, generated/vendor dirs, app boundaries, and test layout.
    • Prefer: tree -L 3 -I 'node_modules|.git|dist|build|target|vendor|coverage' .
    • If tree is unavailable: find . -maxdepth 3 -type d.
  3. Identify purpose: app/lib/service, users/domain, main entrypoints.
  4. Map architecture: top-level dirs, core modules, boundaries, data/control flow.
  5. Find hot paths: entrypoints, handlers, commands, shared utilities, large/high-churn files, tests around likely changes.
  6. Note external surfaces: APIs, database, auth, queues, files, env/config, network, trust boundaries.
  7. Map verification: build/test/lint commands, test layout, fastest relevant checks.
  8. Report before acting: context map, important files, risks, unknowns, recommended next step.

Depth

  • Tiny targeted change: short pass over README/config, touched file, neighbors/callers/tests.
  • New feature, bug hunt, refactor, review, unfamiliar repo: full workflow.
  • Stop expanding when another scan is unlikely to change the next decision.

Output

Return:

  • what the project does
  • architecture map
  • hot paths/hotspots
  • verification commands
  • risks/unknowns

Common mistakes

  • Editing the first obvious file.
  • Trusting "tiny change" without checking callers/tests.
  • Skipping the tree view and losing project-shape context.
  • Producing a directory tour instead of decision-useful context.
  • Hiding uncertainty.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

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.