Skip to content
cccskills
FreePublished on GitHub

ai-slop-cleaner

Clean up working code by identifying duplication, dead code, unnecessary layers, and error paths that hide failures. Preserve behavior with targeted tests, simplify the requested files in stages, and report verification results and remaining risks.

OriginalShow the original description

Run an anti-slop cleanup/refactor/deslop workflow

Run score Not tested

See how to install

Good for

  • Simplify bloated or repetitive AI-generated code
  • Remove unused code and unnecessary wrappers
  • Review fallback paths that hide errors
  • Refactor selected files while preserving tested behavior

Files included (1)

  • SKILL.md4.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

AI Slop Cleaner Task Card

Use this bounded helper for cleanup/refactor/deslop work, not as a competing top-level workflow. Shared operating invariants live in templates/AGENTS.md; this card defines scope, smell taxonomy, passes, and evidence.

When to use and inputs

Use when working code is bloated, noisy, repetitive, over-abstracted, or AI-generated; the user requests cleanup/refactor/deslop; or a follow-up left duplicate/dead code, weak boundaries, missing tests, fallback-like paths, or wrappers. Inputs are the requested feature/files and behavior to preserve. A file list scope is valid; keep the pass bounded to it. Limit the pass to the calling task's changed files unless broader cleanup was requested.

Before editing

  1. Lock behavior with regression tests first: identify behavior to preserve, run/add the narrowest targeted tests, and cover both primary and preserved compatibility/fail-safe fallback paths.
  2. Create a cleanup plan before code: list scope and smells, include fallback findings/classifications/escalation, and order safest/highest-signal fixes first.
  3. Inventory fallback-like code in scope: quick hacks, temporary workaround, temporary fallback, just bypass, just skip, fallback if it fails, swallowed errors, silent defaults, broad compatibility shims, and duplicate alternate execution paths.
  4. Classify each fallback: Masking fallback slop hides evidence, bypasses the contract, suppresses validation, swallows failures, silently defaults, or adds untested paths; Grounded compatibility/fail-safe fallback is narrow at an external/version/fail-safe boundary, documents rationale, preserves failure evidence, and tests primary plus fallback.
  5. Prefer root-cause repair, deletion, boundary repair, or explicit failure behavior. For broad/ambiguous/cross-layer/architectural findings, invoke $ralplan for consensus resolution; when already inside ralplan, ultragoal, team, or another OMX workflow, do not spawn a nested $ralplan—attach the finding to the active handoff.

Smell taxonomy and passes

Classify before changing:

  • Fallback-like code: masking fallbacks, workaround branches, bypasses, swallowed errors, silent defaults, broad shims, alternate paths.
  • Duplication: repeated logic, copy-paste branches, redundant helpers.
  • Dead code: unused/unreachable code, stale flags, debug leftovers.
  • Needless abstraction: pass-through wrappers, speculative indirection, single-use layers.
  • Boundary violations: hidden coupling, leaky responsibilities, wrong-layer imports/side effects.
  • Missing tests: behavior not locked or edge cases uncovered.
  • UI/design slop: context-sensitive signals, not absolute bans; preserve intentional brand, design-system, accessibility, or product-context exceptions. Challenge Korean body text at 11-12px (generally 14px or larger); gratuitous box shadows; repetitive eyebrow + title + description + paragraph stacks and generic emoji badges; default AI blue/purple such as #3B82F6; reflexive 3-column or 4-column grids; and extreme gradients unless justified by context.

Resolve the fallback-like code resolution gate first, then one smell at a time: Pass 1: Dead code deletion; Pass 2: Duplicate removal; Pass 3: Naming/error handling cleanup; Pass 4: Test reinforcement. Re-run targeted verification after each pass and avoid unrelated refactors. Prefer deletion/existing utilities; no new abstractions or dependencies unless explicitly required.

Evidence/output contract

Report:

AI SLOP CLEANUP REPORT
Scope: [files/feature]
Behavior Lock: [targeted tests added/run]
Cleanup Plan: [bounded smells/order]
Fallback Findings: [finding -> masking fallback slop | grounded compatibility/fail-safe fallback -> escalation]
UI/Design Findings: [none/N/A or signal -> action/defer -> intentional rationale]
Passes Completed: [resolution gate; Passes 1-4]
Quality Gates: Regression tests, Lint, Typecheck, Tests, Static/security scan (PASS/FAIL/N/A)
Changed Files: [path -> simplification]
Remaining Risks: [none or deferred item]

Include changed files, simplifications, fallback classifications/escalation status, tests/diagnostics/build checks run, UI findings when relevant, and deferred risks. Keep writer/reviewer separation for cleanup plans and approvals.

Exit condition

Stop when the requested scope has behavior-lock evidence, each selected smell pass is complete or explicitly deferred with rationale, verification is reported, and no unrelated files or temporary artifacts remain. Never present an unverified cleanup as complete; escalate a real architectural blocker rather than masking it.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

analyze

FreeSummary

Investigate repository behavior, architecture, or possible causes without changing files. Trace relevant code and supporting material, then rank explanations by evidence and confidence, with concrete file references and clear distinctions between observations, conclusions, and unresolved questions.

  • Investigate possible causes of a bug
  • Understand behavior across multiple files
  • Explain architecture and tradeoffs
Yeachan-Heo/oh-my-codex33.6KUpdated Oct 23, 2026

ask

FreeSummary

Ask Claude or Gemini through a locally installed command-line tool for focused questions, reviews, brainstorming, or second opinions. Save the prompt, original response, summary, and next steps in a reusable Markdown file.

  • Get a second opinion on a proposed approach
  • Ask Claude or Gemini to review work
  • Save brainstorming results for later use
Yeachan-Heo/oh-my-codex33.6KUpdated Oct 23, 2026

autopilot

FreeSummary

Take an idea or issue through requirements clarification, reviewed planning, implementation, and verification. Supervise all stages in one recoverable OMX workflow, preserving artifacts and progress so work can resume or return to planning when findings require changes.

  • Deliver an issue from requirements clarification through verification
  • Turn an initial idea into a reviewed implementation plan
  • Resume interrupted work from its saved phase
Yeachan-Heo/oh-my-codex33.6KUpdated Oct 23, 2026

autoresearch

FreeSummary

Run a persistent research workflow with a defined goal and explicit acceptance checks. It saves progress and finishes only when a recorded result passes either a validation script or an architect review of the research output.

  • Research with explicit acceptance criteria
  • Verify research results with a script
  • Require review approval before completing research
Yeachan-Heo/oh-my-codex33.6KUpdated Oct 23, 2026

Find the replacement for a research command removed in OMX 0.21. This migration notice directs existing autoresearch-goal usage to $autoresearch, the canonical research loop that requires validation before proceeding.

  • Check the replacement for a removed research command
  • Update requests to use $autoresearch
  • Confirm which command owns the research mission lifecycle
Yeachan-Heo/oh-my-codex33.6KUpdated Oct 23, 2026

Research recommended practices for a chosen technology using official documentation and maintainer sources. Get a cited recommendation that explains version context, local project constraints, uncertainties, and the next steps for planning or implementation.

  • Check official guidance for a chosen technology
  • Research version-specific migration advice
  • Gather evidence before implementation planning
Yeachan-Heo/oh-my-codex33.6KUpdated Oct 23, 2026

See all skills by Yeachan-Heo

Report a problem with this skill