Agent skill

Code Polish

by sickn33 in sickn33/agentic-awesome-skills

Rewrites unprofessional code comments into clear ones and performs non-semantic cleanup.

MITAuto-check passedDevelopment

Install Code Polish

skills CLI
$ npx skills add sickn33/agentic-awesome-skills --skill code-polish -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sickn33/agentic-awesome-skills code-polish --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/code-polish .claude/skills/code-polish && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-polish
GitHub stars
47k
Used in
1 other repo
Token cost
~2.4k tokens
SKILL.md length
1,157 words
Files
1
Skills in repo
1,394
Repo updated
First seen
Licence
MIT

At a glance

Rewrites unprofessional code comments into clear ones and performs non-semantic cleanup.

  • Works in 6 steps: Full Read → Comment Audit → Non-Semantic Cleanup → …
  • Professionalize code without altering logic
  • SKILL.md covers Prime Directive, When to Use, Phase 0 — Full Read and Phase 1 — Comment Audit, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Code Polish is an agent skill from sickn33/agentic-awesome-skills. Rewrites unprofessional code comments into clear ones and performs non-semantic cleanup. Use to professionalize code without altering logic or behavior.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is MIT.

When your agent uses it

  • Professionalize code without altering logic
  • Tasks that involve Technical documentation

Example prompts

  • “Use the code-polish skill to rewrite unprofessional code comments into clear ones and performs non-semantic cleanup”
  • “/code-polish”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Full Read
  2. Comment Audit
  3. Non-Semantic Cleanup
  4. Comment Rewrite / Addition
  5. Verification
  6. Report Back

What it can do on your machine

Read from SKILL.md and the folder at commit 1e53ce2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python, javascript, java and go).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Polish loads about 2.4k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 1,157 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sickn33/agentic-awesome-skills at commit 1e53ce2, republished under its MIT licence (© sickn33). 1,157 words, ~2,442 tokens.

