Not loaded · from dev
Guides disciplined debugging for hard bugs and performance regressions using a structured loop: reproduce, minimise, hypothesise, instrument, fix, and regression-test.
Claude Code won't load this skill
It ships in dev at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Build the feedback loop first — without one, every subsequent phase is mechanical guesswork.
When exploring the codebase, use the project's domain glossary to get a clear mental model of the relevant modules, and check ADRs in the area you're touching.
This is the skill. Do not move on without one. A fast, deterministic, agent-runnable pass/fail signal makes every later phase mechanical. Without one, no amount of staring at code will save you.
Be aggressive. Be creative. Refuse to give up. Spend disproportionate effort here.
Try the 10 construction strategies in <supporting-info> in roughly that order. Once you have a loop, iterate on it as a product:
For non-deterministic bugs the goal is a higher reproduction rate, not a clean repro. Loop the trigger 100×, parallelise, add stress, narrow timing windows. 50% flake is debuggable; 1% is not.
Do not proceed to Phase 2 until you have a loop you believe in. If you genuinely cannot build one, stop and tell the user what you tried; ask for environment access, a captured artifact, or permission to add temporary production instrumentation.
Run the loop. Watch the bug appear. Confirm all three:
Do not proceed until you reproduce the bug.
First, recall past root causes (optional — only if the memory plugin is installed; see Memory recall in <supporting-info>). A symptom you're seeing now may have a documented root cause from a previous diagnosis — recalling it pre-seeds the hypothesis list with battle-tested candidates instead of starting cold. Best-effort: if memory is absent, skip silently and hypothesise as usual.
Generate 3–5 ranked hypotheses before testing any of them. Single-hypothesis generation anchors on the first plausible idea. Fold any recalled root cause in as a candidate — but still verify it against this repro; a past cause is a lead, not a verdict.
Each hypothesis must be falsifiable:
Format: "If <X> is the cause, then <changing Y> will make the bug disappear / <changing Z> will make it worse."
If you can't state the prediction, the hypothesis is a vibe — discard or sharpen it.
Show the ranked list to the user before testing. They often have domain knowledge that re-ranks instantly ("we just deployed a change to #3") or know hypotheses they've already ruled out. Cheap checkpoint, big time saver. Don't block on it if the user is AFK — proceed with your ranking.
Each probe maps to a specific prediction from Phase 3. Change one variable at a time.
Tool preference, in order:
Tag every debug log with a unique prefix, e.g. [DEBUG-a4f2]. Cleanup becomes a single grep. Untagged logs survive; tagged logs die.
Perf branch. For performance regressions, logs are usually wrong. Establish a baseline measurement (timing harness, performance.now(), profiler, query plan), then bisect. Measure first, fix second.
Write the regression test before the fix — but only if a correct seam exists. A correct seam exercises the real bug pattern as it occurs at the call site. A too-shallow seam (single-caller unit test when the bug needs the multi-caller chain) gives false confidence.
If no correct seam exists, that itself is the finding. Note it explicitly. The codebase architecture is preventing the bug from being locked down — flag for Phase 6.
If a correct seam exists:
Required before declaring done — every box:
[DEBUG-...] instrumentation removed (grep the prefix)memory is installed, store the root cause + fix so the next diagnosis recalls it in Phase 3: /memory:store <symptom → root cause → fix> (optional — skip silently if the plugin is absent)Then ask: what would have prevented this bug? If the answer involves architectural change (no good test seam, tangled callers, hidden coupling), hand off to /improve-codebase-architecture with the specifics. Make the recommendation after the fix is in, not before — you have more information now than when you started.
[DEBUG-...] instrumentation in the final diffTry in roughly this order. Stop at the first one that gives you a fast, deterministic pass/fail signal.
boot at state X, check, repeat so you can git bisect run itred-skills-resource run plugins/dev/skills/engineering/diagnose/scripts/hitl-loop.template.sh so the loop is still structured. Captured output feeds back to youBuild the right feedback loop and the bug is 90% fixed.
A 30-second flaky loop is barely better than no loop. A 2-second deterministic loop is a debugging superpower.
Stop and say so explicitly. List what you tried. Ask the user for one of:
Do not proceed to hypothesise without a loop.
memory plugin is installed)memory is a sibling plugin that, when present, holds root causes from past diagnoses. Recalling at the top of Phase 3 means a recurring or related bug arrives with its previously-found cause already on the table — the single biggest accelerator for "we've seen this before". Best-effort, never a gate: if memory is not installed, skip it and diagnose exactly as today.
if { [ -f .red/config.yaml ] && grep -qE '^[[:space:]]+memory:' .red/config.yaml; } || [ -f .red/memory/config.json ]; then
_bridge="$(red-skills-resource path plugins/dev/scripts/memory-bridge.sh 2>/dev/null)"
[ -f "$_bridge" ] && source "$_bridge" \
&& MEMORY_REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" \
memory_recall . "<2–6 keywords from the symptom / error / module>"
fi
memory_recall prints a ranked block or nothing and always exits 0 — a missing or erroring memory never derails the diagnosis. Each hit is a claim made at store time: verify it against the current repro before promoting it up your hypothesis ranking. An empty result means "nothing stored", not "novel bug". Close the loop in Phase 6 by storing this diagnosis's root cause so the next one recalls it.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub reddb-io/red-skills --plugin dev59 skills in this plugin
/adr-editorProposal-driven reverse grill for the active `.red/adr/` collection. Ranks active ADR clusters, recommends where to start, confronts one cluster with current implementation evidence, and applies maintainer-approved dispositions through the full ADR verb set. Use to review, curate, reorganise, fix, or extend ADRs and to pay down accumulated decision debt./afkAutonomous loop that drains the `ready-for-agent` queue on the issue tracker. Registers the project with the `redskilled` daemon at a runner and a target width, arms the drain, and observes; the daemon admits each Worker, which claims an issue, works it in its own workspace, validates, lands, and closes. Use when the user wants to run AFK execution, drain a Spec, hammer specific issues, or otherwise let agents grind through the backlog./ask-redAsk which RedSkills flow fits the current situation. Use when the operator asks what to do now, which command to run, or how to route a task through RedSkills./audit-skillsUse when the operator invokes /audit-skills to request the catalog quality scorecard. The current runtime does not serve this report./branch-lockLock the agent to a branch and block it from switching away. Sets up self-contained pre-tool hooks that block the agent's git checkout/switch to any other branch while a lock is active, and gives you a /branch-lock command to set, change, and clear the lock. Use when you want the agent pinned to one branch for a session./browser-reviewOpen a generated HTML artifact for live human review — the human annotates an exact element and character range, the agent polls that feedback and iterates. A layout-audit gate blocks "done" on a broken render. Use when you want surgical element-level annotation instead of "screenshot + describe in prose", or need a ground-truth render check before declaring UI work done.Other plugins' skills for the same job