Tactical code cleanup focusing on type strictness, single responsibility, fail-fast patterns, and DRY. Detects sloppy code, workarounds, silent failures, god classes, and duplication...
Review tactical code quality through four complementary lenses:
Perform a review by default. Do not edit code unless the user explicitly asks for changes.
Honor an explicit user-provided review scope before applying defaults. Accept files, directories, snippets, diffs, commits, branches, pull-request refs, or the whole repository. A comparison-base option by itself configures branch comparison; it is not a review scope.
When the user does not specify a scope:
HEAD.main.HEAD, then review from the merge base through
HEAD. This includes already-pushed feature commits instead of comparing a feature branch
only with its same-named remote tracking branch.Read enough surrounding code, tests, configuration, and documentation to validate each finding. Distinguish problems introduced by the selected changes from relevant pre-existing context. Exclude generated, vendored, minified, lock, and snapshot files unless requested.
Run all four lenses unless the user selects one. If independent workers or subagents are available, the lenses may run in parallel with the same scope. Otherwise, run them sequentially. Parallelism is an optimization, not a requirement.
Evaluate contracts and behavior relative to the repository's language and conventions.
Report a candidate only when all of the following hold:
Treat file length, function length, any-like types, force unwraps, broad catches, fallbacks,
comments, and repeated lines as investigation signalsβnot automatic findings. Respect explicit
resilience boundaries, optional data, generated code, test scaffolding, and intentional local
duplication.
Lead with findings ordered by severity, then provide a short summary. Do not assign an overall letter grade; severity, confidence, evidence, and impact carry the assessment.
For each finding include:
### [high|medium|low] Concise title
- Location: `path:line`
- Lens: contracts | responsibility | failure-integrity | duplication
- Confidence: 80-100%
- Evidence: What the code does and the relevant surrounding context.
- Impact: The concrete failure mode or maintenance cost.
- Recommendation: The smallest change that addresses the cause.
Use high for likely correctness, data, or security failures; medium for material maintenance, debugging, or change-propagation costs; and low for bounded issues worth addressing. If no qualifying findings exist, say so directly and note any limits in scope.
Claude Code users may invoke /unslopify for a standalone install or
/unslopify:unslopify for the plugin, optionally with --types, --srp, --fail-fast, --dry,
or --sequential. Map the lens flags to contracts, responsibility, failure-integrity, and
duplication respectively; treat --sequential as disabling parallel workers and remaining
arguments as the explicit review scope. Other agents should follow this file directly.