A TDD-based workflow for fixing bugs and implementing features, mandating that a failing test is written before code changes.
Install
mkdir -p .claude/skills/fix-jvm-skills && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11872" && unzip -o skill.zip -d .claude/skills/fix-jvm-skills && rm skill.zipInstalls to .claude/skills/fix-jvm-skills
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.
Fix a bug or missing feature using TDD — write failing test first, then fix, refactor, verify, beautify. Use when a bug is discovered or a feature doesn't work as expected.Key capabilities
- →Understand and classify bugs or missing features
- →Write failing tests to reproduce issues
- →Implement minimum code to make tests pass
- →Refactor code for quality and efficiency
- →Verify fixes through screenshots or browser automation
How it works
The skill guides the user through a Test-Driven Development (TDD) process, starting with writing a failing test, then implementing the fix, refactoring, and verifying the changes.
Inputs & outputs
When to use fix
- →Fix a known bug
- →Implement a missing feature
- →Add test coverage for broken paths
- →Refactor code with TDD verification
About this skill
Fix with TDD
Fix a bug or missing feature by writing a failing test first, then making it pass.
Process
1. Understand
Describe the bug or missing behavior. Explore the codebase to find the relevant code paths.
- If UI-related: screenshot the current broken state (if browser automation is available)
- Find the relevant service, controller, and template/view files
- Check if there's an existing test class for this area
2. Classify — pick test approach
| Scenario | Test approach |
|---|---|
| Service/repository logic, DB queries | Integration tests with real DB |
| File uploads, external storage | Integration tests with mocks/stubs |
| Browser-visible UI, full user flows | End-to-end browser tests |
3. Red — write a failing test
⛔ MANDATORY GATE — do NOT write any fix code until this step is complete.
Write a test that reproduces the bug or asserts the missing behavior. Add to an existing test class if one covers this area, otherwise create a new one.
Run /test *FilterPattern and paste the failure output to confirm the test fails for the right reason.
4. Green — make the test pass
Write the minimum code to make the test pass.
- Compile the code
- Run the test — paste the green output to confirm pass
5. Refactor
Run /simplify to review changed code for reuse, quality, and efficiency. Then clean up anything remaining: remove duplication, extract methods if needed, ensure naming is consistent with surrounding code.
Run the test again — confirm still green after refactoring.
6. Verify
- UI fixes:
/restart-spring-boot→ verify the fix (screenshot or browser automation) → compare with the broken state from step 1 - Backend fixes: test output is sufficient proof
7. Beautify (UI fixes only)
If the fix introduced new UI elements:
design skill → refine → verify the UI
8. Commit
/commit
When not to use it
- →When a failing test cannot be written
- →When the fix does not require TDD principles
- →When the user wants to skip the mandatory failing test step
Limitations
- →A failing test must be written before any fix code.
- →Skipping the test writing step requires explicit user approval.
- →UI fixes require manual verification via screenshot or browser automation.
How it compares
This skill enforces a TDD workflow, ensuring that a failing test is written before any fix, which provides a verifiable and structured approach to bug fixing compared to direct code changes.
Compared to similar skills
fix side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| fix (this skill) | 0 | 4mo | No flags | Intermediate |
| reproduce-reduce-regress | 1 | 7mo | No flags | Intermediate |
| fix-file | 0 | 28d | No flags | Intermediate |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
reproduce-reduce-regress
facet-rs
Systematic workflow for debugging by reproducing bugs with real data, reducing test cases to minimal examples, and adding regression tests
fix-file
ventura8
Use when you need to fix one file end-to-end: lint, test impact, and apply minimal safe changes for this project.
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.
serena
massgen
This skill provides symbol-level code understanding and navigation using Language Server Protocol (LSP). Enables IDE-like capabilities for finding symbols, tracking references, and making precise code edits at the symbol level.
clojure-write
metabase
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.