root-cause-tracing
This skill teaches you to trace bugs backward through the call chain rather than fixing where errors appear. By working systematically up the stack—identifying what called each function and what values were passed—you locate the original trigger and fix the root cause. Includes instrumentation techniques, stack trace analysis, and real examples of finding pollution across test suites.
Root Cause Tracing helps you trace bugs backward through the call stack to find the original trigger instead of fixing symptoms.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-25
Root Cause Tracing helps you trace bugs backward through the call stack to find the original trigger instead of fixing symptoms. This skill teaches you to trace bugs backward through the call chain rather than fixing where errors appear. By working systematically up the stack—identifying what called each function and what values were passed—you locate the original trigger and fix the root cause. Includes instrumentation techniques, stack trace analysis, and real examples of finding pollution across test suites.
Use it when
- root-cause-tracing emphasizes identifying the original source of a bug rather than patching where it manifests.
- root-cause-tracing provides instrumentation and stack trace analysis techniques for errors buried in complex execution chains.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
secondsky/claude-skills/root-cause-tracing · repository language: TypeScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I trace bugs backward through the call stack?
root-cause-tracing teaches you to work systematically upward from where an error appears, examining each function that called the one before it. Start by capturing the full stack trace, then follow the chain backward to identify what values were passed at each level and which function introduced the bad data. This backward tracing reveals the original trigger rather than just the symptom location.
What's the difference between finding root cause vs. fixing symptoms?
root-cause-tracing emphasizes identifying the original source of a bug rather than patching where it manifests. A symptom is where an error appears—often far down the call chain. The root cause is where invalid data originated or logic first went wrong. By tracing backward through the execution chain, you fix the actual problem once, preventing it everywhere, instead of applying band-aids at symptom sites.
How can root-cause-tracing help debug deep errors in code?
root-cause-tracing provides instrumentation and stack trace analysis techniques for errors buried in complex execution chains. Add logging at key points to capture function arguments and return values, then analyze the full trace to see where data became corrupted or logic failed. This systematic approach to analyzing the execution chain makes it possible to locate bug sources even in deeply nested or asynchronous code.
How do I find which test is causing pollution or side effects?
root-cause-tracing includes methods for tracing test pollution by instrumenting your test suite to track state changes and side effects. Capture stack traces when unexpected state modifications occur, then trace backward through the test execution chain to identify which test introduced the pollution. This reveals whether a test is leaking state, modifying shared resources, or leaving behind artifacts that affect other tests.
What instrumentation techniques does root-cause-tracing cover?
root-cause-tracing teaches you to add strategic logging and stack trace capture points throughout your code. Record function entry/exit, argument values, and return values at critical junctures. Use this instrumentation to build a complete picture of the execution chain, making it easier to spot where data went wrong or where control flow deviated from expectations.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Root Cause Tracing
Overview
Bugs often manifest deep in the call stack (git init in wrong directory, file created in wrong location, database opened with wrong path). Your instinct is to fix where the error appears, but that's treating a symptom.
Core principle: Trace backward through the call chain until you find the original trigger, then fix at the source.
When to Use
Use when: - Error happens deep in execution (not at entry point) - Stack trace shows long call chain - Unclear where invalid data originated - Need to find which test/code triggers the problem
The Tracing Process
1. Observe the Symptom
Error: git init failed in ~/project/packages/core
2. Find Immediate Cause
What code directly causes this?
await execFileAsync('git', ['init'], { cwd: projectDir });
3. Ask: What Called
(truncated - see the full file via the links below)
File tree — 1 file
plugins/root-cause-tracing/skills/root-cause-tracing/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Trace bugs backward through call stack to find original trigger”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Root Cause Tracing teaches you to follow bugs backward through the call chain rather than patching where errors appear. The skill walks through tracing methodology, stack instrumentation, and defense-in-depth validation to prevent recurrence.
Root Cause Tracing teaches you to work backward from where an error appears to discover what actually caused it. Rather than patching the symptom, you'll follow the call chain upward, add instrumentation when needed, and identify the source trigger. The skill includes real examples and defense-in-depth strategies to prevent the bug from recurring.
This skill enforces a disciplined debugging methodology that prioritizes root cause discovery over quick patches. Work through four phases—investigation, pattern analysis, hypothesis testing, and implementation—completing each before advancing. The framework prevents the trap of symptom-fixing by requiring evidence gathering across component boundaries and data flow tracing before any fix attempt.
Trace systematically investigates why something happened by generating competing hypotheses and evaluating evidence for and against each one. It's built for ambiguous causal questions—runtime bugs, performance regressions, and architecture issues—where you need to explain the most likely explanation. The skill structures your investigation through observation, hypothesis generation, evidence gathering, and discriminating probes.
This skill enforces a disciplined debugging workflow: gather symptoms and code context, test hypotheses against known patterns, verify your theory before writing any fix, and document findings in a structured report. It prioritizes root cause discovery over quick patches, flagging when investigation stalls so you know when to escalate rather than guess.
Debugging provides a four-phase framework for investigating issues methodically rather than applying random fixes. It combines root cause tracing through call stacks, defense-in-depth validation across system layers, and verification protocols to confirm fixes work before claiming success.