Agent skill · personamanagmentlayer

debugging-workflow

Find the cause of a defect by hypothesis and bisection rather than by guessing, then fix it behind a regression test. Use when the user reports a bug, a crash, a test that fails intermittently, a performance regression or a production incident, asks why code behaves unexpectedly, or when the task involves reproducing a failure, isolating a root cause, git bisect, flaky tests, or reading a stack trace.

What it needs

About 6k tokens when loaded.

What this skill does

Debugging Workflow Debugging is a search over hypotheses, not an inspection of code. The fastest route to a cause is a sequence of experiments that each halve the space of possible explanations. When to Use This Skill A defect has been reported and the cause is unknown A test fails intermittently Behaviour differs between environments A performance or memory regression appeared Something worked before and does not now The user asks "why does this happen?" about running code If the cause is already known, skip this and fix it. This procedure is for the case where you do not yet know. Core Concepts Reproduce Before Reading Until you can make the failure happen on demand, you cannot tell a fix from a coincidence. A reliable reproduction is the single highest-value artefact in debugging, and it is worth spending real time on. Everything after it is faster. Hypothesis, Prediction, Experiment Each step states a hypothesis, predicts an observable consequence, and runs the cheapest experiment that would refute it. Refutation is the goal: a test that can only confirm teaches nothing. Hypothesis: the cache returns a stale tenant after a failover. Prediction: the returned object's tenantid differs from the request's. Experiment: log both at the cache boundary for one request. Bisection Halve the search space rather than walking it. Bisect over commits (git bisect), over input (shrink the failing payload), over the stack (which layer still sees correct data), or over configuration (which flag flips it). Cause, Not Symptom The first explanation that makes the symptom disappear is usually not the cause. Keep asking what produced the state you found, until the answer is a decision someone made rather than a value that was wrong. The Workflow 1. Capture the report precisely What was expected, what happened, and the exact context: version, environment, input, timestamp, user. Vague reports cost more than they save. Get the trace or correlation id if there is one. 2. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills personamanagmentlayer/debugging-workflow

View the source on GitHub

Browse the @skills marketplace