Skip to content
Agentmart
Submit a tool

debug

Apply this skill whenever the user asks to debug, review, audit, or find problems in code — regardless of language or framework.

Skill by discountry

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/discountry-debug

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Apply this skill whenever the user asks to debug, review, audit, or find problems in code — regardless of language or framework. Triggers include: "find bugs in this", "review my recent changes", "something is wrong but I don't know where", "check for security issues", "audit my commits", "why is this slow", "what am I missing in my tests", or any request to investigate correctness, safety, or performance. Prioritize recently modified files, staged changes, and the latest commits — the bug is almost always in what just changed.

Use cases: security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/debug

What's inside

Skill name
debug
Description
Apply this skill whenever the user asks to debug, review, audit, or find problems in code — regardless of language or framework. Triggers include: "find bugs in this", "review my recent changes", "something is wrong but I don't know where", "check for security issues", "audit my commits", "why is this slow", "what am I missing in my tests", or any request to investigate correctness, safety, or performance. Prioritize recently modified files, staged changes, and the latest commits — the bug is almost always in what just changed.
License
MIT
Instructions
70 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Debug Skill

> "Debugging is twice as hard as writing the code in the first place." — Brian Kernighan

Systematically surface logic flaws, latent bugs, performance bottlenecks, security vulnerabilities, and test gaps in existing code. Bias heavily toward **what recently changed** — most bugs live in the delta, not the stable baseline.

---

## Before Analyzing

1. **Orient to the diff** — ask for or examine: recent commits, staged changes, modified files. Fresh eyes on fresh code first.
2. **Understand the intent** — what is this code supposed to do? A bug is only a bug relative to expected behavior.
3. **Identify the blast radius** — where does this code touch? What depends on it?
4. **Don't assume the symptom is the problem** — the reported failure often points one layer away from the actual root cause.

---

## Analysis Dimensions

Work through each dimension. Not every dimension is equally relevant — weight by the nature of the code under review.

### Logic & Correctness
Off-by-one errors, wrong operator precedence, incorrect boundary conditions, inverted boolean logic, missed edge cases (empty input, zero, null/nil, maximum values), incorrect assumptions about ordering or uniqueness, race conditions in concurrent code.

### Latent Bugs
Code that works today but will break under different conditions: assumptions about data shape that aren't validated, silent failures from unchecked return values or ignored errors, state that can become inconsistent, error paths that swallow exceptions without logging or recovery.

### Performance
Unnecessary work inside loops, N+1 query patterns, missing indexes implied by query shape, repeated expensive computations that could be cached, unbounded growth (memory leaks, ever-growing collections), blocking calls on hot paths.

### Security
Injection vectors (SQL, command, template), unvalidated or unsanitized external input, authentication and authorization gaps, sensitive data in logs or error messages, insecure defaults, hardcoded secrets, over-broad permissions, missing rate limiting on exposed endpoints.

### Test Coverage Gaps
Happy path tested but edge cases absent, error paths untested, boundary values missing, mutable shared state between tests, tests that assert the wrong thing (passing for the wrong reason), missing regression tests for the exact scenario that just broke.

---

## High-Signal Patterns to Always Check

- **Error handling** — is every failure mode handled explicitly, or does it silently succeed/fail?
- **Trust boundaries** — where does untrusted data enter the system? Is it validated before use?
- **State mutation** — is shared mutable state accessed safely? Could two callers interfere?
- **Resource lifecycle** — are connections, file handles, locks always released, even on failure?
- **Type coercion / implicit conversion** — does the language allow surprising automatic conversions that could corrupt data?
- **Time and ordering** — does the code assume things happen in a specific order that isn't guaranteed?

---

## Root Cause Protocol

Don't stop at the symptom. For each issue found:

1. **What**: describe the specific flaw
2. **Why it's a problem**: the failure mode or impact
3. **Where it came from**: which change introduced it, if traceable
4. **Fix**: the minimal correct change — prefer targeted fixes over broad rewrites

---

## Output Format

1. **Summary** — one-line assessment of overall code health
2. **Issues** — ranked by severity (Critical → High → Medium → Low), each with: location, description, impact, fix
3. **Test gaps** — specific missing cases worth adding
4. **Positive observations** — note what is done well; debugging shouldn't only be adversarial

Scope large codebases to the changed surface area first. Expand to stable code only if the bug clearly originates there.

From discountry/ritmex-skills, MIT.

More from discountry/ritmex-skills

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Mar 12, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from discountry

Cite this page

debug skill. Agent Mart. https://agentmart.dev/skills/discountry-debug (last updated 2026-10-24)