antislop-code
What it does
Filters code comments that read as generic AI writing, such as decorative banners or comments that repeat the code, and keeps the ones that carry real information. It is for developers who want cleaner code comments.
When to use it
- ✓When a developer asks an AI agent to write or edit code comments in a project.
- ✓When a developer wants decorative banners or obvious comments removed from code.
- ✓When a developer wants to keep only the comments that give the reader real information.
Skill link
https://github.com/miqdadbadjuber/anti-slop/blob/main/skills/antislop-code/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Please clean up the comments in this file. Remove the filler and keep the useful notes.”
5 new skills a week. 1 minute to read.
How it works
The skill checks each comment for a real purpose, then removes decorative, repetitive or loud ones. It is set to change only comments, never the executable code.
Technical content (original SKILL.md)
Original text by the author, straight from 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
FAQ
Will it change my code?
No. The skill says it only edits comments and leaves code, names, imports and formatting alone.
Does it need the core antislop rules?
Yes. The skill is meant to be used with the main antislop file, which holds the shared rules.
Which comments does it keep?
It keeps comments that carry real information for the reader and removes those that add nothing.
Details
Original description by the author
Code comment hygiene for AI coding agents: remove generic AI-slop comments, keep the valuable ones, never touch the code.
repo: miqdadbadjuber/anti-slop
Popularity
- GitHub stars
- 8.0k
- Ranking position
- #12648
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
antislop-copywriting
8.0kHelps your agent write and edit marketing text, headlines and calls to action in plain, human language, avoiding common AI writing patterns and invented facts.
antislop-human
8.0kHelps your agent build interfaces that work for real people, with readable contrast, keyboard use, visible focus and clear states.
antislop-layoutmobile
8.0kHelps your agent make layouts that reflow well from phone to desktop, with sound grids, no sideways overflow and tap targets that are easy to hit.
antislop-ui
8.0kHelps your agent design interfaces that look crafted rather than generic, with a considered color palette, real layout and motion that serves a purpose.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.