| name | apply-fixes |
| description | Apply correction prompts generated by /code-review. Use this whenever the user wants to apply, fix, or action the results of a code review — phrases like "apply the fixes", "fix the issues", "apply corrections", or after /code-review has run and produced a corrections/ directory. |
| argument-hint | <corrections-dir> [--dry] [--skip-tests] [--skip-build] [--skip-lint] |
| user-invocable | true |
| allowed-tools | Read, Edit, Grep, Glob, Bash(git diff *, npm run *, npx *, yarn *, pnpm *) |
Apply Fixes
Role: implementation. This skill modifies code — it receives correction prompts and applies minimal fixes.
You have been invoked with the /apply-fixes skill. Load correction prompt JSON files and apply each fix.
Implementation constraints
- Apply the minimal fix. Do not refactor, reorganize, or
improve beyond what the correction prompt instructs.
- Validate after each fix. Run lint/build/tests unless skipped.
If validation fails, report and move on — do not attempt
cascading fixes.
- Follow repository rules. Read CLAUDE.md, .clinerules,
CONTRIBUTING.md before applying fixes.
- One concern per fix. Each correction prompt addresses one
issue. Do not combine or reorder fixes.
- Be concise. Report results in the summary table format. No
narration of each step — just the outcome.
Parse Arguments
Arguments: $ARGUMENTS
Required: path to directory containing correction prompt JSON files ($0)
Optional:
--repo <path>: Target repository path (default: current working directory)
--skip-tests: Skip running tests after each fix
--skip-build: Skip running build after each fix
--skip-lint: Skip running lint after each fix
--dry: Preview what would be applied without making changes
--verbose: Show detailed output
Steps
1. Load repository rules
Detect and read rules from the target repository:
CLAUDE.md
.clinerules
.claude/rules/index.md
CONTRIBUTING.md
These rules inform how fixes should be applied.
2. Load correction prompts
Read all .json files from the specified directory, sorted
alphabetically. Each file contains:
{
"priority": "high|medium|low",
"category": "<agent-name>",
"instruction": "<what to fix>",
"context": "<where>",
"affectedFiles": ["<path>"]
}
3. Apply each fix
Copy this checklist and track progress:
- [ ] Correction prompts loaded
- [ ] Fixes sorted by priority
- [ ] All fixes applied
- [ ] Validation complete
- [ ] Summary generated
- [ ] Applied prompts moved to completed/
For each prompt, sorted by priority (high first):
- Read the affected file(s)
- Apply the minimal fix described in the instruction
- Follow all repository rules and coding conventions
- Do not change anything beyond what the instruction requires
4. Validate after each fix
Unless skipped, run after each fix:
- Lint — run the project's lint command
- Build — run the project's build command
- Tests — run the project's test command
If validation fails, report the failure and continue to the next fix.
5. Track and report
After completing all fixes, display a summary:
Fix Summary
===========
Total: N | Applied: N | Failed: N | Validation Failed: N
--- APPLIED ---
[category] instruction (files)
--- FAILED ---
[category] instruction (reason)
Move successfully applied prompt files to a completed/ subdirectory.
6. Suggest alternatives
For structural issues (long functions, duplication, deep nesting,
unclear names), mention the
refactoring plugin as an
alternative. It applies incremental, verified refactorings one at a
time — better suited for complex structural changes than batch
correction prompts.
Install: /add-plugin refactoring@refactoring --repo elifiner/refactoring