Appearance
Fixing Commands
Commands for debugging and fixing issues.
Overview
| Command | Focus | Depth | Use Case |
|---|---|---|---|
/fix:fast | Quick | Surface | Obvious issues |
/fix:hard | Deep | Root cause | Complex bugs |
/fix:test | Tests | Targeted | Test failures |
/fix:ci | CI/CD | Pipeline | Build failures |
/fix:types | Types | TypeScript | Type errors |
/fix:ui | UI | Visual | UI bugs |
/fix:logs | Logs | Analysis | Log-based debug |
/fix:parallel | Multiple | Parallel | Many issues |
Commands
/fix:fast
Quick fix for obvious issues.
/fix:fast Button click not workingProcess:
- Searches for related code
- Identifies likely cause
- Applies fix
- Runs quick test
Best for: Typos, missing imports, obvious bugs.
/fix:hard
Deep investigation for complex bugs.
/fix:hard Users can't login after password resetProcess:
- Traces backward through call stack
- Identifies all related code paths
- Analyzes data flow
- Creates hypothesis
- Tests hypothesis
- Applies fix with defense-in-depth
Debugging methodology:
Error Location
│
▼
Backward Trace
│
▼
Root Cause Analysis
│
▼
Multiple Layer Validation
│
▼
Fix + Preventive MeasuresBest for: Intermittent bugs, data issues, security problems.
/fix:test
Fix failing tests.
/fix:testOr specify test file:
/fix:test src/auth/__tests__/login.test.tsProcess:
- Runs test suite
- Identifies failures
- Analyzes test expectations vs actual
- Fixes code or test as appropriate
- Re-runs to verify
Best for: Post-implementation test failures.
/fix:ci
Fix CI/CD pipeline issues.
/fix:ciRequirements: gh CLI installed and authenticated.
Process:
- Fetches recent workflow runs via
gh - Identifies failed jobs
- Analyzes error logs
- Fixes configuration or code
- Pushes fix
- Monitors re-run
Common fixes:
- Dependency version mismatches
- Environment variable issues
- Test timeouts
- Build configuration
Best for: GitHub Actions failures, deployment issues.
/fix:types
Fix TypeScript type errors.
/fix:typesProcess:
- Runs
tsc --noEmit - Parses type errors
- Groups by file
- Applies fixes:
- Add missing types
- Fix type mismatches
- Update interfaces
- Re-runs check
Best for: After refactoring, upgrading dependencies.
/fix:ui
Fix UI and visual issues.
/fix:ui Modal not closing on backdrop clickProcess:
- Identifies UI component
- Analyzes event handlers
- Checks CSS/styling
- Applies fix
- Suggests visual verification
Best for: Interactive bugs, styling issues, accessibility.
/fix:logs
Debug using log analysis.
/fix:logs path/to/error.logProcess:
- Parses log file
- Identifies error patterns
- Correlates timestamps
- Traces to source code
- Suggests fixes
Best for: Production issues, async bugs.
/fix:parallel
Fix multiple issues in parallel.
/fix:parallelRequirements: claude-flow MCP tools.
Process:
- Spawns analyzer agents
- Each agent investigates one issue
- Coordinates fixes
- Avoids conflicts
- Commits separately or together
Best for: Multiple unrelated bugs, post-merge fixes.
Debugging Principles
Root Cause First
Never patch symptoms. Always trace to root cause:
Symptom: Login button disabled
│
▼
Surface cause: isLoading = true
│
▼
Deeper: API call pending
│
▼
Root cause: Network timeout not handled
│
▼
Fix: Add timeout + error handlingDefense in Depth
Apply fixes at multiple layers:
- Input validation - Prevent bad data
- Business logic - Handle edge cases
- Error handling - Graceful failures
- Logging - Debugging info
- Monitoring - Detect recurrence
Verification Gates
Before marking fixed:
- [ ] Root cause identified (not just symptom)
- [ ] Fix applied at correct layer
- [ ] Tests added/updated
- [ ] No regression in related code
- [ ] Error handling improved
Tips
- Start with
/fix:fastfor simple issues - Escalate to
/fix:hardif quick fix fails - Always verify fix doesn't break other tests
- Add test for the bug to prevent regression
- Use
/fix:logsfor production debugging
Related
- Coding Commands - Implementation
- Debugging Skill - Methodology details