antislop-code
Skill này làm gì
Lọc các chú thích code nghe như văn viết AI chung chung, như biểu ngữ trang trí hoặc chú thích lặp lại code, và giữ lại những chú thích có thông tin thật. Dành cho lập trình viên muốn chú thích code sạch hơn.
Khi nào nên dùng
- ✓Khi lập trình viên nhờ AI agent viết hoặc sửa chú thích code trong dự án.
- ✓Khi lập trình viên muốn bỏ các biểu ngữ trang trí hoặc chú thích hiển nhiên trong code.
- ✓Khi lập trình viên muốn chỉ giữ các chú thích mang thông tin thật cho người đọc.
Liên kết skill
https://github.com/miqdadbadjuber/anti-slop/blob/main/skills/antislop-code/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy dọn các chú thích trong file này. Bỏ phần thừa và giữ các ghi chú hữu ích.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill kiểm tra từng chú thích xem có mục đích thật không, rồi bỏ những chú thích trang trí, lặp lại hoặc ồn ào. Skill chỉ được sửa chú thích, không bao giờ chạm vào code thực thi.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Nó có thay đổi code của tôi không?
Không. Skill nói nó chỉ sửa chú thích và để nguyên code, tên, import và định dạng.
Nó có cần các quy tắc antislop cốt lõi không?
Có. Skill được dùng cùng file antislop chính, nơi chứa các quy tắc chung.
Nó giữ lại chú thích nào?
Nó giữ các chú thích mang thông tin thật cho người đọc và bỏ những chú thích không thêm gì.
Chi tiết
Mô tả gốc của tác giả
Code comment hygiene for AI coding agents: remove generic AI-slop comments, keep the valuable ones, never touch the code.
repo: miqdadbadjuber/anti-slop
Độ phổ biến
- Sao GitHub
- 8.0k
- Vị trí xếp hạng
- #12648
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
antislop-copywriting
8.0kGiúp agent viết và sửa nội dung tiếp thị, tiêu đề và lời kêu gọi hành động bằng ngôn ngữ đơn giản, tự nhiên, tránh các mẫu viết AI và thông tin bịa.
antislop-human
8.0kGiúp agent xây dựng giao diện phục vụ người thật, với độ tương phản dễ đọc, dùng được bằng bàn phím, focus hiển thị rõ và trạng thái rõ ràng.
antislop-layoutmobile
8.0kGiúp agent làm bố cục tự sắp xếp lại tốt từ điện thoại đến máy tính, với lưới hợp lý, không tràn ngang và vùng chạm dễ nhấn.
antislop-ui
8.0kGiúp agent thiết kế giao diện trông được chăm chút thay vì chung chung, với bảng màu có suy nghĩ, bố cục thật và chuyển động có mục đích.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.