code-polish
What it does
This agent improves code comments and does minor cleanups like formatting. It ensures the code looks more professional without changing its functionality.
When to use it
- βWhen you want to make code comments clearer and more professional.
- βBefore sharing code with others or for documentation purposes.
- βWhen comments are confusing, outdated, or informally written.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/code-polish/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
βImprove the comments in this code and format it to look more professional.β
5 new skills a week. 1 minute to read.
How it works
It reads the entire code to understand the context. Then, it reviews each comment, removing unnecessary parts, updating incorrect information, and rewriting informal ones to be clear and professional, without altering the code's logic.
Technical content (original SKILL.md)
Original text by the author, straight from 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:
β¦
FAQ
What does 'non-semantic cleanup' mean?
It means the cleanup doesn't change the code's meaning or how it works, only how it's presented (like spacing or comments).
Can it fix bugs in the code?
No, this agent only modifies comments and formatting. It does not change the logic or fix bugs.
What happens to comments that have important information but are poorly written?
It preserves the important information but rewrites the comment to be clear and professional.
Details
Original description by the author
Rewrites unprofessional code comments into clear ones and performs non-semantic cleanup. Use to professionalize code without altering logic or behavior.
Popularity
- GitHub stars
- 48k
- Ranking position
- #4182
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
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.