| name | fix-issue |
| description | Debug and fix bugs by reproducing issues, identifying root causes, implementing fixes, and validating without regressions. Use when debugging reported bugs, investigating test failures, or resolving production issues requiring root cause analysis. |
| acceptance | [{"bug_reproduced":"Bug successfully reproduced with failing test"},{"root_cause_identified":"Root cause clearly identified and documented"},{"fix_applied":"Minimal fix applied addressing root cause"},{"tests_passing":"Bug test now passes, all existing tests pass"},{"no_regressions":"No regressions introduced by fix"},{"edge_cases_tested":"Edge cases identified and tested"}] |
| inputs | {"issue_id":{"type":"string","required":true,"description":"Issue/bug identifier (e.g., bug-login-email, issue-42)","validation":"Must be valid issue identifier"},"severity":{"type":"enum","required":false,"description":"Issue severity: critical, high, medium, low","default":"medium"},"reproduction_confirmed":{"type":"boolean","required":false,"description":"Whether reproduction is confirmed","default":false}} |
| outputs | {"fix_complete":{"type":"boolean","description":"Whether bug fix is complete"},"bug_test_passes":{"type":"boolean","description":"Whether the new bug test passes"},"all_tests_pass":{"type":"boolean","description":"Whether all tests pass (no regressions)"},"regression_count":{"type":"number","description":"Number of regressions introduced (should be 0)"},"edge_case_tests_added":{"type":"number","description":"Number of edge case tests added"},"files_modified":{"type":"array","description":"List of files modified during fix"},"root_cause_location":{"type":"string","description":"File and line where root cause was identified"}} |
| telemetry | {"emit":"skill.fix-issue.completed","track":["issue_id","severity","reproduction_confirmed","root_cause_identified","duration_ms","files_modified_count","tests_added","tests_passed","regression_count"]} |
Fix Issue Skill
Purpose
Debug and fix bugs, issues, or failing tests through systematic reproduction, root cause analysis, minimal fixes, and comprehensive validation.
Core Principle: Always write failing test first, fix with minimal changes, validate with full test suite.
Prerequisites
- Clear issue description or failing test
- Access to relevant code and logs
- Test framework configured
Workflow
1. Understand Issue
Parse issue description:
- What is broken?
- When does it happen? (always/sometimes/specific condition)
- Where does it occur? (component/file/endpoint)
- Expected vs Actual behavior
- Impact severity (critical/high/medium/low)
Load context:
- Related task/story files (if applicable)
- Recent commits (if regression suspected)
- Error logs and stack traces
Example Analysis:
Issue: "Login fails when email contains + symbol"
Analysis:
- What: Login endpoint rejects valid emails with + symbol
- When: Always for emails like "user+tag@example.com"
- Where: POST /api/auth/login
- Expected: Email accepted, login succeeds
- Actual: Returns 400 "Invalid email format"
- Impact: Medium (blocks some users)
2. Reproduce Issue
Create failing test that demonstrates the bug:
describe('[Bug Fix] Login with + symbol in email', () => {
it('should accept email addresses with + symbol', async () => {
await User.create({
email: 'user+tag@example.com',
password: await bcrypt.hash('SecurePass123!', 12)
});
response = (app)
.()
.({
: ,
:
});
(response.).();
(response.).();
});
});