debug
Full debugging workflow — reproduce the bug with a focused check, perform root cause analysis, then implement a minimal fix.
Install
npx skills add https://github.com/cyrusagents/cyrus --skill debugSKILL.md
Debug
Debug a reported issue using a structured reproduction-then-fix approach.
Phase 1: Reproduction & Root Cause Analysis
- Investigate — Analyze the bug report for key symptoms and error messages
- Trace — Search the codebase for error occurrence patterns, trace from symptom to source
- Root cause — Identify the root cause through data flow analysis and edge case checking
- Reproduce — Reproduce the exact error with the smallest useful check (a command, dry run, manual flow, or automated test)
- Document — Clearly document the root cause and reproduction steps
Phase 2: Fix Implementation
- Plan — Analyze the optimal fix approach based on root cause, check for similar fixes in the codebase
- Implement — Make the minimal, targeted fix that addresses the root cause
- Verify — Repeat the reproduction to confirm the fix and run relevant existing checks. Follow
verify-and-shipfor proportionate scope; add a regression test only when the concrete failure warrants durable coverage
Principles
- Minimal changes — Fix the bug, nothing more
- Targeted — Only touch affected code paths
- Verified — Confirm the reproduction succeeds after the fix and preserve relevant existing safeguards; a new test file is not mandatory
- No unrelated improvements — Stay focused on the specific bug
Related skills
tddmattpocock979KTest-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.diagnosing-bugsmattpocock678KDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.migrate-to-shoehornmattpocock388KMigrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.systematic-debuggingobra275KUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes
