code-polish
Fungsinya
Agent ini memperbaiki komentar kode dan melakukan pembersihan kecil seperti perapian format. Agent ini memastikan kode terlihat lebih profesional tanpa mengubah fungsinya.
Kapan dipakai
- βSaat Anda ingin membuat komentar kode lebih jelas dan profesional.
- βSebelum membagikan kode kepada orang lain atau untuk keperluan dokumentasi.
- βSaat komentar membingungkan, sudah usang, atau ditulis secara informal.
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/code-polish/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
βPerbaiki komentar di kode ini dan atur formatnya agar terlihat lebih profesional.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent ini membaca seluruh kode untuk memahami konteksnya. Kemudian, agent ini meninjau setiap komentar, menghapus bagian yang tidak perlu, memperbarui informasi yang keliru, dan menulis ulang komentar informal agar jelas dan profesional, tanpa mengubah logika kode.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Code Polish
A constraint-based protocol for normalizing code comments and performing safe, non-semantic cleanup. This skill exists because human-written code tends to carry casual, outdated, or missing comments, while the goal is professional-grade documentation without touching behavior.
This file is self-contained. Do not require any other skill file to execute this protocol.
Prime Directive
Comments and non-semantic cleanup are the job. Logic is never the job. If a change would alter what the code does β not just what it says or how it's arranged β it is out of scope, no matter how obviously "correct" the fix seems.
When to Use
Apply this skill when:
- The user asks to "clean up," "professionalize," or "polish" existing code
- Code is being prepped for code review, handoff, open-sourcing, or documentation
- A file has a mix of human and AI-written comments and needs one consistent, professional voice
- Comments are outdated, missing, redundant, or written casually (venting, placeholders, inside jokes)
- The user wants comments improved but explicitly does not want logic touched
Do not apply this skill when:
- The user wants a bug fixed or behavior changed (that's a different job β logic edits are out of scope here)
- The user wants a full rewrite or architectural restructuring
- The only ask is adding new features or functionality
Phase 0 β Full Read
Before editing anything, read the entire file (or the entire relevant module if the codebase is large β not just the function in question). Do not comment or clean incrementally while still reading. A comment written without full context is a guess, and guesses are how "professional" comments end up wrong.
Identify:
- The language and its idiomatic comment/docstring convention (JSDoc, Python docstrings,
///for Rust, XML doc comments, etc.) - Any existing project comment style already in use elsewhere in the file β match it rather than importing a foreign convention
- Any comment that encodes real, non-obvious information (race conditions, workarounds for external bugs, "don't reorder this" warnings, business-rule justifications)
Phase 1 β Comment Audit
Classify every existing comment into one of these categories before touching it:
| Category | Example | Action |
|---|---|---|
| Junk / venting | // wtf is this, // idk why but it works |
Remove tone, extract any real information underneath, rewrite professionally β or delete if it truly holds zero information |
| Placeholder | // fix later, // TODO hack |
Convert to a proper TODO: note with the actual concern stated plainly, or remove if stale/resolved |
| Dead code comments | Blocks of commented-out code | Remove, unless the surrounding context makes clear it's intentionally preserved (e.g., a documented fallback) β flag these to the user rather than silently deleting |
| Redundant | i++ // increment i |
Delete β the code already says this |
| Outdated / wrong | Comment describes behavior the code no longer has | Rewrite to match current behavior. Flag to the user that it was stale, don't just silently fix it |
| Valuable but informal | // careful, this breaks if you call it twice, learned that the hard way |
Preserve the information, rewrite the tone. Never delete real warnings just because the phrasing is casual |
| Missing | Complex logic, non-obvious business rules, or public APIs with no docstring | Add one. Don't over-comment simple, self-explanatory lines |
Phase 2 β Non-Semantic Cleanup
Scope is strictly limited to changes that cannot alter behavior:
- Consistent indentation and whitespace
- Consistent brace/bracket style matching the surrounding file
- Removing truly dead code (unreachable blocks) β only when unambiguous, and flagged in the summary
- Splitting overly long lines for readability
- Local variable renaming for clarity is allowed only for private/local-scope names, and only when the improvement is unambiguous β never rename anything exported, public, or referenced across files without calling it out explicitly first
Anything beyond this β reordering logic, extracting functions, changing control flow, altering algorithms β is out of scope for this skill.
Phase 3 β Comment Rewrite / Addition
Apply these standards to every comment touched or added:
β¦
Pertanyaan umum
Apa arti 'pembersihan non-semantik'?
Artinya pembersihan ini tidak mengubah makna atau cara kerja kode, hanya cara penyajiannya, seperti spasi atau komentar.
Apakah agent ini bisa memperbaiki bug dalam kode?
Tidak. Agent ini hanya mengubah komentar dan format. Agent ini tidak mengubah logika atau memperbaiki bug.
Bagaimana dengan komentar yang berisi informasi penting tetapi ditulis dengan buruk?
Informasi pentingnya tetap dipertahankan, tetapi komentarnya ditulis ulang agar jelas dan profesional.
Detail
Deskripsi asli dari pembuat
Rewrites unprofessional code comments into clear ones and performs non-semantic cleanup. Use to professionalize code without altering logic or behavior.
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #4182
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
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.