Root Cause Tracing

Trace bugs backward through call stacks to identify original trigger points.

Updated Aug 6, 2025
One-click install
npx skills add https://github.com/flosrn/.claude --skill root-cause-tracing-flosrn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Root Cause Tracing
Source: https://github.com/flosrn/.claude/tree/main/skills/debugging/root-cause-tracing
Command: npx skills add https://github.com/flosrn/.claude --skill root-cause-tracing-flosrn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers systematically identify the original source of bugs that manifest deep within a program's execution, rather than just fixing the symptom where the error appears.

Core Features & Use Cases

  • Backward Call Stack Tracing: Follows execution paths backward to pinpoint the initial trigger of an error.
  • Instrumentation for Debugging: Provides methods to add logging and stack traces to aid in tracing complex issues.
  • Polluter Identification: Includes a script to help find which test case is causing unintended side effects or pollution.
  • Use Case: When a git init command fails deep within a test suite, this Skill guides you to trace back through the test execution to find which test setup incorrectly provided an empty directory path, causing the failure.

Quick Start

Use the root cause tracing skill to find the original trigger for the error 'git init failed in /Users/jesse/project/packages/core'.

Frequently Asked Questions about Root Cause Tracing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trace a bug back to its origin using a call stack?

To trace a bug to its origin using a call stack, systematically trace execution paths backward to pinpoint the initial trigger. This requires manual code instrumentation with console logging and stack trace capture to map deep execution chains.

What is the best way to find which test case is causing test pollution?

The best way to find test pollution is using a bisection script to identify polluter tests. This script systematically narrows down the test suite execution to locate the specific test setup causing unintended side effects.

How do I debug errors that only manifest deep within a long execution chain?

Debug errors in long execution chains by performing backward call stack tracing to locate the original trigger point. This approach identifies the root cause rather than simply fixing the symptom where the error appears.

When do I need backward tracing instead of standard debugging?

Backward tracing is needed when a complex error manifests deep within program execution but the original trigger point is elsewhere. It is specifically applicable for debugging complex errors in long execution chains and identifying test pollution.

Does root cause tracing require manual code instrumentation?

Yes, root cause tracing requires manual code instrumentation. Developers must add console logging and stack trace capture alongside running a bisection script to systematically follow execution paths backward to the bug's source.