test-first-bugs

Featured

Enforces a test-driven bug-fixing workflow. Use when a user reports a bug, failing code, an error, or asks to fix something.

Testing & QA 391 stars 65 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
86
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Test-first bug fixing Enforce a disciplined bug-fixing workflow that prevents regression and parallelizes fix attempts. ## Core workflow When a bug is reported, follow these steps in order: ### Phase 1: Reproduce and document 1. **Understand the bug**, Gather details about expected vs actual behavior 2. **Identify the test location**, Determine where tests live in the project (check for `tests/`, `__tests__/`, `spec/`, `*.test.*`, `*.spec.*` patterns) 3. **Write a failing test**, Create a test that demonstrates the bug ### Phase 2: Fix with subagents 4. **Launch fix subagents**, Use the Task tool with `subagent_type=general-purpose` to attempt fixes 5. **Run the test**, Verify the fix by running the specific test 6. **Iterate if needed**, If test still fails, launch additional subagents with new approaches ### Phase 3: Verify and complete 7. **Run full test suite**, Ensure no regressions were introduced 8. **Report success**, Confirm the bug is fixed with passing test as proof ## Writing the failing test ### Test naming convention Name the test to describe the bug: ```python # Python (pytest) def test_user_login_fails_when_email_has_uppercase(): ... # Python (unittest) def test_should_handle_empty_input_without_crashing(self): ... ``` ```javascript // JavaScript (Jest/Vitest) it('should not crash when input array is empty', () => { ... }); test('handles special characters in username', () => { ... }); ``` ```typescript // TypeScript describe('UserSer...

Details

Author
jamditis
Repository
jamditis/claude-skills-journalism
Created
8 months ago
Last Updated
4 days ago
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category