Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Rewrites unprofessional code comments into clear ones and performs non-semantic cleanup. Use to professionalize code without altering logic or behavior.
.claude/skills/sickn33-code-polish/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-16 | ✗→✓ | ▲ Improved | 235% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 352% | 0% |
| case-21 | ✗→✓ | ▲ Improved | 140% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 280% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 100% | 0% |
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.
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.
Apply this skill when:
Do not apply this skill when:
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:
/// for Rust, XML doc comments, etc.)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 |
Scope is strictly limited to changes that cannot alter behavior:
Anything beyond this — reordering logic, extracting functions, changing control flow, altering algorithms — is out of scope for this skill.
Apply these standards to every comment touched or added:
///, etc.) — match the convention already used elsewhere in the file if one exists.Before presenting the result:
Summarize for the user, don't just hand back a silent diff:
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)
This skill never:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 3,640 | 4,425 | +22% | 1 | 1 | 0% | 813 | 3,086 | +280% | 0 | 0 | — |
case-02 | pass→pass | 7,311 | 3,985 | -45% | 1 | 1 | 0% | 1,512 | 3,031 | +100% | 0 | 0 | — |
case-03 | pass→pass | 4,325 | 4,918 | +14% | 1 | 1 | 0% | 868 | 3,097 | +257% | 0 | 0 | — |
case-04 | pass→pass | 4,318 | 3,647 | -16% | 1 | 1 | 0% | 958 | 2,910 | +204% | 0 | 0 | — |
case-05 | pass→pass | 4,443 | 4,551 | +2% | 1 | 1 | 0% | 930 | 3,072 | +230% | 0 | 0 | — |
case-06 | pass→pass | 4,761 | 4,839 | +2% | 1 | 1 | 0% | 946 | 3,216 | +240% | 0 | 0 | — |
case-07 | pass→pass | 5,430 | 4,858 | -11% | 1 | 1 | 0% | 1,227 | 3,034 | +147% | 0 | 0 | — |
case-08 | pass→pass | 6,789 | 5,918 | -13% | 1 | 1 | 0% | 1,262 | 3,389 | +169% | 0 | 0 | — |
case-09 | pass→pass | 4,212 | 4,305 | +2% | 1 | 1 | 0% | 902 | 3,052 | +238% | 0 | 0 | — |
case-10 | fail→fail | 2,844 | 3,405 | +20% | 1 | 1 | 0% | 557 | 2,936 | +427% | 0 | 0 | — |
case-11 | pass→pass | 7,233 | 5,486 | -24% | 1 | 1 | 0% | 1,291 | 3,321 | +157% | 0 | 0 | — |
case-12 | pass→pass | 3,308 | 4,173 | +26% | 1 | 1 | 0% | 812 | 3,021 | +272% | 0 | 0 | — |
case-13 | pass→pass | 3,153 | 6,396 | +103% | 1 | 1 | 0% | 667 | 3,483 | +422% | 0 | 0 | — |
case-14 | pass→pass | 4,496 | 3,900 | -13% | 1 | 1 | 0% | 856 | 2,982 | +248% | 0 | 0 | — |
case-15 | pass→pass | 5,154 | 5,054 | -2% | 1 | 1 | 0% | 1,020 | 3,161 | +210% | 0 | 0 | — |
case-16 | fail→pass | 5,217 | 6,543 | +25% | 1 | 1 | 0% | 1,027 | 3,443 | +235% | 0 | 0 | — |
case-17 | fail→pass | 4,302 | 5,301 | +23% | 1 | 1 | 0% | 729 | 3,293 | +352% | 0 | 0 | — |
case-18 | pass→pass | 4,941 | 4,138 | -16% | 1 | 1 | 0% | 920 | 3,006 | +227% | 0 | 0 | — |
case-19 | pass→pass | 3,758 | 4,724 | +26% | 1 | 1 | 0% | 755 | 3,253 | +331% | 0 | 0 | — |
case-20 | pass→pass | 5,424 | 4,088 | -25% | 1 | 1 | 0% | 1,070 | 3,002 | +181% | 0 | 0 | — |
case-21 | fail→pass | 7,900 | 9,771 | +24% | 1 | 1 | 0% | 1,720 | 4,127 | +140% | 0 | 0 | — |
case-22 | fail→fail | 5,093 | 7,666 | +51% | 1 | 1 | 0% | 1,078 | 3,773 | +250% | 0 | 0 | — |
case-23 | fail→fail | 8,400 | 11,127 | +32% | 1 | 1 | 0% | 1,824 | 4,485 | +146% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.