agentleFS
HermeticOrmusHermeticOrmus/code-comprehension-skills/skills/explore-code/SKILL.md

explore-code

Skill1 starsChanged 6 months agoMITView on GitHub

Understand an unfamiliar codebase fast. Start with purpose, architecture, stack and entry points, map the directory structure, trace one representative flow end to end, then identify the core abstractions and where changes go. Use when landing in a repository you have never seen and need orientation before making a change.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. lllllllama/RigorPilot-Skills★ 495same 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 repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before reading source, answer four questions from the README and the manifest:

    line 15
  2. Distinctive:

    When you can answer these, you can change the right place instead of the first place that compiles.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Explore code

A protocol for building a working mental model of an unfamiliar codebase before changing it. The goal is orientation, not a full audit: enough understanding to know where execution starts, how data moves, and where a given change belongs.

Tradeoff: bias toward building a map before editing. For a one-line fix in a file you already know, skip it.

1. Start with purpose, architecture, stack, entry points

Before reading source, answer four questions from the README and the manifest:

  • Purpose: what does it do, and for whom?
  • Architecture: single service, library, CLI, monorepo, frontend plus backend?
  • Stack: language, framework, runtime, datastore, and versions.
  • Entry points: where execution starts (a main, a server listen, a CLI registration, a framework convention).

2. Map the directory structure

Get the tree, ignoring generated and vendored directories.

tree -L 2 -I 'node_modules|dist|build|.git|target|__pycache__|.venv'

Locate source versus tests, config and environment templates, docs, and build and deploy definitions. The layout encodes the team's mental model.

3. Trace one representative flow end to end

Follow one request, one command, or one public call through every layer: route to handler to service to data access to response, or argument parsing to side effect. One traced flow teaches more than many files read in isolation, because it reveals the layering and the conventions repeated everywhere else.

4. Identify the core abstractions and where to make changes

Name the data models, the seams between layers, the cross-cutting concerns, and the files most changes touch. Then answer the orientation questions:

  1. How would I add a new feature of type X?
  2. Where would I look to fix a bug in area Y?
  3. What happens when event Z occurs?
  4. How does component A interact with component B?

When you can answer these, you can change the right place instead of the first place that compiles. Produce a short orientation note (the four framing answers, the one flow traced, the core abstractions, and open questions for maintainers) as the artifact.


See full content at https://github.com/HermeticOrmus/code-comprehension-skills.

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.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.