Download SKILL.mdSave it as .claude/skills/code-polish/SKILL.md (or your agent's skills folder).
name
code-polish
description
Rewrites unprofessional code comments into clear ones and performs non-semantic cleanup. Use to professionalize code without altering logic or behavior.
risk
critical
source
community
date_added
2026-07-02

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:

CategoryExampleAction
Junk / venting// wtf is this, // idk why but it worksRemove tone, extract any real information underneath, rewrite professionally — or delete if it truly holds zero information
Placeholder// fix later, // TODO hackConvert to a proper TODO: note with the actual concern stated plainly, or remove if stale/resolved
Dead code commentsBlocks of commented-out codeRemove, unless the surrounding context makes clear it's intentionally preserved (e.g., a documented fallback) — flag these to the user rather than silently deleting
Redundanti++ // increment iDelete — the code already says this
Outdated / wrongComment describes behavior the code no longer hasRewrite 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 wayPreserve the information, rewrite the tone. Never delete real warnings just because the phrasing is casual
MissingComplex logic, non-obvious business rules, or public APIs with no docstringAdd 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:

  • Explain why, not what. The code already shows what it does; a comment earns its place by explaining intent, tradeoffs, or non-obvious constraints.
  • Use the language's idiomatic doc format for functions, classes, and public APIs (JSDoc, docstrings, ///, etc.) — match the convention already used elsewhere in the file if one exists.
  • Be concise. No padding, no restating the obvious, no filler sentences.
  • No informal register. No jokes, no venting, no first-person asides ("I think this works because...").
  • No AI-tell phrasing. Avoid generic filler like "This function is responsible for..." or "Note that..." padding, and avoid em-dashes. Write plainly and directly, the way a careful senior engineer would.
  • Don't invent behavior. If you're not certain why something is done a certain way, say what the code does, not a fabricated justification for why.

Show full SKILL.md (409 more words)Show less

Phase 4 — Verification

Before presenting the result:

  • Confirm the edited file's logic is behaviorally identical to the original — comments and whitespace are the only permitted diffs, plus whatever narrow Phase 2 cleanup was done.
  • Re-read the diff end to end, not just the changed lines in isolation, to catch anything that accidentally shifted meaning.
  • If a rewritten comment removes information that was present in the original (even informally stated), that's a failure — go back and preserve it.

Phase 5 — Report Back

Summarize for the user, don't just hand back a silent diff:

  • How many comments were rewritten, added, or removed, and why
  • Any comments flagged as "informal but contained a real warning" — confirm the information was preserved
  • Any dead code or stale comments removed, listed explicitly
  • Anything you were unsure about and left alone rather than guessing

Examples

Junk / venting → professional

js
// before
// ugh this took forever to figure out. api rate limits us super hard in prod so we have to do exponential backoff here. just leave it alone
function retryFetch(url, attempts) { ... }

// after
// Uses exponential backoff to handle aggressive API rate-limiting in production.
function retryFetch(url, attempts) { ... }

Redundant → removed

python
# before
count += 1  # increment count by 1

# after
count += 1

Valuable but informal → tone rewritten, information preserved

python
# before
# careful, this breaks if you call it twice, learned that the hard way

# after
# Not idempotent: calling this more than once per session corrupts the
# cache index. Callers must guard against duplicate invocation.

Missing → added

java
// before
public double calculate(double base, int tier) {
    return base * (tier > 2 ? 0.85 : 1.0);
}

// after
/**
 * Applies the loyalty discount. Tiers above 2 qualify for a 15% discount;
 * this threshold matches the current pricing policy, not a technical limit.
 */
public double calculate(double base, int tier) {
    return base * (tier > 2 ? 0.85 : 1.0);
}

Outdated / wrong → corrected and flagged

go
// before
// returns nil if user not found
func GetUser(id string) (*User, error) { ... } // now returns ErrNotFound instead

// after
// Returns ErrNotFound if the user does not exist.
func GetUser(id string) (*User, error) { ... }
// (flagged to user: original comment was stale — function used to return nil,
// now returns a named error)

Security & Safety Notes

This skill never:

  • Changes program logic, control flow, or algorithmic behavior
  • Restructures code (extracting/inlining functions, reordering execution, changing architecture)
  • Renames anything public, exported, or cross-referenced without explicit confirmation
  • Deletes a comment solely because its tone is casual, without checking whether it carries real information first
  • Fabricates a rationale for a comment when the actual reason isn't knowable from context — state what's certain only

Limitations

  • Cannot verify runtime behavior — Phase 4 is a read-through diff check, not a test run. For anything beyond trivial files, the user should still run the actual test suite after applying this skill.
  • Judgment calls on ambiguous cases (e.g., "is this dead code intentional or forgotten?") default to flagging rather than guessing — this means some cleanup will need a quick human yes/no rather than happening silently.
  • Not a substitute for a linter or formatter — Phase 2 cleanup is deliberately conservative and won't enforce a full style guide (e.g., max line length rules, import ordering) unless that's trivially inferable from the surrounding file.
  • Comment quality is bounded by how well the code's actual intent can be inferred from context. If the "why" genuinely isn't recoverable from the file (no domain knowledge, no commit history, no ticket references available), the honest output is a comment describing what, not a confident but invented why.
  • Large files or unfamiliar codebases increase the risk of Phase 0 missing context that would have changed a comment's wording — flag uncertainty in the Phase 5 report rather than presenting low-confidence rewrites as settled.

© sickn33, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/code-polish of sickn33/agentic-awesome-skills.

Open the folder on GitHubat commit 1e53ce2

Used in 1 other repository

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Code Polish next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Polish compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Polish this skillsickn33/agentic-awesome-skills47k1 repos~2.4kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design44k1 repos~7.5kAutomated safety check: PassMIT
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.4kAutomated safety check: PassGPL-3.0

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    44k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

More from sickn33/agentic-awesome-skills

All 1,394 skills in this repo
  • Liuguang Banlan UI

    sickn33/agentic-awesome-skills

    Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Using LWC Memory and Graphs

    sickn33/agentic-awesome-skills

    Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.

    47k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Find Complementary Founders

    sickn33/agentic-awesome-skills

    Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.

    47k GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check passed
  • Whatsapp Cloud API

    sickn33/agentic-awesome-skills

    Integracao com WhatsApp Business Cloud API (Meta). An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~4.5k tokens
    Auto-check passed
  • Cline Pilot

    sickn33/agentic-awesome-skills

    Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.

    47k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Categories

Questions about Code Polish

What does Code Polish do?

Rewrites unprofessional code comments into clear ones and performs non-semantic cleanup. Code Polish is an agent skill from sickn33/agentic-awesome-skills. Rewrites unprofessional code comments into clear ones and performs non-semantic cleanup.

When should I use Code Polish?

Code Polish fits situations like: professionalize code without altering logic; tasks that involve Technical documentation.

How do I install Code Polish in Claude Code?

Run `npx skills add sickn33/agentic-awesome-skills --skill code-polish -a claude-code`. Or copy the skill folder (skills/code-polish in sickn33/agentic-awesome-skills) into .claude/skills/code-polish in your project. Claude Code loads it when a task matches its description.

How do I install Code Polish in Codex?

Run `npx skills add sickn33/agentic-awesome-skills --skill code-polish -a codex`. Or copy the skill folder (skills/code-polish in sickn33/agentic-awesome-skills) into .agents/skills/code-polish in your project. Codex loads it when a task matches its description.

Can I use Code Polish in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill code-polish -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-polish, .gemini/skills/code-polish, .github/skills/code-polish and .opencode/skills/code-polish in your project.

What does Code Polish need to run?

SKILL.md names no scripts, command-line tools or credentials: Code Polish is instructions for the agent only. Our summary lists: Python 3.

Does Code Polish access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Polish safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Polish use?

Code Polish is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Polish use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Polish?

Skills that share tags, products or a category with Code Polish: Diagram Design (cathrynlavery/diagram-design, 44k stars), Simple English (moeru-ai/airi, 50k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Doc Sync (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Polish?

sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,304 GitHub stars. The repository holds 1,394 skills in this directory. The repository was last updated on October 6, 2026.

Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.