ai-slop-cleaner

Remove dead code, duplicates, and unnecessary abstractions from AI-generated code.

Updated Mar 11, 2025
One-click install
npx skills add https://github.com/MohammedSaudAlsahli/dotfiles --skill ai-slop-cleaner-mohammedsaudalsahli
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ai-slop-cleaner
Source: https://github.com/MohammedSaudAlsahli/dotfiles/tree/main/ai/agents-skills/ai-slop-cleaner
Command: npx skills add https://github.com/MohammedSaudAlsahli/dotfiles --skill ai-slop-cleaner-mohammedsaudalsahli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps to clean up and refactor AI-generated code that is bloated, repetitive, or overly abstract, without altering intended behavior.

Core Features & Use Cases

  • Regression-Safe Cleanup: Ensures code changes do not alter behavior, using tests and a deletion-first approach.
  • Code Refactoring: Simplifies code by removing dead code, duplicate logic, and unnecessary abstractions.
  • Use Case: Ideal for post-review cleanup in AI code development, to maintain code quality without introducing new bugs.

Quick Start

Use the ai-slop-cleaner skill to clean up code in the 'src/auth' module by running /oh-my-claudecode:ai-slop-cleaner src/auth.

Frequently Asked Questions about ai-slop-cleaner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up AI-generated code slop without breaking existing functionality?▼

Refactor AI-generated code by removing dead code, duplicates, and unnecessary abstractions. The Skill uses a regression-safe, deletion-first approach to simplify bloated logic while ensuring tests pass and intended behavior remains unchanged.

What is the best way to remove dead code and unnecessary abstractions from AI code?▼

Remove dead code and unnecessary abstractions from AI code by applying a targeted refactoring strategy. A deletion-first workflow eliminates bloat and repetitive logic while preserving the original intended behavior through regression testing.

Do I need a regression testing strategy to refactor AI-generated code?▼

Yes, you need a clear regression testing strategy to refactor AI-generated code safely. A safe code cleanup plan requires tests to verify that removing duplicates and abstractions does not alter the intended behavior of the application.

Can I target a specific directory for AI code cleanup?▼

Yes, you can target a specific directory for AI code cleanup by providing a bounded file list. This focuses the refactoring and dead code removal on specific modules, such as running the cleanup command on the 'src/auth' directory.

When should I not use a deletion-first approach for code refactoring?▼

Avoid a deletion-first refactoring approach when you lack a clear regression testing strategy. Without tests to confirm intended behavior, removing dead code, duplicates, and unnecessary abstractions risks introducing new bugs into the AI-generated code.