From code-cleanup
Remove AI-generated code patterns ("slop") from a branch. Use when asked to clean up AI-generated code, remove slop, fix AI coding style issues, or make AI-written code look human-written. Triggers on phrases like "remove slop", "clean up AI code", "fix AI style", or "make this look human-written".
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-cleanup:code-cleanupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Remove AI-generated patterns from code changes while preserving intentional functionality.
Remove AI-generated patterns from code changes while preserving intentional functionality.
git diff master...HEAD (or specified base branch)Unnecessary comments
// increment counter, // return the result)Defensive overkill
Type escapes
any to bypass type errors@ts-ignore / @ts-expect-error without justificationRecord<string, any>)Style inconsistencies
Drizzle artifacts to revert
_journal.json files (migration journal)meta/*_snapshot.json)git checkout master -- <file> or remove from stagingDuplicate hooks/utilities
Redundant error handling
onError handlers in mutations when QueryClient already handles errors globally via MutationCache.onErrorManual cache invalidation
queryClient.invalidateQueries() calls when useOptimism hook is availableuseOptimism functions instead:
optimisticalltyAddToList for create operationsoptimisiticallyUpdateObjectInList for updatesoptimisticallyRemoveFromList + revertOptimisticUpdate for optimistic deletessyncCacheWithServer for post-mutation syncOne-off mutations duplicating existing hooks
use*Actions or use*Mutations hooks before creating inline mutationsnpx claudepluginhub franchiseai/claude-code-plugins --plugin code-cleanupRemoves AI-generated code slop, unnecessary comments, and over-engineering from the current branch diff. Use before committing or when code feels over-engineered.
Polishes code changes before PR by recovering branch context, checking against codebase guidelines for changed files, removing AI slop like extra comments and casts, and final review.
Removes AI-generated code slop from current branch by checking git diff against main, targeting extra comments, abnormal defensive checks, try/catch blocks, and style inconsistencies. Summarizes changes.