When to use
- User reports a bug or describes unexpected behavior
- Something is "broken", "not working", or "failing"
- User mentions an "error", "issue", or "problem" in code
- User asks to "fix" something
Core workflow
Reproduce and document
- Understand the bug - gather details about expected vs actual behavior
- Identify the test location - check for tests/, __tests__/, spec/, *.test.*, *.spec.* patterns
- Write a failing test that demonstrates the bug
Fix with subagents
- Launch fix subagents to attempt fixes in parallel
- Run the test to verify the fix
- Iterate if needed - launch additional subagents with new approaches
Verify and complete
- Run full test suite to ensure no regressions were introduced
- Report success with passing test as proof
What's included
Test naming conventions
Patterns for Python (pytest, unittest), JavaScript (Jest, Vitest), and TypeScript test names that describe the bug.
Test structure
Arrange-Act-Assert pattern for bug reproduction tests that fail initially and pass after the fix.
Parallel fix strategies
Direct fix agent, root cause agent, and edge case agent approaches for parallelized debugging.
Quick test setup
Commands for setting up minimal test frameworks when projects lack test infrastructure.
Test structure
Every bug reproduction test follows the Arrange-Act-Assert pattern:
def test_bug_description():
# 1. ARRANGE - Set up the conditions that trigger the bug
input_data = create_problematic_input()
# 2. ACT - Perform the action that causes the bug
result = function_under_test(input_data)
# 3. ASSERT - Verify the expected (correct) behavior
assert result == expected_value # This should FAIL initially
Installation
# Clone the repository
git clone https://github.com/jamditis/claude-skills-journalism.git
# Copy the skill to your Claude config
cp -r claude-skills-journalism/test-first-bugs ~/.claude/skills/
Or download just this skill from the GitHub repository.
Related skills
A passing test proves the bug is fixed
Test-driven bug fixing, parallel subagents, and regression prevention in one skill.
View on GitHub