ai-slop-cleaner

Automate cleanup of AI-generated code and prose with regression-test-first validation.

Updated Jul 3, 2025
One-click install
npx skills add https://github.com/andrew-t-james/dotfiles --skill ai-slop-cleaner-andrew-t-james
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-slop-cleaner
Source: https://github.com/andrew-t-james/dotfiles/tree/main/dot_codex/skills/ai-slop-cleaner
Command: npx skills add https://github.com/andrew-t-james/dotfiles --skill ai-slop-cleaner-andrew-t-james

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The AI Slop Cleaner reduces bloated, noisy, and unnecessary AI-generated code or text by applying a disciplined, regression-tests-first cleanup workflow.

Core Features & Use Cases

  • Targeted cleanup passes based on defined smells: duplication, dead code, and boundary violations.
  • Bounded to changed files when available, preserving behavior and improving signal quality.
  • Provides an evidence-driven finish with regression tests and risk assessment.

Quick Start

Initiate a focused cleanup on the specified files and run regression tests to verify behavior remains unchanged.

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 while preserving behavior?

To clean up AI-generated code while preserving behavior, apply a regression-test-first workflow that categorizes issues by smells like duplication and dead code, delivering minimal-risk edits verified by tests.

What is the best way to refactor AI code duplication without breaking functionality?

The best way to refactor AI code duplication without breaking functionality is using a targeted cleanup pass bounded to changed files, enforcing regression tests before applying edits to ensure behavior remains unchanged.

How do I remove dead code introduced by AI in a specific scope?

You can remove AI-introduced dead code within a specific scope by running a cleanup bounded to changed files, categorizing the dead code as a smell, and validating its removal with regression tests.

Can I automate AI code cleanup for boundary violations safely?

Yes, you can automate AI code cleanup for boundary violations safely by categorizing them as code smells and applying an auditable plan with minimal-risk edits backed by regression test validation.

Does AI slop cleanup require existing tests to run?

AI slop cleanup enforces a regression-test-first workflow, meaning you need to run regression tests on the specified files to verify behavior remains unchanged before and after the cleanup edits are applied.

When should I not use automated refactoring for AI code smells?

You should not use automated refactoring for AI code smells when you cannot establish regression tests first, as the workflow relies on test validation to preserve behavior and assess the risk of edits.