Skip to content
Back to skills

Systematic Debugging

ASecurity

Use when something is broken — an error message, stack trace, failing test, crash, wrong output, "it doesn't work", build failure, or unexpected behavior. Finds the root cause with evidence before changing code, then records the fix in Engram memory.

  • 26 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentsdebugginggit

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add Hvftpie13/Flashmind_Gemini-3.8-Flash_Smart-agent --skill systematic-debugging --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Systematic Debugging?

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

Security grade badge for Systematic Debugging
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hvftpie13-systematic-debugging/badge)](https://www.skillsdirectory.com/skills/hvftpie13-systematic-debugging)

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: systematic-debugging
description: Use when something is broken — an error message, stack trace, failing test, crash, wrong output, "it doesn't work", build failure, or unexpected behavior. Finds the root cause with evidence before changing code, then records the fix in Engram memory.
---

# Systematic Debugging

Do not guess-and-patch. Find the cause with evidence, fix it once, prove it is fixed.

## 1. Check memory first
`mem_search` with the error message, module name, and symptom. This bug (or a cousin) may already be solved.

## 2. Reproduce
- Get the exact error: full message, stack trace, command, input, environment.
- Reproduce it yourself with the smallest possible command or test. If you cannot reproduce it, say so and
  collect more information (logs, versions, steps) instead of guessing.
- When possible, write a failing test that captures the bug.

## 3. Locate
- Read the stack trace from the top frame **in project code**, not library internals.
- Read the real code at that location. Do not reason about code you have not opened.
- Narrow down: add a temporary log/assert, use `git log -p` / `git bisect` for regressions,
  or comment out halves until the failure moves.

## 4. Find the root cause
Write one sentence: **"It fails because ___."** It must be backed by something you observed
(a printed value, a log line, a reproduced condition) — not a hunch.
Ask "why?" until you reach a cause, not a symptom
(e.g. "null user" → "token expired" → "refresh not awaited").

## 5. Fix
- Fix the cause, with the smallest change that does it.
- Do not silence the error (empty `catch`, `|| true`, `// @ts-ignore`, `skip`) unless that *is* the correct fix and you explain why.
- Remove temporary logs.

## 6. Prove it
- The reproduction from step 2 now passes.
- Related tests still pass (see `verify-before-done`).

## 7. Save the lesson
`mem_save` with:
```
Title: <short bug name>
What: <symptom>
Why: <root cause>
Where: <file:line / module>
Lesson: <how to avoid or spot it next time>
```

## When stuck
After two failed hypotheses, stop and summarize: what you tried, what you observed, what you now suspect.
Ask the user for the missing piece rather than trying random changes.

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.