Skip to content

Systematic backward tracing of bugs through the call stack to fix root causes rather than symptoms.

CCM score
61 of 100
skills.sh installs
1.4K
GitHub stars
1.9K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the workflow from observing a deep-stack error to tracing it back to its original trigger
  • Includes a dot-diagram decision guide, a stack-trace instrumentation pattern, and a find-polluter.sh bisection script for test pollution
  • Enforces fixing at the source and adding validation at each layer, not just where the error surfaces
  • Designed for debugging errors that appear far from their cause, such as wrong directories, bad paths, or invalid data

Install

$ npx -y skills add neolabhq/context-engineering-kit --skill root-cause-tracing -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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

digraph when_to_use {
    "Bug appears deep in stack?" [shape=diamond];
    "Can trace backwards?" [shape=diamond];
    "Fix at symptom point" [shape=box];
    "Trace to original trigger" [shape=box];
    "BETTER: Also add defense-in-depth" [shape=box];

    "Bug appears deep in stack?" -> "Can trace backwards?" [label="yes"];
    "Can trace backwards?" -> "Trace to original trigger" [label="yes"];
    "Can trace backwards?" -> "Fix at symptom point" [label="no - dead end"];
    "Trace to original trigger" -> "BETTER: Also add defense-in-depth";
}

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

Details

Repository
github.com/neolabhq/context-engineering-kit
Category
Debugging
First seen
Jun 3, 2026

Questions

What does the root-cause-tracing skill do?

root-cause-tracing traces bugs backward through the call stack until it finds the original trigger, instead of fixing the symptom where the error appears. It adds instrumentation such as stack trace logging when manual tracing is not enough, to find where invalid data or incorrect behavior starts.

How do I install root-cause-tracing?

Run npx -y skills add neolabhq/context-engineering-kit --skill root-cause-tracing -y in your project. After that, root-cause-tracing lets the agent trace deep errors back to their source.

When should I use root-cause-tracing?

Use root-cause-tracing when an error happens deep in execution, the stack trace shows a long call chain, or it is unclear where invalid data came from. It also helps find which test or code path causes a problem.

Which debugging skills are alongside root-cause-tracing in the Debugging category?

In the Debugging category, root-cause-tracing sits alongside diagnosing-bugs, azure-messaging, safe-debug, systematic-debugging and sentry-cli. Root-cause-tracing focuses on working backward from a deep error to its original trigger rather than fixing the symptom.

More from neolabhq/context-engineering-kit

All 62

Similar to Root Cause Tracing

More Debugging