Agent skill
systematic-debugging
Four-phase root cause investigation before attempting fixes. Use when debugging bugs, test failures, or unexpected behavior.
Install this agent skill to your Project
npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/dmjgilbert/systematic-debugging
SKILL.md
Systematic Debugging
ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
When to Use
- Encountering bugs or test failures
- Unexpected behavior in code
- Before proposing any fix
The Four Phases
Phase 1: Root Cause Investigation
Before proposing any solution:
- Read error messages thoroughly - Don't skip warnings or stack traces; they often contain exact solutions
- Reproduce consistently - Verify you can trigger the issue reliably with documented steps
- Check recent changes - Examine
git diff, dependencies, and configuration modifications - Gather diagnostic evidence - In multi-component systems, add instrumentation at component boundaries
- Trace data flow - Backward trace from the error to find where bad values originate
Phase 2: Pattern Analysis
Establish the pattern before fixing:
- Locate similar working code in the codebase
- Read reference implementations completely (not skimmed)
- List every difference between working and broken code
- Understand all dependencies and assumptions
Phase 3: Hypothesis Testing
Apply scientific method:
- State your hypothesis clearly: "I believe X is failing because Y, evidenced by Z"
- Test with the smallest possible change
- Change only ONE variable at a time
- Verify results before proceeding
Phase 4: Implementation
Fix the root cause systematically:
- Create a failing test case first (TDD)
- Implement a single fix addressing only the root cause
- Verify the fix resolves the issue without breaking other tests
- If fix doesn't work, return to Phase 1
Red Flags - STOP Immediately
- Proposing fixes without understanding the issue
- Attempting multiple simultaneous changes
- Assuming problems without verification
- Skipping evidence gathering
- Making "quick fixes" before investigation
When 3+ Fixes Fail
STOP. This signals an architectural problem, not a fixable bug:
- Do not attempt another fix
- Return to Phase 1
- Question whether the underlying pattern/design is sound
- Ask: "Should we refactor architecture vs. continue fixing symptoms?"
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
Results
Systematic approach: 15-30 minutes to resolution with 95% first-time success vs. Trial-and-error: 2-3 hours of thrashing with 40% success and new bugs introduced
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
perigon-backend
Perigon ASP.NET Core + EF Core + Aspire conventions
perigon-agent
Pointers for Copilot/agents to apply Perigon conventions
perigon-angular
Angular 21+ standalone/Material/signal conventions for Perigon WebApp
fastapi-mastery
Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.
context7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
browser-use
Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.
Didn't find tool you were looking for?