test-first-bugs

Solid

This skill should be used when the user reports a bug, describes unexpected behavior, says something is "broken", "not working", "failing", mentions an "error", "issue", or "problem" in code, or asks to "fix" something. Enforces test-driven bug fixing workflow.

Testing & QA 341 stars 58 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
84
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(...

Details

Author
jamditis
Repository
jamditis/claude-skills-journalism
Created
7 months ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Solid

bug-fix

Use this skill when the user wants to fix a bug -- a deviation between current behavior and intended behavior in code that already exists. Triggers on "fix bug", "fix this bug", "diagnose and fix", "investigate this regression", "this is broken". Do NOT use for new features (use `new-spec`) or for refactors that don't fix incorrect behavior.

14 Updated today
eugenelim
AI & Automation Listed

tdd-fix

TDD bug-fix workflow — reproduce a bug as a failing test, find root cause, fix, and verify

2 Updated today
tony
Testing & QA Listed

specflow-bugs

Diagnose bugs in a Specflow-managed project by walking the spec-model diagnostic tree to find the root cause layer, classify the bug type, file it in the bug ledger (.cortex/compass/bugs/), and produce a concrete change plan for the change-router to execute. Use this skill whenever the user reports a bug, describes unexpected behavior, says something is broken or wrong, or when a test failure needs triage. PROACTIVELY use this skill when you encounter: "X doesn't work", "X returns wrong result", "X crashes", "this test is failing", "the behavior should be Y but it's Z", "why does X happen", error messages, 500s, wrong data, missing responses, or any report where implemented behavior diverges from expected behavior. Also trigger when test runs produce failures that need classification — the skill handles both human-reported bugs and automated test failure triage. If a .specflow/specs/ directory exists and the user reports something broken, this skill runs first — it diagnoses before anyone touches code.

1 Updated 3 days ago
pedropacheco95