Skip to content
Back to skills

Fix Bug

ASecurity

Use when something is broken, wrong, crashing or failing: reproduce it, prove it with a failing test, find the root cause, fix it minimally, verify, report.

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 26, 2026
ai-agentsgotestinggitdatabasesecurity

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add Rasimoghlu/sarkhans-claude-starter --skill fix-bug --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fix Bug?

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

Security grade badge for Fix Bug
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/rasimoghlu-fix-bug/badge)](https://www.skillsdirectory.com/skills/rasimoghlu-fix-bug)

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: fix-bug
description: 'Use when something is broken, wrong, crashing or failing: reproduce it, prove it with a failing test, find the root cause, fix it minimally, verify, report.'
argument-hint: "[what is broken, error message or steps]"
---
# Fix a bug

Bug: $ARGUMENTS

Follow every step in order. Never claim a fix you didn't watch work.

## 1. Understand — no code yet
- Restate the bug: expected behaviour, actual behaviour, where it happens.
- Collect the evidence that exists: error message, stack trace, logs, failing test, request/response, the steps the user gave.
- Missing something you can't find yourself (steps, input, environment)? Ask now — max 3 focused questions.

## 2. Reproduce
- Make it happen: run the failing test, the command, the request or the page — the real thing, not a guess.
- Can't reproduce it? Stop and report what you tried and what you saw. Don't fix code blindly.

## 3. Prove it with a test
- Write the smallest regression test that fails because of this bug, following `/write-tests` and `.claude/rules/testing.md`.
- Run it and show it failing for the right reason (the bug, not a typo in the test).
- No test framework, or the bug can't be tested (pure styling, environment)? Say so and keep an exact manual reproduction instead.

## 4. Find the root cause
- Trace from the symptom to the cause: read the code path, check the inputs and state at each step, check recent changes (`git log -p`, `git blame`) on the lines involved.
- Confirm the cause before fixing: state it in one or two sentences and point to the file and line.
- Look for the same mistake elsewhere (same pattern, copied code, other callers). Fix those too if they are in the same scope; otherwise list them.

## 5. Fix
- The smallest change that removes the cause, not the symptom. No try/catch that hides the error, no special case for the one input, no disabled test.
- Don't refactor or restyle unrelated code in the same change.
- Touches the database schema → `/db-change`. Touches auth, input handling or secrets → apply `.claude/rules/security.md`.

## 6. Verify
- The regression test now passes; show the runner's summary line.
- Repeat the original reproduction from step 2 and confirm the bug is gone.
- `/verify` (full) until green. For a non-trivial fix, run the `reviewer` agent on the diff.

## 7. Report
In the response language: the cause (file:line), the fix, the test that guards it, other places with the same problem, anything left open. End with `### Third eye`.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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