fix-issue
npx skills add https://github.com/duc01226/easyplatform --skill fix-issue
Agent 安装分布
Skill 文档
Fix GitHub Issue: $ARGUMENTS
Fix a GitHub issue following the systematic debugging workflow based on the debug skill.
Summary
Goal: Systematically diagnose and fix a GitHub issue with evidence-based root cause analysis and user approval before implementation.
| Step | Action | Key Notes |
|---|---|---|
| 1 | Fetch issue details | gh issue view — extract title, labels, stack traces |
| 2 | Understand the issue | Map expected vs actual behavior, reproduction steps |
| 3 | Evidence gathering | Multi-pattern search: imports, string literals, dynamic invocations |
| 4 | Root cause analysis | Rank causes by probability with file:line evidence |
| 5 | Propose fix | Minimal changes, risk assessment, test plan, rollback plan |
| 6 | Wait for approval | Present analysis — DO NOT code without explicit user approval |
| 7 | Implement fix | Code changes, tests, PR creation |
Key Principles:
- Always use external memory at
.ai/workspace/analysis/issue-[number].md - If confidence < 90%, request user confirmation before proceeding
- Never make code changes without explicit user approval
IMPORTANT: Always use external memory at .ai/workspace/analysis/issue-[number].md for structured analysis.
IMPORTANT: Anti-Hallucination Protocols
Before any operation:
- “What assumptions am I making about this issue?”
- “Have I verified this with actual code evidence?”
- “Could I be wrong about the root cause?”
Phase 1: Fetch Issue Details
-
Get issue information:
gh issue view $ARGUMENTS -
Extract key information:
- Issue title and description
- Labels (bug, feature, enhancement)
- Related PRs or issues
- Assignees and reviewers
- Stack traces or error messages
-
Create analysis notes at
.ai/workspace/analysis/issue-[number].md
Phase 2: Understand the Issue
-
Analyze the issue:
- What is the expected behavior?
- What is the actual behavior?
- Are there reproduction steps?
- Is there a stack trace or error message?
-
Search codebase for relevant code:
- Use grep for error messages and keywords
- Search patterns:
.*EventHandler.*{Entity},.*Consumer.*{Entity}, etc. - Find related entities/components
- Map the affected code paths
Phase 3: Evidence Gathering
-
Multi-pattern search:
- Static imports and usages
- String literals (runtime/config references)
- Dynamic invocations (reflection, attributes)
-
Trace dependency chains:
- Who calls this code?
- Who depends on this code?
- Cross-service message flows
-
Read actual implementations (not just interfaces)
-
Document evidence with file:line references
Phase 4: Root Cause Analysis
Analyze across dimensions:
- Technical: Code defects, architectural issues
- Business Logic: Rule violations, validation failures
- Data: Corruption, integrity violations, race conditions
- Integration: API contract violations, cross-service failures
- Environmental: Configuration issues, deployment problems
Document:
- Potential root causes ranked by probability
- Evidence with file:line references
- Confidence level (High 90%+, Medium 70-89%, Low <70%)
Phase 5: Propose Fix
-
Design the fix:
- Minimal changes principle
- Follow platform patterns from documentation
- Consider edge cases
-
Risk assessment:
- Impact level (Low/Medium/High)
- Regression risk
- Affected components
-
Test plan:
- Unit tests to add
- Manual testing steps
- Regression considerations
-
Rollback plan:
- How to revert if fix causes issues
Phase 6: Wait for Approval
CRITICAL: Present your analysis and proposed fix in this format:
## Issue Analysis Complete - Approval Required
### Issue
#[number] - [title]
### Root Cause Summary
[Primary root cause with evidence at file:line]
### Proposed Fix
[Fix description with specific files and changes]
### Risk Assessment
- **Risk Level**: [Low/Medium/High]
- **Regression Risk**: [assessment]
### Confidence Level: [X%]
### Files to Modify:
1. `path/to/file.cs:line` - [change description]
**Awaiting approval to proceed with implementation.**
DO NOT make any code changes without explicit user approval.
Phase 7: Implement Fix
After approval:
- Make the code changes following platform patterns
- Add/update tests
- Verify fix works
- Create PR with issue reference using
gh pr create
Quick Verification Checklist
Before proposing any change:
- Searched static imports?
- Searched string literals?
- Checked dynamic invocations?
- Read actual implementations?
- Traced dependencies?
- Assessed what breaks?
- Documented evidence?
- Declared confidence?
If ANY unchecked â DO MORE INVESTIGATION If confidence < 90% â REQUEST USER CONFIRMATION
Use the debug skill for the complete debugging protocol. For autonomous mode, use debugging --autonomous.
â ï¸ MUST READ .ai/docs/AI-DEBUGGING-PROTOCOL.md for comprehensive guidelines.
IMPORTANT Task Planning Notes
- Always plan and break many small todo tasks
- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed