antislop-code
Fungsinya
Menyaring komentar kode yang terdengar seperti tulisan AI pada umumnya, seperti banner hiasan atau komentar yang hanya mengulang kode, lalu menyimpan yang memberi informasi nyata. Skill ini untuk developer yang ingin komentar kode lebih bersih.
Kapan dipakai
- βSaat developer meminta agent AI untuk menulis atau mengedit komentar kode dalam sebuah proyek.
- βSaat developer ingin menghapus banner hiasan atau komentar yang tidak berguna dari kode.
- βSaat developer ingin hanya menyimpan komentar yang memberi informasi nyata kepada pembaca.
Link skill
https://github.com/miqdadbadjuber/anti-slop/blob/main/skills/antislop-code/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βTolong bersihkan komentar di file ini. Hapus kalimat pengisi dan simpan catatan yang berguna.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill ini memeriksa setiap komentar untuk melihat apakah punya tujuan yang nyata, lalu menghapus yang bersifat hiasan, berulang, atau berlebihan. Skill ini hanya mengubah komentar, tidak pernah mengubah kode yang dijalankan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah ini akan mengubah kode saya?
Tidak. Skill ini hanya mengedit komentar dan membiarkan kode, nama, impor, dan format tetap seperti semula.
Apakah skill ini perlu aturan antislop inti?
Ya. Skill ini dirancang untuk digunakan bersama file antislop utama, yang berisi aturan bersama.
Komentar mana yang dipertahankan?
Skill ini mempertahankan komentar yang memberi informasi nyata bagi pembaca dan menghapus yang tidak menambah apa pun.
Detail
Deskripsi asli dari pembuat
Code comment hygiene for AI coding agents: remove generic AI-slop comments, keep the valuable ones, never touch the code.
repo: miqdadbadjuber/anti-slop
Popularitas
- Bintang GitHub
- 8.0k
- Peringkat
- #12648
- Lisensi
- MIT
- Diperbarui
- 1/11/2026
Komentar
- β¦
Skill lain dari repositori ini
antislop-copywriting
8.0kMembantu agent Anda menulis dan mengedit teks pemasaran, judul, dan ajakan bertindak dengan bahasa wajar, tanpa pola tulisan AI atau fakta yang dikarang.
antislop-human
8.0kMembantu agent Anda membangun antarmuka yang bisa dipakai orang sungguhan, dengan kontras teks yang terbaca, penggunaan keyboard, fokus yang terlihat, dan status yang jelas.
antislop-layoutmobile
8.0kMembantu agent Anda membuat tata letak yang menyesuaikan diri dari ponsel ke desktop, dengan grid yang rapi, tanpa overflow ke samping, dan target sentuh yang mudah ditekan.
antislop-ui
8.0kMembantu agent Anda mendesain antarmuka yang terlihat dibuat dengan cermat, bukan generik, dengan palet warna yang dipertimbangkan, tata letak yang nyata, dan gerakan yang punya tujuan.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.