antislop-code
できること
一般的なAIの文章に見えるコードのコメントを絞り込みます。装飾的なバナーや、コードを繰り返しているだけのコメントを取り除き、実際の情報を持つものは残します。コードのコメントをすっきりさせたい開発者向けです。
使う場面
- ✓開発者が、プロジェクト内のコードのコメントを、AIエージェントに書かせる、または編集させるとき。
- ✓開発者が、装飾的なバナーや自明なコメントをコードから取り除きたいとき。
- ✓開発者が、読み手に実際の情報を与えるコメントだけを残したいとき。
スキルのリンク
https://github.com/miqdadbadjuber/anti-slop/blob/main/skills/antislop-code/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このファイルのコメントを整理してください。無駄な部分は消して、役立つメモは残してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、各コメントに実際の目的があるかを確認します。そのうえで、装飾的、繰り返し的、大げさなものを取り除きます。変更するのはコメントだけで、実行されるコードには触れない設定です。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
antislop-code
Anti Slop: Rules for AI Coding Agents. Code Comments skill
Part of the antislop system. Read together with
antislop.md(the core). This skill filters comments that read as generically AI (decorative, restating the obvious, stiff, loud) while preserving the comments that carry real information. It references core rules by number and never duplicates or renumbers them. Load it when the task writes or edits code comments.
How to use this skill
- Load together with
antislop.mdwhenever the task touches code comments. The core holds the mechanism (the purpose test, the three tiers, the Delivery Gate); this skill holds comment-specific depth. - Every entry has the same shape: Tell (the pattern), Why (why it reads as slop), Fix (what to do instead), with the governing core rule cited as R-XX.
- Scope guardrail: this skill only modifies comments. Never modify executable code, identifiers, imports, formatting, indentation, whitespace, control flow, or logic. When in doubt, leave the code untouched.
- The Delivery Gate in the core remains the gate. The "Code Comment Checklist" at the end of this file is the comment-specific supplement to run alongside it.
Comments That Add Nothing
Decorative Separators
- Tell: banner comments built from repeated characters, ALL CAPS labels, or box drawing around a section name:
// =======================aroundAuthentication,// -------- WORKFLOW --------, or a/* ---- ROUTES ---- */header. - Why: the decoration is the message. A label wrapped in
=or-signals "AI made this" without adding information, and ALL CAPS reads as shouting. - Fix: replace with a single plain line, or remove entirely if the label adds nothing (R-31).
Restating the Obvious
- Tell: a comment that repeats what the next line or declaration already shows, like
// Initialize the variableabovelet count = 0,// User classaboveclass User {},// Validate userabovefunction validateUser(), orconst userAge = 25; // User age is 25. - Why: it doubles the reading load without adding anything. The code already says it; the comment just repeats it.
- Fix: remove and leave the line of code alone.
Workflow Narration
- Tell: comments that narrate the flow step by step, like
// Step 1: Validate input,// Step 2: Process request,// Step 3: Return response, or// First...,// Next...,// Finally.... - Why: the control flow is visible in the code itself. Numbering it reads as a checklist, not an explanation.
- Fix: remove. If the flow is genuinely hard to follow, that is a structure problem, not a missing comment problem.
Empty Labels
- Tell: generic labels with no information behind them:
// Main logic,// Core logic,// Business logic,// Helper function,// Entry point,// Error handling, or// Note: This is important./// Important: Please read. - Why: the label names a category, not a fact. "Main logic" tells the reader nothing they could not infer from the code.
- Fix: remove unless the label carries specific information. "Note: retries happen only on 5xx" earns its place; "Note: this is important" does not.
Vague Placeholders
- Tell: comments that promise future work without saying what:
// TODO: Improve this,// Future improvements,// Additional optimization can be added here,// Add more validation. - Why: a vague TODO is noise. It names a feeling (this could be better) instead of a task (what, and why).
- Fix: remove. Keep a TODO only when it names a specific task with enough context to act on.
Signature Echo
- Tell: documentation that only restates the signature, like a JSDoc block that repeats
@param price The price.and@returns Total price.for a function whose name and parameters already say all of it. - Why: docs that echo the signature add length, not understanding. The reader learns nothing new.
- Fix: simplify or remove the echo. Keep documentation that explains business rules, edge cases, assumptions, algorithms, limitations, side effects, API behavior, or security implications. Never strip real documentation.
Decorative Emoji
- Tell: emoji used as decoration in comments, like
// ✅ Validationor// 🚀 Performance. - Why: emoji is visual noise in code, and the specific set (✅, 🚀, 🔒) is the AI default vocabulary.
- Fix: replace with plain English, or remove if the lab
よくある質問
コードは変わりますか?
いいえ。このスキルはコメントだけを編集し、コード、名前、インポート、書式はそのままにすると説明しています。
中核となるantislopのルールが必要ですか?
はい。このスキルは、共通のルールを持つメインのantislopファイルと一緒に使うことを想定しています。
どのコメントを残しますか?
読み手にとって実際の情報を持つコメントを残し、何も加えないものは取り除きます。
詳細
作者による元の説明
Code comment hygiene for AI coding agents: remove generic AI-slop comments, keep the valuable ones, never touch the code.
repo: miqdadbadjuber/anti-slop
人気
- GitHubのスター
- 8.0k
- ランキング
- #12648
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
antislop-copywriting
8.0kエージェントが、マーケティング文、見出し、行動喚起を、よくあるAIの書き方を避けた、平易で人間らしい言葉で書いたり編集したりできるよう支援します。事実のでっち上げも避けます。
antislop-human
8.0kエージェントが、読みやすいコントラスト、キーボード操作、見えるフォーカス、分かりやすい状態表示を備えた、実際の人が使えるインターフェースを作れるよう支援します。
antislop-layoutmobile
8.0kエージェントが、スマートフォンからデスクトップまでうまく再配置されるレイアウトを作れるよう支援します。整ったグリッド、横方向のはみ出しがないこと、タップしやすい領域を含みます。
antislop-ui
8.0kエージェントが、一般的な見た目ではなく、練られた色のパレット、実際のレイアウト、目的を持った動きを備えた、デザインされたインターフェースを作れるよう支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。