Skip to content
Back to skills

Debug Mode

ASecurity

Diagnose or debug a broken, failing, flaky, slow, or production-only bug with a red feedback loop and runtime evidence. Use when the user says diagnose/debug or reports something broken.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 29, 2026
ai-agentsgogit

Works with

  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned October 6, 2026

npx -y skills add hcaiano/skills --skill debug-mode --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Debug Mode?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Debug Mode
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hcaiano-debug-mode/badge)](https://www.skillsdirectory.com/skills/hcaiano-debug-mode)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: debug-mode
description: "Diagnose or debug a broken, failing, flaky, slow, or production-only bug with a red feedback loop and runtime evidence. Use when the user says diagnose/debug or reports something broken."
argument-hint: "[description of the bug]"
---

# Debug Mode

Fix only a proven cause; a plausible fix that passes once proves nothing.
Already inside a debug-mode run → continue the loop.

Respect the user's verb: `diagnose` ends before **Fix** and applies no fix;
remove every temporary log before its report.
`debug`, or a bug report with no verb, runs through **Fix**.

## Workflow

1. **Understand.** Done when symptoms, affected surface, expected behavior,
   actual behavior, and a reproduction path are known.
2. **Red loop.** Build one command that drives the bug's code path and asserts
   its exact symptom: a failing test, a curl script, a CLI run on a fixture, a
   headless-browser script, a replayed trace. Make it tight: deterministic,
   fast, runnable unattended, asserting the symptom rather than "didn't
   crash". For a flaky bug, raise the reproduction rate (loop the trigger, add
   stress) until it is debuggable. For slow code, the loop is a baseline
   measurement (timing harness, profiler, query plan, production traces) that
   goes red above a stated threshold. When no command is practical
   (auth-walled, user-specific, production-only), say so and rely on
   instrumentation in steps 5-6. Done when the command has run red on this
   bug, or its absence is stated.
3. **Minimize.** With a loop, shrink the repro one cut at a time (inputs,
   callers, config, data, steps), rerunning the loop after each cut. Done when
   every remaining part matters: removing any one turns the loop green.
   Without a loop, go straight to step 4.
4. **Hypothesize.** Done when 2-3 ranked hypotheses each name the observation
   that would confirm or reject it.
5. **Instrument.** For slow code, profile the minimized repro or bisect
   between known-good and known-bad states (`git bisect run` with the loop).
   Otherwise add temporary [logs](#logs). Done when the observations
   distinguish the hypotheses without leaking secrets or changing the
   behavior; if they change it, observe from a less invasive point.
6. **Reproduce.** Done when the bug has been triggered and the evidence
   collected, through the loop when one exists. If the flow is auth-walled or
   user-specific, ask the user to reproduce and wait.
7. **Analyze.** Done when evidence confirms one hypothesis or rejects every
   current one explicitly. When it rejects them all, write new hypotheses from
   the evidence and return to step 5.
8. **Fix.** When a seam exercises the real bug pattern, turn the minimized
   repro into a regression test first. Done when the smallest evidence-backed
   fix is applied, the loop (when one exists) has gone green on the original
   scenario, and every temporary log is removed.

## Logs

- Write structured events through the app's own logger or a local file:
  `hypothesis_id`, `event`, a request or session id that ties one user action
  together, the observed values, and a timestamp.
- Tag every temporary log with one unique prefix (e.g. `[DEBUG-a4f2]`), so
  removal is a single grep.

## Report Format

End with this shape:

```markdown
## Symptoms
## Hypotheses Tested
## Evidence Collected
## Confirmed Root Cause
## Fix Applied
## Instrumentation Removed
## Residual Risk
```

If no fix was applied, say that under `Fix Applied` and name the missing evidence.

Files in this skill

  • SKILL.md4.9 KB
  • agents/openai.yaml392 B
  • scripts/debug-server.mjs3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.