Fix bugs by reproducing them with a test case first, then verifying the fix confirms the test passes.

Install

mkdir -p .claude/skills/bugfix-aomartinao && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19072" && unzip -o skill.zip -d .claude/skills/bugfix-aomartinao && rm skill.zip

Installs to .claude/skills/bugfix-aomartinao

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use when given a bug or error report. Follows the Prove It Pattern — reproduce first with a test, then fix, then confirm the test passes.
137 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Reproduce bugs by writing a test at the lowest appropriate level
  • Implement fixes for identified bugs
  • Confirm that the fix works by ensuring the reproduction test passes
  • Document reasons if a test is not feasible for environment-specific bugs
  • Utilize unit, integration, or UX spec tests for reproduction

How it works

This skill follows the 'Prove It Pattern' for bug fixes, requiring a test to reproduce the issue before a fix is implemented. The test then confirms the fix by passing.

Inputs & outputs

You give it
Bug or error report
You get back
A failing test, a code fix, and a passing test

When to use bugfix

  • Debugging code issues
  • Writing reproduction tests
  • Verifying defect fixes

About this skill

Bug Fixes: Prove It Pattern

When given a bug or error report, the first step is to spawn a subagent to write a test that reproduces the issue. Only proceed once reproduction is confirmed.

Test Level Hierarchy

Reproduce at the lowest level that can capture the bug:

  1. Unit test — Pure logic bugs, isolated functions (lives next to the code)
  2. Integration test — Component interactions, API boundaries (lives next to the code)
  3. UX spec test — Full user flows, browser-dependent behavior (lives in apps/web/specs/)

For Every Bug Fix

  1. Reproduce with subagent — Spawn a subagent to write a test that demonstrates the bug. The test should fail before the fix.
  2. Fix — Implement the fix.
  3. Confirm — The test now passes, proving the fix works.

If the bug is truly environment-specific or transient, document why a test isn't feasible rather than skipping silently.

When not to use it

  • When skipping the reproduction test step before implementing a fix
  • When the bug is not reproducible with a test

Limitations

  • The first step is to spawn a subagent to write a test that reproduces the issue
  • The test should *fail* before the fix
  • If the bug is truly environment-specific or transient, document why a test isn't feasible

How it compares

This workflow mandates writing a reproduction test before fixing a bug, ensuring the fix is validated and preventing regressions, unlike a generic approach that might fix bugs without a dedicated test.

Compared to similar skills

bugfix side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
bugfix (this skill)05moNo flagsIntermediate
python-testing-patterns772moReviewIntermediate
chrome-devtools416moReviewIntermediate
bats97moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

python-testing-patterns

wshobson

Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.

77204

chrome-devtools

mrgoonie

Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.

41157

bats

OleksandrKucherenko

Bash Automated Testing System (BATS) for TDD-style testing of shell scripts. Use when: (1) Writing unit or integration tests for Bash scripts, (2) Testing CLI tools or shell functions, (3) Setting up test infrastructure with setup/teardown hooks, (4) Mocking external commands (curl, git, docker), (5) Generating JUnit reports for CI/CD, (6) Debugging test failures or flaky tests, (7) Implementing test-driven development for shell scripts.

991

browser-daemon

noiv

Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.

587

performance-profiling

davila7

Performance profiling principles. Measurement, analysis, and optimization techniques.

633

obsidian-local-dev-loop

jeremylongshore

Configure Obsidian plugin development with hot-reload and fast iteration. Use when setting up development workflow, configuring test vaults, or establishing a rapid development cycle. Trigger with phrases like "obsidian dev loop", "obsidian hot reload", "obsidian development workflow", "develop obsidian plugin".

328

Search skills

Search the agent skills registry