agentleFS
EzraAppleEzraApple/skills-init/skills/trace-codebase/SKILL.md

trace-codebase

Skill2 starsChanged 4 months agoMITView on GitHub

Use when onboarding to an unfamiliar repository, module, service, feature, or execution path; answering how a subsystem works; mapping architecture before a change; or identifying the exact entrypoints, boundaries, contracts, and files to read first.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    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. Very specific:

    Use systematic-debugging for an active failure needing a causal diagnosis.

    line 14
  2. Very specific:

    Use plan-changes once the task is to choose and sequence modifications.

    line 15
  3. Distinctive:

    Use review skills for evaluating an existing diff.

    line 16
  4. Distinctive:

    Start with cheap discovery:

    line 24
  5. Distinctive:

    If the area is large, select one representative flow and state what is excluded.

    line 32
  6. Distinctive:

    Ask for clarification only when different interpretations would produce materially different maps.

    line 33
  7. Distinctive:

    Follow real code through the relevant stages:

    line 38
  8. Distinctive:

    Read enough surrounding code to distinguish a real boundary from a helper that only forwards data.

    line 56
  9. Distinctive:

    Read git history, issue context, or design docs when they can explain:

    line 61
  10. Distinctive:

    Do not infer intent from authorship or commit age alone.

    line 68
  11. Distinctive:

    Use only sections that help the reader:

    line 86
  12. Distinctive:

    Use a diagram only when three or more moving parts are materially clearer visually.

    line 116
  13. Distinctive:

    Do not silently turn orientation into implementation or redesign.

    line 122

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

Trace Codebase

Produce an evidence-backed map of a subsystem that is smaller than the code explored. Explain the representative flow, ownership boundaries, and change seams without turning the result into an encyclopedia.

Route Nearby Work

  • Use systematic-debugging for an active failure needing a causal diagnosis.
  • Use plan-changes once the task is to choose and sequence modifications.
  • Use review skills for evaluating an existing diff.
  • Answer small factual lookups directly.

Resolve the Scope

Translate the requested area into concrete paths, symbols, routes, commands, or runtime entrypoints.

Start with cheap discovery:

  • repository guidance and package manifests;
  • directory and export structure;
  • named routes, commands, events, schemas, or UI entrypoints;
  • tests and examples that exercise the behavior;
  • direct callers and consumers.

If the area is large, select one representative flow and state what is excluded. Ask for clarification only when different interpretations would produce materially different maps.

Trace a Representative Flow

Follow real code through the relevant stages:

external entry -> validation/auth -> orchestration/domain logic
-> persistence or external side effect -> returned or visible result

Adapt the stages to the system. Capture:

  • where execution starts;
  • the important data shapes and contracts;
  • where decisions and invariants live;
  • state ownership and lifecycle;
  • error and cancellation behavior;
  • persistence, network, queue, filesystem, or process boundaries;
  • configuration, generated code, and feature gates that change behavior;
  • the consumers that constrain safe changes.

Read enough surrounding code to distinguish a real boundary from a helper that only forwards data.

Use History Selectively

Read git history, issue context, or design docs when they can explain:

  • why a surprising boundary exists;
  • whether behavior is a compatibility constraint;
  • where a regression or migration began;
  • which prior approach should be reused or avoided.

Do not infer intent from authorship or commit age alone. Current code is primary evidence for current behavior.

Keep a Provenance Ledger

Classify important claims:

Claim sourceHow to present it
Current code or testCite the path and symbol or line.
Runtime observationName the command, log, trace, or UI state.
Documentation or historyLink or cite the exact source.
InferenceLabel it explicitly and state the supporting evidence.

Preserve conflicts between sources instead of smoothing them into certainty.

Produce the Map

Use only sections that help the reader:

# <Subsystem>

## What It Does
<one compact explanation>

## Boundary Map
<entrypoints, owners, dependencies, and consumers>

## Representative Flow
<step-by-step data and control flow>

## Key Contracts and Invariants
<what callers and maintainers must preserve>

## Failure and State Behavior
<important error, retry, lifecycle, or consistency paths>

## Change Seams
<where likely changes belong and what they affect>

## Read First
1. <path> -- <why>

## Unknowns
<material questions not answered by current evidence>

Use a diagram only when three or more moving parts are materially clearer visually. Use code excerpts only when the exact shape matters; do not satisfy arbitrary diagram or snippet quotas.

Stop at Understanding

Do not silently turn orientation into implementation or redesign. Finish when a new engineer can explain the main flow, name the owning boundaries, and know which files and witnesses matter for the next task.

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.