agentleFS
oouooouo/skills/codebase-reader/SKILL.md

codebase-reader

Skill1 starsChanged 3 months agoMITView on GitHub

Use when a user needs a fast, source-grounded orientation to an unfamiliar repository. Finds the real entry and initialization path, traces one representative execution spine, identifies must-read symbols, and gives a reading order. Use a deeper analysis workflow for exhaustive documentation, architecture review, or refactoring.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 13 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep business source, configuration, tests, and dependencies unchanged.

    line 22
  2. Distinctive:

    Use for fast, read-only orientation to an unfamiliar repository or subsystem.

    line 28
  3. Distinctive:

    Use a deeper workflow for exhaustive documentation, review, or implementation.

    line 29
  4. Distinctive:

    Treat documentation as a lead and source as evidence.

    line 40
  5. Distinctive:

    Verify how control enters: executable, framework bootstrap, route, command, worker subscription, callback, public API, or host integration.

    line 48
  6. Distinctive:

    Follow initialization through configuration, dependency assembly, registration, and the handoff to runtime behavior.

    line 50
  7. Very specific:

    When decorators, dependency injection, registries, events, generated code, macros, plugins, runtime boundaries, or concurrency hide an …

    line 52
  8. Distinctive:

    Treat AST calls as candidates, not a runtime call graph.

    line 62
  9. Distinctive:

    Add a failure, retry, concurrency, cancellation, or cleanup branch only when it changes the reader's understanding of this spine or the …

    line 76
  10. Very specific:

    Use Confirmed, Runtime verified, Inferred, or Unknown for material claims.

    line 80
  11. Distinctive:

    Put symbols needed to reconstruct the spine in Must read.

    line 88
  12. Distinctive:

    Put adapters, validation, serialization, storage, and other context in

    line 89
  13. Distinctive:

    Supporting: only when they clarify the spine.

    line 90
  14. Distinctive:

    must-read and supporting units

    line 106
  15. Distinctive:

    Before finishing, verify that every material claim has evidence, the reading order follows execution rather than filenames, and the answer …

    line 116

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

Codebase Reader

Overview

Find the shortest reliable route from “unknown repository” to “I know where to read next.” Trace behavior from source rather than summarizing the README or reciting the file tree.

Keep business source, configuration, tests, and dependencies unchanged. Answer in chat by default. Write a guide only when the user explicitly requests a file. Apply the same process to any language; language names are clues, not a whitelist.

When to Use

Use for fast, read-only orientation to an unfamiliar repository or subsystem. Use a deeper workflow for exhaustive documentation, review, or implementation.

Instructions

1. Frame the Reading Question

  • Infer the user's immediate goal: general orientation, a subsystem, or a named behavior. Use the narrowest scope that answers it.
  • Record the repository root, Git branch and commit when available, dirty state, primary languages, build system, test entry, and likely executable or library entries.
  • Treat documentation as a lead and source as evidence. Record environment variable names and read sites without exposing values.

Completion criterion: the scope and candidate entries are explicit, with gaps marked Unknown.

2. Find the Real Entry and Assembly Path

  • Verify how control enters: executable, framework bootstrap, route, command, worker subscription, callback, public API, or host integration.
  • Follow initialization through configuration, dependency assembly, registration, and the handoff to runtime behavior.
  • When decorators, dependency injection, registries, events, generated code, macros, plugins, runtime boundaries, or concurrency hide an edge, read references/runtime-mechanisms.md.
  • For a Python-heavy scope, optionally run the read-only helper from the skill directory:

    <python-3-interpreter> scripts/python_inventory.py <repository-root> --json

    Treat AST calls as candidates, not a runtime call graph.

Completion criterion: one source-backed entry-to-runtime chain is established; unresolved framework or dynamic edges remain Unknown.

3. Trace One Execution Spine

Trace the representative path most relevant to the question:

trigger -> selection -> core behavior -> state/effects -> return or termination
  • Name each transition and cite its source location.
  • Add a failure, retry, concurrency, cancellation, or cleanup branch only when it changes the reader's understanding of this spine or the user asks for it.
  • Separate imports, type relationships, and static candidates from confirmed runtime invocation.
  • Use Confirmed, Runtime verified, Inferred, or Unknown for material claims. Run only checks already shown to be side-effect free.

Completion criterion: the spine has a trigger, ordered transitions, important state or effects, and a return or termination point.

4. Select the Must-Read Units

  • Put symbols needed to reconstruct the spine in Must read.
  • Put adapters, validation, serialization, storage, and other context in Supporting only when they clarify the spine.
  • For each must-read unit, give its location, current role, upstream trigger, downstream transition, and material state or side effects.
  • Partition a large file by real responsibilities and control transitions. Read the relevant span end to end rather than slicing it by line count.

Completion criterion: a reader can follow the spine using the must-read list without first exploring unrelated modules.

5. Deliver the Reading Map

Answer in Simplified Chinese and preserve code symbols. Default to:

  1. one-paragraph conclusion
  2. real entry and initialization
  3. representative execution spine
  4. must-read and supporting units
  5. recommended source reading order
  6. unknowns that materially limit the explanation

Include state, side effects, failure, concurrency, or lifecycle as compact subsections only when they matter to the traced path. If the user explicitly requests a persistent or fuller guide, read references/report-format.md and write only that report.

Before finishing, verify that every material claim has evidence, the reading order follows execution rather than filenames, and the answer contains current behavior rather than redesign or refactoring advice.

Completion criterion: deliver a concise source-backed route without changing repository files.

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.