code-trace
Skill1 starsChanged 31 days agoMITView on GitHub
Stress-test a design by writing a runtime trace instead of a diagram - start at one entry point and, at every key call, paste the callee's body inline and keep going into it. The discipline is that every hop must name the argument it passes and the value it returns, so hand-waving about context cannot survive it. Reach for it when the hard part is what gets passed where - a context, state or request object crossing stages, orchestrators, services, pipelines or middleware - when you suspect a sequence is written more than once across callers, or when a diagram stays vague because the seam is in the plumbing, not the boxes. Used well it turns "the pipeline handles it" into a named value, a named owner and a named seam.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- hmj1026/dhpktheir own version, first seen Nov 6, 2026
- lablup/backend.aitheir own version, first seen Oct 8, 2026
- laststance/skillstheir own version, first seen Sep 21, 2026
- matthewschanzlin/claude-skillstheir own version, first seen Jun 18, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- lablup/backend.ai★ 679same name
- hmj1026/dhpk★ 2same name
- laststance/skills★ 1same name
- matthewschanzlin/claude-skills★ 0same 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 repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- command-authoringSkill
- dass-reportSkill
- dass-testSkill
- equipSkill
- grillingSkill
- idea-to-ticketSkill
- lua-ui-controlsSkill
- rival-reconSkill
- skill-authoringSkill
- tool-authoringSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
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
- Distinctive: line 23
Not for: pure data modelling (types with no flow), UI layout, single-function logic, or anything where a signature already tells the whole …
- Distinctive: line 33
Write the entry point as it really is: real type names, real signatures, minimal bodies.
- Distinctive: line 41
Keep the repo's real names.
- Distinctive: line 49
Write every remaining scenario as a diff from the traced one - only the lines that change.
- Distinctive: line 55
Done when: every key call on the traced path is expanded to a leaf, the value flow is noted at every hop, the other paths are written as …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code trace
A trace is the code as the machine executes it: start at one entry point, and every time execution reaches a key function, stop and paste that function's body inline, in place, then keep going into it. It is a debugger's step into, written down. The output is not a diagram, a call graph, or pseudocode that gestures at the seams - it is one linear walk in which every hop must name exactly what it passes and what comes back.
Why it works: a diagram lets you draw a box and hand-wave what is inside the arrows. A trace forbids it - the moment you must write the argument at the call site, the hand-waving dies.
When to reach for it
- the hard part of the design is what gets passed where - a context, state, environment or request object crossing stages, orchestrators, services, middleware, pipeline stages, decorators;
- you suspect the same sequence is written more than once across callers and want it side by side;
- a diagram stays vague because the seam is in the plumbing, not in the boxes;
- you are designing or reviewing before implementing and want to cheaply falsify the shape;
- a collaborator is handed "everything" and you want to see exactly what it uses.
Not for: pure data modelling (types with no flow), UI layout, single-function logic, or anything where a signature already tells the whole story.
The method
1. One scenario, not all of them
Pick the single most complete path through the system - the one that touches the most stages. Trace that one. Every other path is a diff against it (step 5).
2. Start at the entry, in real code
Write the entry point as it really is: real type names, real signatures, minimal bodies. Build the objects the walk needs the way the code builds them.
3. Expand at every key call
At each call to a collaborator, stop and paste the callee's body inline, indented and marked as an expansion, then keep going inside it. Recurse until you reach a leaf that does real work (the logic itself, a loop, an I/O call).
- A "key" call is anything that could hide a seam: a service, a stage, an orchestrator, a wrapper, a template method, a callback.
- Never write
await service.DoStuff()and move on - that is the one thing the technique exists to prevent. - Keep the repo's real names; invent nothing.
4. Follow the values, not only the calls
Expanding forces every call site to name its arguments. As you write them down, keep a running note of the value flow: which value is born where, which hop carries it, which hop mutates it, and which hop recomputes something an earlier hop already had. Control flow is what a diagram draws; value flow is what the trace adds, and it is where the friction usually hides - a hop that rebuilds a value instead of receiving it, or a collaborator handed more than its body consumes.
5. Diff the other paths
Write every remaining scenario as a diff from the traced one - only the lines that change. If two paths differ by a flag rather than a line, say so out loud: that flag is a decision to revisit.
6. Read it back and name what it exposed
The payoff is the list the trace forces you to write down - the deliverable is the findings, not the code. Findings are always about owners and boundaries: who holds a value, who is handed it, and which hop is the only one that should have known. Write them down; a worked set is in EXAMPLE.md.
Done when: every key call on the traced path is expanded to a leaf, the value flow is noted at every hop, the other paths are written as diffs, and the findings are written down.
What bites
- Stopping at the first abstraction.
await pipeline.Run()with no expansion is a diagram wearing code's clothes. - Tracing all paths at once. It bloats and hides the shape. One path, then diffs.
- Inventing types. Fake names let fake seams survive. Use the ones already in the repo.
- Keeping the trace as an artifact. It is disposable; when a decision changes, redraw it - cheaper than maintaining it.
- Skipping the value flow. The code alone is not the payload; what crosses each hop is.
Neighbours
- Stress-testing the decisions themselves: the
grillingskill. - Deep-module seams and testability vocabulary: the
codebase-designskill. - Settling the words the trace speaks in: the
domain-modelingskill. - A worked trace, and the findings it forced: EXAMPLE.md.
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.

