Agent SkillsYeachan-Heo/oh-my-codex › ai-slop-cleaner

ai-slop-cleaner

GitHub

AI Slop Cleaner 是一个代码清理与重构技能,旨在消除臃肿、重复、过度抽象及 AI 生成的劣质代码。通过先锁定回归测试、识别气味分类、处理回退逻辑等步骤,在保持行为不变的前提下提升代码质量。

skills/ai-slop-cleaner/SKILL.md Yeachan-Heo/oh-my-codex

Trigger Scenarios

代码臃肿或噪声大 用户请求清理/重构/AI去噪 遗留重复或死代码 边界模糊或缺少测试

Install

npx skills add Yeachan-Heo/oh-my-codex --skill ai-slop-cleaner -g -y
More Options

Use without installing

npx skills use Yeachan-Heo/oh-my-codex@ai-slop-cleaner

指定 Agent (Claude Code)

npx skills add Yeachan-Heo/oh-my-codex --skill ai-slop-cleaner -a claude-code -g -y

安装 repo 全部 skill

npx skills add Yeachan-Heo/oh-my-codex --all -g -y

预览 repo 内 skill

npx skills add Yeachan-Heo/oh-my-codex --list

SKILL.md

Frontmatter
{
    "name": "ai-slop-cleaner",
    "description": "Run an anti-slop cleanup\/refactor\/deslop workflow"
}

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. In the Ralph workflow, run this skill on Ralph's changed files only, standard mode unless explicitly requested otherwise.

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, ralph, 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.

Version History

  • 3ad79a8 Current 2026-08-28 17:53

    更新为任务卡片格式,细化操作不变量;新增 fallback-like code 分类标准(掩盖型vs稳健型);明确 Ralph 工作流中的范围限制及 $ralplan 调用规范。

  • e94437f 2026-08-20 07:18

Same Skill Collection

plugins/oh-my-codex/skills/analyze/SKILL.md
plugins/oh-my-codex/skills/ask/SKILL.md
plugins/oh-my-codex/skills/autopilot/SKILL.md
plugins/oh-my-codex/skills/autoresearch-goal/SKILL.md
plugins/oh-my-codex/skills/autoresearch/SKILL.md
plugins/oh-my-codex/skills/best-practice-research/SKILL.md
plugins/oh-my-codex/skills/cancel/SKILL.md
plugins/oh-my-codex/skills/configure-notifications/SKILL.md
plugins/oh-my-codex/skills/deep-interview/SKILL.md
plugins/oh-my-codex/skills/design/SKILL.md
plugins/oh-my-codex/skills/hud/SKILL.md
plugins/oh-my-codex/skills/omx-setup/SKILL.md
plugins/oh-my-codex/skills/performance-goal/SKILL.md
plugins/oh-my-codex/skills/pipeline/SKILL.md
plugins/oh-my-codex/skills/prometheus-strict/SKILL.md
plugins/oh-my-codex/skills/ralph/SKILL.md
plugins/oh-my-codex/skills/ralplan/SKILL.md
plugins/oh-my-codex/skills/skill/SKILL.md
plugins/oh-my-codex/skills/team/SKILL.md
plugins/oh-my-codex/skills/ultragoal/SKILL.md
plugins/oh-my-codex/skills/ultraqa/SKILL.md
plugins/oh-my-codex/skills/ultrawork/SKILL.md
plugins/oh-my-codex/skills/visual-ralph/SKILL.md
plugins/oh-my-codex/skills/wiki/SKILL.md
plugins/oh-my-codex/skills/worker/SKILL.md
skills/analyze/SKILL.md
skills/ask-claude/SKILL.md
skills/ask-gemini/SKILL.md
skills/ask/SKILL.md
skills/autopilot/SKILL.md
skills/autoresearch/SKILL.md
skills/best-practice-research/SKILL.md
skills/cancel/SKILL.md
skills/configure-notifications/SKILL.md
skills/deep-interview/SKILL.md
skills/design/SKILL.md
skills/frontend-ui-ux/SKILL.md
skills/git-master/SKILL.md
skills/hud/SKILL.md
skills/omx-setup/SKILL.md
skills/performance-goal/SKILL.md
skills/pipeline/SKILL.md
skills/prometheus-strict/SKILL.md
skills/ralplan/SKILL.md
skills/skill/SKILL.md
skills/team/SKILL.md
skills/ultragoal/SKILL.md
skills/ultraqa/SKILL.md
skills/visual-ralph/SKILL.md
skills/wiki/SKILL.md

Metadata

Files
0
Version
3ad79a8
Hash
227c02cb
Indexed
2026-08-20 07:18

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 04:07
浙ICP备14020137号-1 $Carte des visiteurs$