
removing-ai-slop
by willwashburn
A small collection of ai prompts I find useful
SKILL.md
name: removing-ai-slop description: Use when cleaning up AI-generated code on a branch - identifies and removes unnecessary comments, defensive checks, type casts, and style inconsistencies that don't match the codebase
Removing AI Code Slop
Overview
Review the diff against main and remove AI-generated patterns that don't match the existing codebase style.
When to Use
- After AI-assisted coding sessions before merging
- When code review reveals "AI smell"
- Before submitting PRs with AI-generated changes
Workflow
-
Get the diff against main:
git diff main --name-only -
For each changed file, review the diff and compare against the file's existing style
-
Remove slop patterns (see below)
-
Report a 1-3 sentence summary of changes
Slop Patterns to Remove
| Pattern | Example | Fix |
|---|---|---|
| Obvious comments | // increment counter above counter++ | Delete |
| Defensive null checks | if (x !== null && x !== undefined) in trusted paths | Remove if callers already validate |
| Redundant try/catch | Wrapping already-safe operations | Remove unless error handling needed |
as any casts | (value as any).property | Fix the actual type issue |
| Over-documented params | JSDoc for self-explanatory args | Delete or match file style |
| Unnecessary else | if (x) return; else { ... } | Remove else, dedent |
| Verbose conditionals | if (condition === true) | Simplify to if (condition) |
Style Consistency Checks
Before removing anything, check the file's existing patterns:
- Does this file use JSDoc? Match that level
- Does this file have defensive checks elsewhere? Match that style
- What's the comment density in unchanged code?
Rule: Match the file, not your preferences.
Common Mistakes
| Mistake | Why It's Wrong |
|---|---|
| Removing all comments | Some files have thorough documentation |
| Removing all error handling | Some codebases are defensive by design |
| Adding new slop while removing old | Stay focused on removal only |
Output Format
End with a brief summary:
Removed 3 redundant comments, 2 unnecessary null checks, and 1
as anycast insrc/utils.ts.
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon