本文へスキップ
Skillpedia
一般的なプログラミング41k · #6990

ai-slop-cleaner

できること

このスキルは、ノイズが多い、繰り返しが多い、または作り込みすぎのコードを、動作を変えずに整理する手順をエージェントに案内します。AIツールに大量に書かせた後、より軽いコードにしたい人向けです。

使う場面

  • ✓コードは動くが、AIによる変更の後に肥大化したり繰り返しが多くなったりしたとき。
  • ✓重複したロジックと不要なコードを取り除く整理をしたいとき。
  • ✓コードの変更を加えず、整理すべき点だけを確認したいとき。

スキルのリンク

https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/ai-slop-cleaner/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/ai-slop-cleaner/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“このコードは動きますが、AIが書いたため肥大化しているように感じます。動作を変えずに整理してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、まず現在の動作を固定するテストを書き、整理の計画を立てます。その後、ステップごとにコードを削除または統合します。新しいコードを追加するより、コードを削除することを優先します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

AI Slop Cleaner

Use this skill to clean AI-generated code slop without drifting scope or changing intended behavior. In OMC, this is the bounded cleanup workflow for code that works but feels bloated, repetitive, weakly tested, or over-abstracted.

When to Use

Use this skill when:

  • the user explicitly says deslop, anti-slop, or AI slop
  • the request is to clean up or refactor code that feels noisy, repetitive, or overly abstract
  • follow-up implementation left duplicate logic, dead code, wrapper layers, boundary leaks, or weak regression coverage
  • the user wants a reviewer-only anti-slop pass via --review
  • the goal is simplification and cleanup, not new feature delivery

When Not to Use

Do not use this skill when:

  • the task is mainly a new feature build or product change
  • the user wants a broad redesign instead of an incremental cleanup pass
  • the request is a generic refactor with no simplification or anti-slop intent
  • behavior is too unclear to protect with tests or a concrete verification plan

OMC Execution Posture

  • Preserve behavior unless the user explicitly asks for behavior changes.
  • Lock behavior with focused regression tests first whenever practical.
  • Write a cleanup plan before editing code.
  • Prefer deletion over addition.
  • Reuse existing utilities and patterns before introducing new ones.
  • Avoid new dependencies unless the user explicitly requests them.
  • Keep diffs small, reversible, and smell-focused.
  • Stay concise and evidence-dense: inspect, edit, verify, and report.
  • Treat new user instructions as local scope updates without dropping earlier non-conflicting constraints.

Scoped File-List Usage

This skill can be bounded to an explicit file list or changed-file scope when the caller already knows the safe cleanup surface.

  • Good fit: oh-my-claudecode:ai-slop-cleaner skills/ralph/SKILL.md skills/ai-slop-cleaner/SKILL.md
  • Good fit: a Ralph session handing off only the files changed in that session
  • Preserve the same regression-safe workflow even when the scope is a short file list
  • Do not silently expand a changed-file scope into broader cleanup work unless the user explicitly asks for it

Ralph Integration

Ralph can invoke this skill as a bounded post-review cleanup pass.

  • In that workflow, the cleaner runs in standard mode (not --review)
  • The cleanup scope is the Ralph session's changed files only
  • After the cleanup pass, Ralph re-runs regression verification before completion
  • --review remains the reviewer-only follow-up mode, not the default Ralph integration path

Review Mode (--review)

--review is a reviewer-only pass after cleanup work is drafted. It exists to preserve explicit writer/reviewer separation for anti-slop work.

  • Writer pass: make the cleanup changes with behavior locked by tests.
  • Reviewer pass: inspect the cleanup plan, changed files, and verification evidence.
  • The same pass must not both write and self-approve high-impact cleanup without a separate review step.

In review mode:

  1. Do not start by editing files.
  2. Review the cleanup plan, changed files, and regression coverage.
  3. Check specifically for:
    • leftover dead code or unused exports
    • duplicate logic that should have been consolidated
    • needless wrappers or abstractions that still blur boundaries
    • missing tests or weak verification for preserved behavior
    • cleanup that appears to have changed behavior without intent
  4. Produce a reviewer verdict with required follow-ups.
  5. Hand needed changes back to a separate writer pass instead of fixing and approving in one step.

Workflow

  1. Protect current behavior first

    • Identify what must stay the same.
    • Add or run the narrowest regression tests needed before editing.
    • If tests cannot come first, record the verification plan explicitly before touching code.
  2. Write a cleanup plan before code

    • Bound the pass to the requested files or feature area.
    • List the concrete smells to remove.
    • Order the work from safest deletion to riskier consolidation.
  3. Classify the slop before editing

    • Duplication — repeated logic, copy-paste branches, redundant helpers
    • Dead code — unused code, unreachable branches, stale flags, debug leftovers
    • Needless abstraction — pass-through wrappers, speculative indirection, single-use helper layers
    • Boundary violations — hidden coupling, misplaced responsibilities, wrong-layer imports or
よくある質問

整理でアプリの動作が変わりますか?

変わらないように設計されています。エージェントは、先にリグレッションテストを追加して、現在の動作を固定します。

コードを編集せずに確認できますか?

はい。レビューのみのモードでは、ファイルを変更せずに整理すべき点を報告します。

新しい機能の開発に使うものですか?

いいえ。既存のコードを簡素化するためのもので、新しい製品機能を作るためのものではありません。

詳細

作者による元の説明

Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode

repo: Yeachan-Heo/oh-my-claudecode

人気

GitHubのスター
41k
ランキング
#6990
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル