Skip to content
Skills Library
Programming · Testing

fix-bug

/fix-bug

Fixes a bug by reproducing it in a failing test first, then making the smallest change that turns it green. Use when something is "broken", "wrong", "fails", "doesn't work", throws an error, or a user or issue reports a bug.

Author
doist ↗
Repository
todoist-cli ↗
Licence
MIT
Last repository change
12.11.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 12.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Fixes a bug by reproducing it in a failing test first, then making the smallest change that turns it green. Use when something is "broken", "wrong", "fails", "doesn't work", throws an error, or a user or issue reports a bug.

Triggers from the description

brokenwrongfailsdoesn
Original author description

Fixes a bug by reproducing it in a failing test first, then making the smallest change that turns it green. Use when something is "broken", "wrong", "fails", "doesn't work", throws an error, or a user or issue reports a bug.

How it works

  1. 1. Restate the symptom
  2. 2. Reproduce it in a test
  3. 3. Find the root cause
  4. 4. Make the smallest fix
  5. 5. Prove the fix is needed
  6. When it doesn't work
  7. Report
Original SKILL.md headings · 37 lines, 333 words
SKILL.md preview
---
name: fix-bug
description: Fixes a bug by reproducing it in a failing test first, then making the smallest change that turns it green. Use when something is "broken", "wrong", "fails", "doesn't work", throws an error, or a user or issue reports a bug.
---

# Fix a bug

## 1. Restate the symptom

Write down what happens, what should happen, and the command that triggers it (`td <command> <args>`). If the report is vague, restate it to the owner and ask before going further. Done when the symptom fits in one sentence.

## 2. Reproduce it in a test

Write a test that fails on the exact symptom, at the lowest layer that shows it:

- a helper in `src/lib/` → its `*.test.ts` next to it;
- a command's flags, API calls or output → the command's test, through `program.parseAsync(['node', 'td', ...])` with `setupApiMock()`;
- argv parsing, global flags or the JSON error envelope of the built CLI → `src/index.integration.test.ts`.

Follow `write-tests` for helpers and the quality bar. Run the test and see it fail **for the reason in step 1**, not a typo or a missing mock. Done when the failure message describes the bug.

## 3. Find the root cause

Trace from the symptom to the first place the data goes wrong. Name it with `path:line`. A fix at the symptom (a special case, a retry, a try/catch) is not a root cause. Done when you can say why the code does what it does.

## 4. Make the smallest fix

Change only what the root cause needs. Note other bugs you find for a separate fix; don't fix them here. Restructuring goes to `refactor`, as its own change.

## 5. Prove the fix is needed

Undo the fix: the test fails. Restore it: the test passes. Then `npm run verify`. Done when you have seen both and verify prints `Verified.`

## When it doesn't work

After three fixes that didn't turn the test green, stop. Your model of the bug is wrong. Re-read the failing output, question the test, and list what you have ruled out before trying again. Tell the owner if you're stuck.

## Report

Use the `verify` report format. Include the test name, the root cause line, and the undo/restore result.

Versions

RepositoryScoreLicence
This page · doist/todoist-cli90MIT
mthines/agent-skills100MIT
mgiovani/cc-arsenal100MIT
tddworks/claudebar100Apache-2.0
bytebase/dbhub100MIT
remix-run/react-router100MIT
Cynnamoroll/factory-stack100MIT
nowsprinting/unity-coding-skills100Unlicense
Slama-Consulting/proofbench100MIT

Database snapshot: 13.11.2026 · package version c5f7bc198ebb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100ds-tdd
    Fix a bug by first writing a focused test that fails for the right reason, then making the smallest change that makes it pass. Use when the user asks for TDD or a regression test, when a bug has a cheap local test target, or for /ds-tdd.
  • 95fix
    Fix one bug from the board without an iteration - failing test first, smallest fix, one PR. "all" fixes every Ready bug, several at once while slots and room allow. Use when asked to fix a bug issue.
  • 96repro-first
    Use when fixing a reported bug — reproduce it with a failing test before touching the code, then make the minimal fix at the true cause; never patch the symptom or files unrelated to the bug.
  • 100st-tdd
    Fix a bug by first writing a focused test that fails for the right reason, then making the smallest change that makes it pass. Use when the user asks for TDD or a regression test, when a bug has a cheap local test target, or for /st-tdd.
  • 96fix
    Fix a bug the Concordia way — reproduce it with a failing test first, find the root cause, apply the smallest fix, and prove it. Use when the user reports a bug, a wrong result, an exception or a failing test.
  • 100bug-hunt
    Use when reproducing, isolating, and fixing a bug with the smallest safe change.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.