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.zipInstalls 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.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
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:
- Unit test — Pure logic bugs, isolated functions (lives next to the code)
- Integration test — Component interactions, API boundaries (lives next to the code)
- UX spec test — Full user flows, browser-dependent behavior (lives in
apps/web/specs/)
For Every Bug Fix
- Reproduce with subagent — Spawn a subagent to write a test that demonstrates the bug. The test should fail before the fix.
- Fix — Implement the fix.
- 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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| bugfix (this skill) | 0 | 5mo | No flags | Intermediate |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| chrome-devtools | 41 | 6mo | Review | Intermediate |
| bats | 9 | 7mo | Review | Intermediate |
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.
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.
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.
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.
performance-profiling
davila7
Performance profiling principles. Measurement, analysis, and optimization techniques.
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".