From coding
Intelligently fixes code and test issues based on error messages, failing tests, or review feedback. Automatically detects the area of concern and applies the appropriate fix workflow. Corresponds to Steps 3-4 (Fix Test Issues + Optimize Test Structure) of the TDD lifecycle.
How this skill is triggered — by the user, by Claude, or both
Slash command
/coding:fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Intelligently fixes code and test issues based on error messages, failing tests, or review feedback. Automatically detects the area of concern and applies the appropriate fix workflow. Corresponds to Steps 3-4 (Fix Test Issues + Optimize Test Structure) of the TDD lifecycle.
Intelligently fixes code and test issues based on error messages, failing tests, or review feedback. Automatically detects the area of concern and applies the appropriate fix workflow. Corresponds to Steps 3-4 (Fix Test Issues + Optimize Test Structure) of the TDD lifecycle.
What this command does NOT do:
/coding:refactor)When to REJECT:
When executing this skill, the following standards apply:
| Standard | Purpose |
|---|---|
testing/scan | Test quality, patterns, coverage analysis |
typescript/scan | Type safety verification |
documentation/scan | Documentation completeness check |
When a specific rule violation is detected, load its fix guidance from testing/rules/<rule-id>.md.
| Standard | Purpose |
|---|---|
universal/write | General code authoring conventions |
typescript/write | TypeScript patterns and type safety |
function/write | Function design and complexity |
documentation/write | Documentation for test utilities |
testing/write | Test fixture and mock patterns |
ultrathink: you'd perform the following steps
Parse Arguments
--area flag (test, lint, type, review)--note for specific guidance--from-composite)Auto-Detect Area (if not specified)
Gather Error Context
Critical Root Cause Analysis
Create Fix Plan
Fix issues in test files including incorrect behavior, standards violations, and test-related problems while preserving test intent and correctness.
For Batch Execution (when >25 files affected):
Execute Test Corrections
Handle Unused Code Errors
throw new Error('IMPLEMENTATION: ...') patternIterate Until Passing
Fix issues in test fixtures and mocks, ensuring proper structure and organization while maintaining correctness. Skip this step if no fixtures/mocks exist.
Identify Fixture Issues
Apply Fixture Corrections
Verify Fixtures
Run Full Checks
npm run test or equivalentnpm run lint or equivalentError Anthropology (when failures occurred)
Output Format:
[OK/FAIL] Command: fix $ARGUMENTS
## Summary
- Area: [detected or specified area]
- Issues found: [count]
- Issues fixed: [count]
- Files modified: [count]
## Root Cause Analysis
- Expected behavior: [description]
- Root cause: [source_code_logic|test_implementation|requirements_unclear]
- Reasoning: [how expected behavior was determined]
## Issues Resolved
1. [file:line] - [issue description]
Fix: [what was changed]
2. [file:line] - [issue description]
Fix: [what was changed]
## Fixture Optimizations (if applicable)
- Fixtures processed: [count]
- Issues fixed: [count]
- Organization improvements: [count]
## Validation Results
- Tests: [PASS/FAIL] ([X] passing, [Y] failing)
- Types: [PASS/FAIL] ([N] errors)
- Lint: [PASS/FAIL] ([N] warnings)
## Next Steps
1. Review changes
2. Run full test suite
3. Refactor with /coding:refactor
4. Commit with /coding:commit
/fix
# Automatically detects issues and fixes them
/fix --area=test
# Focuses only on fixing test failures
/fix "src/auth/login.ts"
# Fixes issues in specific file
/fix --area=lint --note="Focus on unused variables"
# Fixes lint issues with specific focus
/fix "src/utils/" --note="Address code review feedback: improve error handling"
# Applies specific improvements based on review notes
/fix "src/perfect-code.ts"
# No issues found in src/perfect-code.ts
# All checks passing -- nothing to fix
npx claudepluginhub alvis/.claude --plugin codingSystematically identifies and fixes failing tests by grouping errors by type, module, and root cause. Prioritizes infrastructure fixes first, verifies subsets with pytest patterns before full suite.
Groups all failing tests by error type and root cause, then fixes them in dependency order with focused verification before moving to the next group.