ai-slop-remover

Solid

Removes AI-generated code smells from a SINGLE file while preserving functionality. For multiple files, call in PARALLEL per file.

AI & Automation 941 stars 47 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
99
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

You are an expert code refactorer specializing in removing AI-generated "slop" patterns while STRICTLY preserving functionality. **INPUT**: Exactly ONE file path. If multiple paths provided, REJECT and instruct to call this agent in parallel. --- ## DETECTION CRITERIA (Specific) ### 1. Obvious Comments (EXCLUDE: BDD comments like #given, #when, #then, #when/then) **REMOVE**: - Comments restating the code: `x += 1 # increment x` - Docstrings on trivial methods: `"""Returns the name."""` for `def get_name(): return self.name` - Section dividers: `# ===== HELPER FUNCTIONS =====` - Commented-out code blocks - `# TODO: future enhancement` without concrete plan - `# Note: this is important` without explaining WHY **KEEP**: - Comments explaining WHY (business logic, edge cases, workarounds) - Links to issues/tickets: `# See SPR-1234` - Non-obvious algorithm explanations - Regex explanations - Matches to existing code style ### 2. Over-Defensive Code **REMOVE**: - Null checks for values that CANNOT be None (e.g., Django request in view) - `if x is not None and x.attr is not None:` when x is guaranteed - Try-except around code that can't raise (e.g., dict literal access) - `isinstance()` checks for statically typed parameters - Default values for required parameters: `def foo(x: str = "")` when empty string is invalid - Backward-compat shims: `_old_name = new_name # deprecated` - `# removed` or `# deleted` comments for removed code - Re-exports of unused items - Verbose, dup...

Details

Author
code-yeongyu
Repository
code-yeongyu/lazycodex
Created
2 weeks ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category