root-cause-tracing

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

Updated Jan 9, 2026
One-click install
npx skills add https://github.com/maplin-co/ai-course --skill root-cause-tracing-maplin-co
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: root-cause-tracing
Source: https://github.com/maplin-co/ai-course/tree/main/.opencode/skill/root-cause-tracing
Command: npx skills add https://github.com/maplin-co/ai-course --skill root-cause-tracing-maplin-co

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you systematically debug issues that manifest deep within a program's execution by tracing errors back to their original trigger point, rather than just fixing the symptom.

Core Features & Use Cases

  • Backward Call Stack Tracing: Follows the execution path in reverse to pinpoint the origin of bugs.
  • Instrumentation for Debugging: Provides methods to add logging and stack traces when manual tracing is difficult.
  • Test Pollution Identification: Includes a script to find which specific test is causing unintended side effects or state pollution.
  • Use Case: When a git init command fails deep within a complex test suite, this skill helps you trace back through the test execution to find which test case incorrectly set up the environment, leading to the failure.

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 an error back to its original trigger point in the call stack?

You trace bugs backward through the call stack to identify the original trigger of errors that appear deep in execution, pinpointing the root cause instead of just addressing the surface symptom.

How can I find which test is causing state pollution in my test suite?

You can find which test is causing state pollution by running a bisection script that identifies the specific test cases responsible for unwanted side effects, such as incorrectly setting up environment directories.

What is the best way to debug a command failure deep within a complex test execution?

The best way to debug a deep execution failure is to add instrumentation like stack traces and logging to aid in debugging complex code paths when manual tracing becomes difficult.

Can I use a script to identify which test creates a specific directory like .git?

Yes, you can run a find-polluter script with the target directory name and a test file pattern to identify the specific test case incorrectly setting up the environment and causing the failure.

When should I add instrumentation like logging instead of manually tracing execution?

You should add instrumentation like logging and stack traces when manual tracing is difficult, allowing you to systematically trace bugs backward through complex code paths to their origin.