root-cause-tracing

Trace call stacks backward to identify original bug triggers.

9|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/shekohex/dotai --skill root-cause-tracing-shekohex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: root-cause-tracing
Source: https://github.com/shekohex/dotai/tree/main/skills/root-cause-tracing
Command: npx skills add https://github.com/shekohex/dotai --skill root-cause-tracing-shekohex

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 your code's execution, preventing you from fixing only symptoms and ensuring robust solutions.

Core Features & Use Cases

  • Backward Call Stack Tracing: Systematically traces errors backward through the call chain to pinpoint the initial cause.
  • Instrumentation for Debugging: Provides methods to add temporary logging and stack traces when manual tracing is difficult.
  • Polluter Identification: Includes a script to help identify which specific test is causing unwanted side effects or creating files.
  • Use Case: When a git init command fails deep inside a complex test suite, this Skill helps you trace back through the test execution to find the exact test and the specific condition that led to the failure, rather than just patching the git init command itself.

Quick Start

Use the root-cause-tracing skill to find which test is creating a '.git' directory by running the find-polluter script with '.git' as the target and 'src/**/*.test.ts' as the test pattern.

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

Identifying test pollution requires bisection scripts that run against a target file pattern to isolate the specific test causing unwanted side effects. This polluter identification process captures the exact test creating files or unwanted states.

Why does my test fail deep inside the execution chain when the triggering code is elsewhere?

Failures manifesting deep in execution often originate from earlier side effects or polluted state. Backward tracing and dynamic stack trace capture identify the initial trigger and specific conditions that led to the deep failure.

How do I add instrumentation to debug unclear data origins in a complex test suite?

Instrumentation for debugging adds temporary logging and dynamic stack traces when manual tracing is difficult. This captures execution paths and data origins dynamically, revealing the exact conditions creating unwanted files or states.

What is the best way to find which test is creating a '.git' directory in my project?

The best way to find the polluter test is running a bisection script with '.git' as the target and your test file pattern. This systematically isolates the specific test creating the directory rather than patching the failing command itself.