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.
In this repository8 other files it gives its agents.
- adversarial-reviewSkill
- interface-reviewSkill
- outcome-first-workflowsSkill
- plan-changesSkill
- repo-automationsSkill
- simplifySkill
- systematic-debuggingSkill
- writing-skillsSkill
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
- Very specific: line 14
Use systematic-debugging for an active failure needing a causal diagnosis.
- Very specific: line 15
Use plan-changes once the task is to choose and sequence modifications.
- Distinctive: line 16
Use review skills for evaluating an existing diff.
- Distinctive: line 24
Start with cheap discovery:
- Distinctive: line 32
If the area is large, select one representative flow and state what is excluded.
- Distinctive: line 33
Ask for clarification only when different interpretations would produce materially different maps.
- Distinctive: line 38
Follow real code through the relevant stages:
- Distinctive: line 56
Read enough surrounding code to distinguish a real boundary from a helper that only forwards data.
- Distinctive: line 61
Read git history, issue context, or design docs when they can explain:
- Distinctive: line 68
Do not infer intent from authorship or commit age alone.
- Distinctive: line 86
Use only sections that help the reader:
- Distinctive: line 116
Use a diagram only when three or more moving parts are materially clearer visually.
- Distinctive: line 122
Do not silently turn orientation into implementation or redesign.
≈ “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.
Files
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-debuggingfor an active failure needing a causal diagnosis. - Use
plan-changesonce 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 resultAdapt 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 source | How to present it |
| Current code or test | Cite the path and symbol or line. |
| Runtime observation | Name the command, log, trace, or UI state. |
| Documentation or history | Link or cite the exact source. |
| Inference | Label 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.
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.

