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
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.
About
Use cases: security
Reviews
Write a reviewNo 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
- 0.557score
agent-handoff
discountry
Continue the latest unfinished coding task from the opposite local agent using native Claude Code or Codex session history plus a deterministic snapshot of…
SkillBFreshness: B★ 2Claude Code +9 - 0.552score
how-to-use-effect
discountry
Write, review, and debug `useEffect` correctly.
SkillBFreshness: B★ 2Claude Code +9 - 0.507score
anti-ui-slop
discountry
Detect, review, prevent, and remove AI-generated UI convergence patterns ("AI slop") in frontend code.
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
create-design-md
discountry
Generate a complete DESIGN.md design-system specification at the root of the current project, synthesized from whatever material is available — a written…
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
teenage-engineering-ui
discountry
Teenage Engineering / Dieter Rams functionalist-hardware aesthetic: neutral molded panels, a single bold accent color, tactile knobs and buttons, LED and…
SkillCFreshness: C★ 2Claude Code +9 - 0.443score
react-principles
discountry
React best practices for component design, state management, and Effect discipline.
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
codex-prompt-optimize
discountry
Auto-trigger this skill when the user's input is vague, ambiguous, incomplete, or too brief to act on reliably in Codex.
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
slack
discountry
Control Slack via the `slack` CLI to read, search, and manage messages, threads, files, reactions, channels, DMs, and canvases.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
refine
discountry
Improve UI/UX aesthetics and hierarchy (color, spacing, typography, layout, components) from UI code or specs.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
clickup
discountry
Use for ClickUp tasks and docs.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
refactor
discountry
Apply this skill whenever the user asks to refactor, clean up, restructure, or improve existing code — regardless of language or framework.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
ignore
discountry
Generate or update a .gitignore file based on the current project stack and tools.
SkillDFreshness: D★ 2Claude Code +9
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
- Repository
- github.com/discountry/ritmex-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from discountry
- 0.557score
agent-handoff
discountry
Continue the latest unfinished coding task from the opposite local agent using native Claude Code or Codex session history plus a deterministic snapshot of…
SkillBFreshness: B★ 2Claude Code +9 - 0.552score
how-to-use-effect
discountry
Write, review, and debug `useEffect` correctly.
SkillBFreshness: B★ 2Claude Code +9 - 0.507score
anti-ui-slop
discountry
Detect, review, prevent, and remove AI-generated UI convergence patterns ("AI slop") in frontend code.
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
create-design-md
discountry
Generate a complete DESIGN.md design-system specification at the root of the current project, synthesized from whatever material is available — a written…
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
teenage-engineering-ui
discountry
Teenage Engineering / Dieter Rams functionalist-hardware aesthetic: neutral molded panels, a single bold accent color, tactile knobs and buttons, LED and…
SkillCFreshness: C★ 2Claude Code +9 - 0.443score
react-principles
discountry
React best practices for component design, state management, and Effect discipline.
SkillDFreshness: D★ 2Claude Code +9
Cite this page
debug skill. Agent Mart. https://agentmart.dev/skills/discountry-debug (last updated 2026-10-24)