antislop-code
Ce qu’il fait
Filtre les commentaires de code qui ressemblent à une écriture IA générique, comme les bannières décoratives ou les commentaires qui répètent le code, et conserve ceux qui apportent une vraie information. Elle s'adresse aux développeurs qui veulent des commentaires de code plus propres.
Quand l’utiliser
- ✓Quand un développeur demande à un agent IA d'écrire ou de modifier des commentaires de code dans un projet.
- ✓Quand un développeur veut retirer les bannières décoratives ou les commentaires évidents du code.
- ✓Quand un développeur veut ne garder que les commentaires qui apportent une vraie information au lecteur.
Lien du skill
https://github.com/miqdadbadjuber/anti-slop/blob/main/skills/antislop-code/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Nettoie les commentaires de ce fichier, s'il te plaît. Retire le remplissage et garde les notes utiles.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
La compétence vérifie chaque commentaire pour savoir s'il a une vraie utilité, puis retire ceux qui sont décoratifs, répétitifs ou trop insistants. Elle est conçue pour ne modifier que les commentaires, jamais le code exécutable.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis 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
Questions fréquentes
Modifiera-t-elle mon code ?
Non. La compétence indique qu'elle ne modifie que les commentaires et laisse le code, les noms, les imports et la mise en forme intacts.
A-t-elle besoin du fichier antislop principal ?
Oui. La compétence est censée être utilisée avec le fichier antislop principal, qui contient les règles communes.
Quels commentaires conserve-t-elle ?
Elle garde les commentaires qui apportent une vraie information au lecteur et supprime ceux qui n'apportent rien.
Détails
Description originale de l’auteur
Code comment hygiene for AI coding agents: remove generic AI-slop comments, keep the valuable ones, never touch the code.
repo: miqdadbadjuber/anti-slop
Popularité
- Étoiles GitHub
- 8.0k
- Position au classement
- #12648
- Licence
- MIT
- Mis à jour
- 01/11/2026
Commentaires
- …
Autres skills de ce dépôt
antislop-copywriting
8.0kAide votre agent à rédiger et corriger des textes marketing, titres et appels à l'action en langage humain, sans tics d'IA ni faits inventés.
antislop-human
8.0kAide votre agent à créer des interfaces accessibles à tous, avec des contrastes lisibles, une navigation au clavier, un focus visible et des états clairs.
antislop-layoutmobile
8.0kAide votre agent à créer des mises en page qui s'adaptent du téléphone à l'ordinateur, sans débordement latéral et avec des zones faciles à toucher.
antislop-ui
8.0kAide votre agent à concevoir des interfaces soignées plutôt que génériques, avec une palette de couleurs réfléchie, une vraie mise en page et des animations utiles.
Skills similaires
diffs
394kPermet à votre agent de produire un diff réel et partageable de vos modifications, sous forme de lien ou d'image, plutôt qu'un résumé écrit à la main.
coding-agent
394kAide votre agent à confier une tâche de programmation plus importante à Codex, Claude Code ou OpenCode comme travailleur en arrière-plan, puis à suivre sa progression.
gh-issues
394kAide votre agent à trouver des tickets GitHub, choisir ceux à traiter et ouvrir des pull requests avec des correctifs, y compris le suivi des commentaires de relecture.