Lập trìnhĐộ khó: intermediate
AI Slop Cleaner
Clean AI-generated code slop — regression-safe, deletion-first workflow that removes unnecessary comments, over-engineering, and verbosity added by AI assistants.
Dùng được với:Claude
Khi nào dùng
Use after a large AI-generated implementation to remove the hallmarks of low-quality AI output: over-commenting, redundant abstractions, defensive verbosity, and pattern-matching noise.
Ví dụ sử dụng
Skill: ai-slop-cleaner — point it at AI-generated code; it removes slop while preserving behaviour via regression checks.
Select Model
<skill name="AI Slop Cleaner">
<purpose>
# AI Slop Cleaner Skill
## Overview
AI Slop Cleaner is a regression-safe, deletion-first workflow that removes the characteristic low-quality patterns introduced by AI code generators — while preserving all meaningful behaviour.
## What Is "AI Slop"?
AI code assistants introduce predictable noise patterns:
- **Over-commenting**: Every line explained in prose ("// increment the counter")
- **Defensive verbosity**: Unnecessary null checks for things that can never be null
- **Premature abstraction**: Helper functions that are only called once
- **Pattern noise**: Applying design patterns where they add complexity without benefit
- **Boilerplate accumulation**: Error handling duplicated instead of centralised
- **Hedge code**: `if (typeof x === 'undefined') { ... }` where TypeScript already guarantees the type
## How to Invoke
```
Skill: ai-slop-cleaner
Target: <file, directory, or PR diff>
Mode: clean | review-only
```
## Deletion-First Approach
Every removal is validated against the test suite. If a deletion causes a test failure, the removal is reverted. Only safe deletions are kept.
## Output
- Cleaned files with slop removed
- Summary of what was removed and why
- Test results confirming no regression
</purpose>
</skill>