/skill-chain:slop-cleanerfrom skill-chain
Clean AI-generated code slop with a regression-safe, deletion-first workflow
Ships in skill-chain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to clean AI-generated code slop without drifting scope or changing intended behavior. This is the bounded cleanup workflow for code that works but contains dead code, duplication, needless abstraction, boundary violations, weak tests, or unnecessary dependencies.
--review flag for report-only modeDetermine the cleanup surface. Use one of:
git diff --name-only HEAD~N for recent changesgit diff --name-only main..HEAD for branch changesDo NOT silently expand scope beyond the identified files.
Read each file and classify code into smell categories:
| Smell | Description | Priority |
|---|---|---|
| Dead code | Unused functions, unreachable branches, stale flags, commented-out blocks | 1 (safest to remove) |
| Duplication | Copy-pasted logic, repeated helpers, near-identical functions | 2 |
| Needless abstraction | Pass-through wrappers, single-use helpers, premature generalization | 3 |
| Boundary violations | Hidden coupling, wrong-layer imports, leaking side effects | 4 |
| Weak tests | Assert nothing meaningful, mock everything, snapshot-only | 5 |
| Unnecessary dependencies | Trivial package usage, stdlib duplicates | 6 |
Before editing any code:
bun test or project-specific test commandFirst pass — safest changes:
Run tests after this pass.
Second pass:
Run tests after this pass.
Third pass — riskier changes:
Run tests after this pass.
Full test suite verification:
Produce a structured report:
## Slop Cleaner Report
### Summary
- Files scanned: N
- Files modified: N
- Lines deleted: N
- Lines added: N
- Net delta: -N lines
### Changes by Smell Type
- Dead code: N removals
- Duplication: N consolidations
- Needless abstraction: N simplifications
### Test Verification
- Before: N tests passing
- After: N tests passing
- Regressions: none
### Remaining Risks
- [Any smells skipped due to uncertainty]
- [Any files that need human review]
These are explicit failures of the slop cleaning process. Avoid them:
Bundling unrelated refactors — Each pass targets one smell type. Do not mix dead code removal with naming changes with structural refactors in the same commit.
Adding new abstractions while removing old ones — The goal is net reduction in abstraction. Replacing one wrapper with a different wrapper is not cleanup, it is churn.
Skipping test verification — Every pass must be bookended by test runs. No exceptions. If you cannot run tests, switch to --review mode and report only.
Expanding scope without permission — If the caller specified files A, B, C, clean only A, B, C. Do not "while I'm here" into files D and E.
Refactoring when deletion suffices — If code is unused, delete it. Do not refactor unused code into "better" unused code.
Creating new files during cleanup — Cleanup reduces files, it does not add them. If you find yourself creating a new utility file to "consolidate," you are adding abstraction, not removing it.
When invoked with --review, execute Steps 1-2 only. Produce a findings report without modifying any files:
## Slop Review Findings
### [filename]
- Line N-M: [smell type] — [description]
- Confidence: high/medium/low
- Recommended action: [delete/consolidate/inline/skip]
Review mode is for pre-merge audits and when you want a human to approve changes before execution.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
122 skills in this plugin
/accessibility-checkerRun automated WCAG 2.1 AA accessibility audits using axe-core via Playwright. Use when implementing or reviewing UI features to enforce accessibility compliance, catch color contrast failures, validate keyboard navigation, check screen reader landmarks, verify alt text and ARIA attributes, or gate feature completion on accessibility standards./adaptAdapt designs to work across different screen sizes, devices, contexts, or platforms. Implements breakpoints, fluid layouts, and touch targets. Use when the user mentions responsive design, mobile layouts, breakpoints, viewport adaptation, or cross-device compatibility./agent-creatorCreate new agent definitions with specific instruction sets, skill assignments, and behavioral rules. Use when the user wants a new type of agent (e.g., research-papers agent, customer-support agent, data-pipeline agent) or wants to modify an existing agent's behavior./ai-slop-cleanerClean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode/analytics-integrationIntegrate PostHog product analytics into a Next.js application with page views, event tracking, conversion funnels, A/B testing via feature flags, and API access for programmatic dashboard queries. Use when setting up product analytics, tracking user actions, defining conversion funnels, or enabling A/B experiments./animateReview a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight. Use when the user mentions adding animation, transitions, micro-interactions, motion design, hover effects, or making the UI feel more alive.npx claudepluginhub cheggin/skill-chain --plugin skill-chain2 plugins ship this exact skill · first indexed Oct 25, 2026