{"enrichment":{"faq":[{"a":"Bug Fix TDD teaches you to start by writing a failing test that reproduces the bug, then apply minimal code changes to make it pass. This red-green-refactor cycle ensures your fix is targeted and regression-proof. The skill covers test placement, mock setup, and verification strategies for both unit and integration scenarios.","q":"How do I fix bugs with test-driven development?"},{"a":"Bug Fix TDD's red-green-refactor workflow has three phases: Red (write a test that fails because the bug exists), Green (apply the smallest code change to pass that test), and Refactor (clean up while keeping tests passing). This approach prevents over-engineering and keeps fixes minimal and focused on the actual problem.","q":"What's the TDD bug fix workflow red green refactor cycle?"},{"a":"Bug Fix TDD guides you to write a failing test that captures the buggy behavior before touching production code. You set up mocks and assertions that expose the issue, then verify the test fails. Once the test confirms the bug, you apply your fix and watch it turn green\u2014proving the bug is resolved.","q":"How do I reproduce a bug with a unit test first?"},{"a":"Yes. Bug Fix TDD covers integrating test-first bug fixes into CI workflows so that regression tests run automatically on every commit. The skill teaches how to structure tests and minimal fixes that CI systems can validate, catching regressions early and ensuring fixes stay stable across deployments.","q":"Can Bug Fix TDD automate bug fixing in CI pipelines?"},{"a":"Bug Fix TDD includes fallback code-analysis approaches when direct reproduction isn't possible. The skill teaches mock patterns and test design strategies to isolate hard-to-reproduce issues, plus techniques for analyzing logs and state to construct a test that validates your fix without needing the exact original conditions.","q":"What if I can't easily reproduce the bug in a test?"}],"shadow_tags":["test-first-debugging","regression-testing","red-green-refactor","automated-bug-repair","ci-integration","mock-patterns","test-placement","minimal-fixes","bug-reproduction"],"summary_rewrite":"Bug Fix TDD guides you through test-driven bug resolution: write a failing test that reproduces the issue, then apply the minimum fix to make it pass. The skill covers test placement, mock patterns, and the complete red-green-refactor cycle for both standard fixes and fallback code-analysis approaches when reproduction isn't possible."},"files":[{"bytes":6643,"path":".claude/skills/bug-fix-tdd/SKILL.md","sha256":"080ff2527ac1f2cb934a5b80e064ba506e993c745cf1482cc4894d95746748ac","url":"https://skillfed.io/files/stacklok/toolhive-studio/bug-fix-tdd/90d18c8a/SKILL.md"}],"id":"stacklok/toolhive-studio/bug-fix-tdd","links":{"html":"https://skillfed.io/stacklok/toolhive-studio/bug-fix-tdd","md":"https://skillfed.io/stacklok/toolhive-studio/bug-fix-tdd.md","repo":"https://github.com/stacklok/toolhive-studio"},"meta":{"agents_supported":["claude-code","codex","cursor"],"first_seen":"2026-07-28","forks":22,"language":"TypeScript","last_updated":"2026-07-27","license":"Apache-2.0","name":"bug-fix-tdd","publisher":"stacklok","stars":158},"relations":{"similar":[{"id":"hieutrtr/ai1-skills/react-testing-patterns"},{"id":"cacr92/WeReply/testing-strategy"},{"id":"olehsvyrydov/AI-development-team/frontend-tester"},{"id":"cognitedata/builder-skills/test-coverage"},{"id":"affaan-m/ECC/react-testing"},{"id":"xiaolai/vmark/tauri-app-dev"},{"id":"bobmatnyc/claude-mpm-skills/tanstack-query"},{"id":"mastra-ai/mastra/playground-msw-tests"},{"id":"tanstack-skills/tanstack-skills/tanstack-query"},{"id":"bkywksj/knowledge-base/test-development"}]},"slug":{"owner":"stacklok","repo":"toolhive-studio","skill":"bug-fix-tdd"},"version":"90d18c8a"}
