trace
Skill0 starsChanged 18 days agoMITView on GitHub
Trace why, with evidence on every step. Two modes. Rationale: why code is shaped this way, what tradeoff or incident produced a guard, retry, flag or threshold, from git, PRs, tickets, docs, chat and monitoring. Root cause: Five Whys from a symptom (a bug, an incident, a flaky pipeline, a slow deploy) down to the systemic cause, with branches for split causes. Every link is cited and tiered (direct, supported, inferred, speculative), then double-checked: backward read, counterfactual, falsification, timeline, a competing chain, and the human-error rule. Proposes fixes for root causes, never applies them. Read-only. Use for 'why does X work this way', 'why did we pick Y', 'is this guard still needed', 'why did this happen', 'root cause', 'five whys', 'postmortem', or 'why does this keep failing'. Not for how code runs today (codebase-learner), or reproducing a live failure's mechanism (verify).
27 other projects use a version of this.
Adopted by
Most recently taken up by
- thoughtbot/rails-consultanttheir own version, first seen Nov 8, 2026
- Yeachan-Heo/oh-my-claudecodetheir own version, first seen Nov 8, 2026
- myths-labs/musetheir own version, first seen Nov 6, 2026
- lza6/claw-code-tingfengtheir own version, first seen Nov 1, 2026
- RoleModel/skillstheir own version, first seen Nov 1, 2026
- ziweiCai123/claude-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use ai-slop-cleaner, ralplan and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Jurel89Skillai-slop-cleaner
Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode
Also in 4 projects that use this
ibahgatSkillralplan
Create a strict, quality-first execution plan with explicit gates and rollback-ready sequencing.
Also in 4 projects that use this
woosikkimSkilldeepinit
Generate hierarchical AGENTS.md codebase maps for agent context
Also in 3 projects that use this
klauswgSkilldeep-interview
在明确批准执行之前,通过数学化歧义门控进行苏格拉底式深度访谈
Also in 4 projects that use this
AWSSkillmap
Map verified service capabilities against customer-provided control framework and threat model. Produces mapping-results.json, controls-catalog.md, and framework-mapping.md. Supports pluggable frameworks: CCMv4, NIST 800-53, CIS Benchmarks, ISO 27001, etc. Split into 4 focused sub-skills for better accuracy; this skill orchestrates them.
Also in 4 projects that use this
buddyhSkilldeep-dive
Deep dive on any topic. Decomposes into subtopics, researches each in parallel with thorough source gathering, then synthesizes into a comprehensive report (4,000-10,000+ words, 40-100+ sources). Scales depth dynamically based on topic complexity. Use when asked for a deep dive, deep research, comprehensive analysis, or thorough investigation of a topic.
Also in 3 projects that use this
Other versions27 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 27
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- zereight/gitlab-mcp★ 2.1ksame name
- ai-analyst-lab/ai-analyst★ 304same name
- Soul-Brews-Studio/arra-oracle-skills-cli★ 121same name
- unlearndev/skills★ 101same name
- petrowsky/agentic-fm★ 96same name
- simota/agent-skills★ 96same name
- mbwsims/claude-universe★ 71same name
- myths-labs/muse★ 38same name
17 more not listed
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 repository57 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/comments.mdcCursor rule
- .cursor/rules/commit-messages.mdcCursor rule
- .cursor/rules/git-workflow.mdcCursor rule
- .cursor/rules/manage-stack.mdcCursor rule
- .cursor/rules/no-worktrees.mdcCursor rule
- manage-stackSkill
- convert-as-skillSkill
- create-agentSkill
- create-agents-mdSkill
- create-commandSkill
- create-hookSkill
- create-ruleSkill
- create-skillSkill
- retrospectiveSkill
- super-architectureSkill
- super-cachingSkill
- super-elixirSkill
- super-nodejsSkill
- super-protobufSkill
- super-tech-blueprintSkill
- atomic-semantic-commitSkill
- code-reviewSkill
- create-bruno-collectionSkill
- create-documentationSkill
- create-ticketsSkill
- ready-specSkill
- write-adrSkill
- write-changelogSkill
- write-mr-descriptionSkill
- write-planSkill
- write-postmortemSkill
- write-runbookSkill
- noslopSkill
- output-saversSkill
- safe-refactorSkill
- tddSkill
- verifySkill
- get-movingSkill
- later-listSkill
- standupSkill
- challenge-meSkill
- codebase-learnerSkill
- researchSkill
- second-opinionSkill
- color-kitSkill
- design-system-kitSkill
- diagramSkill
- infographicSkill
- product-polish-workflowSkill
- prototype-wireframeSkill
- ui-ux-kitSkill
- evidenceSkill
- find-skillsSkill
- handoffSkill
- rumblingSkill
- use-levistackSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 11 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
If the words fit both, ask one question: "Q1.
- Distinctive: line 47
Read-only: Do not change code, data or external systems.
- Distinctive: line 51
The user's guess is a candidate: Check it like any other hypothesis.
- Distinctive: line 52
Double-check before you conclude: Run cause-checks.md on every chain, and its backward-read, counterfactual and timeline checks on every …
- Very specific: line 62
Use general-purpose, not a read-only agent such as explorer.
- Distinctive: line 64
No subagents in this host?
- Distinctive: line 72
If the target is vague, make your best guess from the conversation, state it in one line so the user can redirect, and go on.
- Distinctive: line 140
Only with a written reason that goes into Sources consulted: no server for that category is available (a gap, not a choice), or the source …
- Distinctive: line 160
Run every check in cause-checks.md on every chain: backward read, counterfactual, falsification, timeline, competing chain, human-error …
- Distinctive: line 161
Stop at a systemic cause in the team's control: missing validation, docs, process, automation, test or alert.
- Distinctive: line 177
One cause for a split problem: If the counterfactual fails, there is another branch.
- Distinctive: line 178
A tidy story over the evidence: If two sources disagree, both stay in the output.
“Common” is measured: kept by at least 6 in 10 of the 23 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
Trace
Trace a "why" to its source, and prove every step. Code shows what it does, not why it exists or why it broke. The why lives in commits, PRs, tickets, docs, chat, logs and dashboards, and all of them are partial. This skill gathers that evidence, builds the chain, and checks the chain before anyone acts on it.
The rationale mode is adapted from pstack's why (MIT, Lauren Tan).
Pick the mode
| The user asks… | Mode | Load |
| Why is the code like this, why did we pick Y, what tradeoff, where did this number come from, is this guard still needed | rationale | epistemics.md, investigator-prompt.md, synthesizer-prompt.md |
| Why did this happen, root cause, five whys, postmortem, why does this keep failing, why is this slow | root-cause | root-cause.md, cause-checks.md, epistemics.md, examples in root-cause-examples.md |
| An incident hit defensive code, or a fix wants to remove a guard | root-cause, then rationale | both. Finish the cause chain, then trace why the guard existed before anyone deletes it |
If the words fit both, ask one question: "Q1. Do you want why the code is shaped this way, or why this problem happened? Recommended: <the one the message leans toward>."
Hard rules (both modes)
- Read-only. Do not change code, data or external systems. Investigators and the synthesizer get the same rule in their brief. Check
git statusafter they return. - Every claim has a tier. Direct, Supported, Inferred, Speculative or Unknown, from epistemics.md. The tier sets the wording.
- Code is not evidence of its own intent. "It retries three times, so the author wanted three retries" is mechanics, not motivation.
- Document the null. An empty search is a finding. Name what was searched.
- The user's guess is a candidate. Check it like any other hypothesis.
- Double-check before you conclude. Run cause-checks.md on every chain, and its backward-read, counterfactual and timeline checks on every rationale claim marked Supported or higher.
Subagents
| Role | Spawn | Model |
| Investigator (one per evidence category) | general-purpose | omit model to use the session model, or sonnet for a cheap source |
| Synthesizer | general-purpose | opus |
| Live reproduction (root-cause, Why 1 not confirmed) | run verify in investigate-first mode | session model |
Use general-purpose, not a read-only agent such as explorer. Investigators and the synthesizer need the session's MCP servers. Every brief says "do not write files, commit, post, or change external state".
No subagents in this host? Run each investigation yourself, one source at a time, then synthesize with the same template.
Step 1. Understand the target and the question
Rationale: the target is a chunk of code, a pattern, a feature or a named decision. The question is a rationale, a tradeoff, a motivating edge case, an external constraint, dead code, or a history sweep.
Root cause: the target is a symptom. Write the problem block from root-cause.md: what, where, when, impact, evidence.
If the target is vague, make your best guess from the conversation, state it in one line so the user can redirect, and go on.
Step 2. Establish the anchor
Build the seed context yourself before spawning anyone.
Code anchor (both modes): file paths and line ranges, key symbols, the commits that touched them, PR or MR numbers and ticket ids.
git blame -w -C -L <start>,<end> <file> # last-touch commits, through moves
git log --follow -p -- <file> # full history through renames
git log -S '<exact string>' -- <file> # commits that added or removed it
git log --format='%h %ad %s' --date=iso -- <file> # dated history for the timeline check
gh pr view <number> --json title,body,author,createdAt,mergedAt,labels,closingIssuesReferences,comments,reviews
glab mr view <number> --comments # GitLabIncident anchor (root cause): first-seen time, deploys and config changes in the window before it, the error group or alert id, and the incident doc or channel.
This anchor goes to every investigator and to the synthesizer.
Step 3. Spawn parallel investigators
Default to the full parallel investigation. The goal is a complete coverage map, not a minimal one.
Discovery
List the MCP servers this session can use. In Claude Code they are tools named mcp__<server>__<tool>, loaded or listed as deferred tools. A server the session reports as "failed to connect" counts as unavailable: name it as a gap, and tell the user it failed to connect.
Map each available server to one evidence category:
- Source control history (always available through git and
ghorglab) - Issue or ticket tracker
- Long-form documents (inline docs in the repo are always available)
- Real-time team chat
- Infrastructure observability
- Error or exception tracking
- Product analytics warehouse
- Deploy and CI history
- Runtime platform (cluster state, config, feature flags)
- Live data (databases, event streams, read-only API calls)
- Customers and support
Not every category needs an MCP server. Some are reached with a CLI the user already has (kubectl, glab, gcloud, psql). Check that the CLI exists and is logged in before you count the category as available. Categories 9 and 10 touch running systems: confirm the environment, and ask the user before you query production.
Spawn one investigator per category that has a matching server, all in one message, each owning exactly one source. Each prompt is investigator-prompt.md filled in, plus:
- the playbook for the tool it owns,
references/sources/<tool>.md, picked from the index inreferences/source-playbook.md(25 playbooks across the 11 categories). Two tools in one category get two investigators. references/sources/incident-postmortem.mdwhen the target looks defensive, and always in root-cause mode- the anchor and the user's question
- in root-cause mode, the current chain so far, so the investigator looks for evidence for or against each link
What each category is best at
- Source control (git, GitHub PRs, GitLab MRs): rationale captured in review. The commit that introduced a bug. Always spawn.
- Issue or ticket tracker (Jira, Linear, GitHub or GitLab issues): the product or business forcing function. The bug report and its history.
- Long-form documents (Confluence, Google Docs, Notion, Lark Docs, inline docs and ADRs): design rationale written before the code. Postmortems. Runbooks.
- Real-time team chat (Slack, Lark): decisions that never reached a doc. What people saw during an incident.
- Infrastructure observability (Grafana, Datadog, logs): the runtime reality: latency, saturation, the incident timeline, the first error line.
- Error or exception tracking (Sentry and similar): the exact exceptions, their first-seen time and their spread.
- Product analytics warehouse (BigQuery, Snowflake, MaxCompute, Databricks): the data behind thresholds, flags and experiments. How many users were hit.
- Deploy and CI history (pipelines, Argo CD, release tags): when the code really shipped, and what else shipped with it. The backbone of the timeline check.
- Runtime platform (kubectl, Lens, k9s, flag services, config stores): restarts, OOM kills, rollout revisions, a flag flipped with no deploy.
- Live data (databases, Kafka and queues, read-only API calls): the actual state of records, lag, dead letters. Ask first.
- Customers and support (Zendesk, Salesforce, support queues in Lark Base): the first report and the real impact, often before any alert.
When to skip an investigator
Only with a written reason that goes into Sources consulted: no server for that category is available (a gap, not a choice), or the source is provably irrelevant, not just probably.
Step 4. Analyze
Rationale mode
Spawn one synthesizer with every investigator's findings (empty and skipped ones too), the anchor, the question, epistemics.md and synthesizer-prompt.md. Ask it for two extra parts:
- Decision timeline: each shaping commit, PR, ticket or incident in date order, so accretion is visible.
- Forces: the constraints behind the shape, grouped as product, data, infrastructure, team or process, and external (a partner, a law, a library).
Then double-check the synthesis yourself: for each Supported or Direct claim, run the backward read, the counterfactual ("would this code exist without that force?") and the timeline check from cause-checks.md. Downgrade any claim that fails.
Root-cause mode
Follow root-cause.md:
- Pin Why 1 with proof. A live failure with no confirmed mechanism goes to
verify(investigate-first) first. - Build the chain, one link per why, each with evidence and a tier.
DEPTHdefaults to 5 but is a guide. - Branch when a why has more than one cause. Mark causes as necessary, independent or contributing.
- Run every check in cause-checks.md on every chain: backward read, counterfactual, falsification, timeline, competing chain, human-error rule, scope, and the shared-assumption check when earlier fixes failed.
- Stop at a systemic cause in the team's control: missing validation, docs, process, automation, test or alert. Never at "human error", "a third party failed" or "bad luck".
- Propose a fix per root cause, with containment labeled separately, how to verify, and what to watch for recurrence.
A synthesizer is optional here. Spawn one when four or more investigators returned, and give it root-cause.md as the output template.
Step 5. Present
Present the result. You may edit lightly for clarity, but do not rewrite the confidence language.
- Rationale: the structure in synthesizer-prompt.md: The Question, The Code in Question, What We Found, What We Can Reasonably Infer, Competing Hypotheses, What We Don't Know, Sources Consulted, Confidence Summary. Add the Decision timeline and Forces. If the user will change this code next, end with a Preserve / Change / Avoid / Risk set.
- Root cause: the output block in root-cause.md: Problem, Cause chain, Root cause(s), Checks, Fixes, What we don't know, Sources consulted.
Common failure modes
- Recency bias. Treating the latest commit as the whole story. The current shape is often many decisions stacked up.
- Stopping at a symptom. "Missing index" is a detail. Why could it ship?
- One cause for a split problem. If the counterfactual fails, there is another branch.
- A tidy story over the evidence. If two sources disagree, both stay in the output.
- Blaming a person. Human error is where the digging starts, not where it ends.
- Deleting a guard because no reason was found. Report it as unknown. The user decides.
Related skills
codebase-learner: the user needs how the code runs today, not why.verify: reproduce and confirm the mechanism of a live failure (Why 1) before the chain.second-opinion: the history explains a guard a reviewer wants to remove.tddorsafe-refactor: carry out a root-cause fix the user chose.ready-spec: the constraints are known and the change needs a plan.challenge-me: the user wants to test whether an old decision still holds.
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.

