root-cause-tracing

Trace bugs backward through the call stack to identify original triggers.

Updated Jan 19, 2026
One-click install
npx skills add https://github.com/KanuToCL/SonoTag --skill root-cause-tracing-kanutocl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: root-cause-tracing
Source: https://github.com/KanuToCL/SonoTag/tree/main/.claude/skills/root-cause-tracing
Command: npx skills add https://github.com/KanuToCL/SonoTag --skill root-cause-tracing-kanutocl

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you find the original trigger for bugs that appear deep within a program's execution, preventing superficial fixes and ensuring robust solutions.

Core Features & Use Cases

  • Backward Call Stack Tracing: Systematically moves up the call stack to identify the originating function or test case.
  • Instrumentation for Visibility: Adds targeted logging and stack traces when manual tracing is insufficient.
  • Polluter Detection: Utilizes a bisection script to pinpoint specific tests that introduce unwanted side effects.
  • Use Case: When a test fails with an error like "git init failed in /Users/jesse/project/packages/core", this Skill helps trace back through the execution to find that the projectDir variable was unexpectedly empty, leading to the incorrect operation.

Quick Start

Use the root-cause-tracing skill to find which test creates the '.git' directory by running './find-polluter.sh .git "src/**/*.test.ts"'.

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 bugs backward through the call stack to find the original trigger?

To trace bugs backward through the call stack, you systematically move up the execution flow to identify the originating function or test case that introduced invalid data. This method prevents superficial fixes by pinpointing the exact root cause of execution errors.

How do I find which test introduces unwanted side effects using a bisection script?

You can find polluter tests by running a bisection script like './find-polluter.sh .git "src/**/*.test.ts"'. This script isolates specific tests that introduce unwanted side effects, such as creating unexpected directories or modifying shared state during execution.

What is the best way to debug errors that manifest deep within program execution?

The best way to debug deep execution errors is adding targeted instrumentation and capturing stack traces. When manual tracing is insufficient, this instrumentation provides visibility into the execution flow to locate where invalid data originates.

Do I need to understand execution flow to use root cause analysis for debugging?

Yes, root cause analysis requires an understanding of execution flow and debugging techniques. This prerequisite knowledge is essential for systematically moving up the call stack and interpreting stack traces to locate the source of incorrect behavior.

When should I use bisection scripts instead of manual call stack tracing?

You should use bisection scripts when manual tracing is insufficient to detect polluter tests that introduce unwanted side effects. This approach systematically isolates the specific test case responsible for invalid data by narrowing down the execution sequence.