ai-slop-cleaner

Removes AI-generated code slop through regression-tests-first, smell-by-smell cleanup passes.

Updated Feb 1, 2024
One-click install
npx skills add https://github.com/ogiboy/portfolio-app --skill ai-slop-cleaner-ogiboy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-slop-cleaner
Source: https://github.com/ogiboy/portfolio-app/tree/main/.codex/skills/ai-slop-cleaner
Command: npx skills add https://github.com/ogiboy/portfolio-app --skill ai-slop-cleaner-ogiboy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated code often accumulates bloat: duplicated logic, dead code, needless abstractions, masking fallbacks, and weak test coverage. This Skill provides a disciplined cleanup workflow that removes that slop without changing behavior or triggering broad risky rewrites. ## Core Features & Use Cases - Regression-Tests-First Workflow: Locks existing behavior with targeted tests before any cleanup edit, then verifies after every pass. - Smell-by-Smell Passes: Handles fallback-like code, duplication, dead code, needless abstraction, boundary violations, UI/design slop, and missing tests in ordered, bounded passes. - Fallback Classification: Distinguishes masking fallback slop from grounded compatibility/fail-safe fallbacks, with escalation to planning workflows for ambiguous cases. - Use Case: After an AI coding session leaves a feature working but noisy, run this Skill scoped to the changed files to delete dead code, deduplicate logic, and reinforce tests while keeping the diff minimal. ## Quick Start Ask the AI to run the ai-slop-cleaner deslop workflow on the files changed in your last session, keeping behavior locked with regression tests.

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 without breaking behavior?

Lock behavior with targeted regression tests before editing, then execute cleanup one smell category at a time: dead code deletion, duplicate removal, naming and error handling cleanup, and test reinforcement. Re-run verification after each pass and keep the diff minimal and scoped.

What is the best workflow for refactoring bloated AI-generated code?

Use a bounded deslop workflow: create an explicit cleanup plan, inventory fallback-like code, categorize smells, then run ordered passes with quality gates for lint, typecheck, and tests. Avoid bundling unrelated refactors into one large edit set.

Can the cleanup be scoped to only changed files?

Yes. The skill accepts a file list scope, such as changed files from an automated coding session, and keeps the entire cleanup pass strictly bounded to that list instead of touching the whole feature area.

How are fallback and workaround code paths handled during cleanup?

Each fallback-like finding is classified as masking fallback slop or grounded compatibility/fail-safe fallback. Masking fallbacks are removed or repaired at the root cause, while grounded fallbacks with documentation and regression tests for both paths may be preserved.

When should cleanup findings be escalated instead of edited?

Broad, ambiguous, cross-layer, or architectural fallback-like code should be escalated to a consensus planning workflow before edits. When already inside such a workflow, findings are recorded and attached to the active plan instead of spawning a nested one.