aislop fix takes the findings from a scan and acts on them. It applies mechanical fixes first—unused imports, narrative comments, formatting, dead code—and for everything that requires broader context it can open your preferred AI coding agent with a structured prompt that contains the full list of remaining diagnostics. The result is a clean, two-stage workflow: commit what the machine can fix, then let your agent handle the rest.
Fix workflow
Work through the stages in order to reach 100/100 with the least disruption to your codebase:Apply only reversible fixes with --safe
Start conservatively.
--safe restricts the run to fixes that cannot change behaviour: unused-import removal, import merging, narrative-comment removal, and formatting. Apply these, review the diff, and commit.Run the standard auto-fixer
Without
--safe, aislop also clears console-log leftovers, removes dead code, and runs lint autofixes. Review the diff before committing.Run aggressive fixes with --force
--force adds dependency auditing, framework alignment checks, and unused-file removal. These are more disruptive, so review the diff carefully.Hand off remaining issues to your agent
Any issues that need judgment or broader context get passed to your coding agent with full diagnostic information. Pick the agent you use:
Flags
Show detailed progress for each fix operation as it runs, including which files are modified and which rules are being resolved.
Run aggressive fixes in addition to standard ones. This includes dependency auditing, framework dependency alignment, and unused-file removal. Changes here are more likely to affect behaviour—review the diff before committing.
Restrict the run to reversible fixes only. Safe mode applies:
- Unused-import removal
- Import merging
- Narrative-comment removal
- Formatting
--safe run is designed to be “apply and commit” without review.Print an agent-ready prompt to stdout describing the remaining issues, without opening any specific agent. Use this flag when you want to paste the prompt into any tool or inspect it first.
Agent handoff flags
When auto-fix can’t resolve an issue, pass the remaining diagnostics to your coding agent. Each flag opens that agent and provides the structured prompt automatically. Use--prompt / -p if you prefer an agent-agnostic output you can paste anywhere.
- Terminal agents
- Editor agents
| Flag | Agent |
|---|---|
--claude | Claude Code |
--codex | Codex CLI |
--gemini | Gemini CLI |
--kimi | Kimi Code CLI |
--opencode | OpenCode |
--aider | Aider |
--goose | Goose |
--pi | pi |
--crush | Crush |
--amp | Amp |
--warp | Warp |
What —safe restricts
--safe is designed for situations where you want to improve the score with zero risk of introducing bugs. The table below shows what runs and what is skipped:
| Fix type | --safe | Standard fix | fix -f |
|---|---|---|---|
| Unused-import removal | ✅ | ✅ | ✅ |
| Import merging | ✅ | ✅ | ✅ |
| Narrative-comment removal | ✅ | ✅ | ✅ |
| Formatting | ✅ | ✅ | ✅ |
| Console-log removal | — | ✅ | ✅ |
| Dead-code elimination | — | ✅ | ✅ |
| Lint autofixes | — | ✅ | ✅ |
| Unused-declaration pruning | — | ✅ | ✅ |
| Dependency auditing | — | — | ✅ |
| Framework alignment | — | — | ✅ |
| Unused-file removal | — | — | ✅ |