What problem does it solve? When bugs appear, developers often jump straight to guessing fixes without reproducing the issue or finding the root cause, leading to recurring problems and wasted time. This Skill enforces a disciplined test-driven debugging workflow: reproduce with a failing test first, investigate the root cause systematically, then fix and refactor. ## Core Features & Use Cases - Test-First Reproduction: Write a minimal failing test that reproduces the bug before any fix attempt, ensuring the problem is truly understood. - Systematic Root Cause Investigation: Trace data flow, compare working reference code, and validate hypotheses one variable at a time instead of guessing. - Automatic Log Collection: Fetch runtime logs from local log directories or Xcode MCP tools (run logs, build logs, test results) as debugging evidence. - Structured Debug Logs: Record every debugging session to debug-logs/YYYY-MM-DD-<issue>.md with a standardized template covering reproduction, root cause, and fix. - Use Case: A user reports a crash in your iOS app. The Skill pulls the latest run log, writes a failing test reproducing the crash, traces the nil value to its source, applies a single targeted fix, verifies all tests pass, and documents the entire analysis. ## Quick Start Use the test-driven debug skill to reproduce this failing behavior with a test, find the root cause, fix it, and log the analysis.