code-polish

Rewrites unprofessional code comments and performs non-semantic cleanup without altering logic.

1|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend --skill code-polish-hamzaoui-louai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-polish
Source: https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend/tree/main/.opencode/skills/code-polish
Command: npx skills add https://github.com/Hamzaoui-Louai/LEAN-gym-dashboard-frontend --skill code-polish-hamzaoui-louai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate casual, outdated, redundant, or missing comments that hurt readability during code review, handoff, or open-sourcing. This Skill professionalizes comments and performs safe cleanup while guaranteeing that program logic and behavior remain untouched. ## Core Features & Use Cases - Comment Audit and Rewrite: Classifies every comment (junk, placeholder, outdated, redundant, informal-but-valuable, missing) and rewrites, removes, or adds comments using idiomatic doc formats like JSDoc, docstrings, or XML doc comments. - Non-Semantic Cleanup: Normalizes whitespace, indentation, and brace style, removes unambiguous dead code, and splits long lines without changing behavior. - Verification and Reporting: Re-reads the full diff to confirm behavioral identity and reports exactly what was rewritten, removed, or flagged as uncertain. - Use Case: Before open-sourcing a module full of comments like "// idk why but it works", run this Skill to produce professional documentation while preserving every real warning embedded in the original notes. ## Quick Start Clean up and professionalize all comments in this file without changing any logic or behavior.

Frequently Asked Questions about code-polish

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up unprofessional code comments without changing logic?

Apply a constraint-based comment polish that audits each comment by category, rewrites tone while preserving information, and limits edits to comments, whitespace, and unambiguous dead code. The diff is then re-read end to end to confirm behavioral identity.

How to rewrite casual or venting comments into professional documentation?

Extract the real information underneath the casual phrasing, then rewrite it concisely in the language's idiomatic doc format. For example, a venting note about rate limits becomes a plain statement that exponential backoff handles API rate-limiting.

Can comment cleanup accidentally change program behavior?

It can if cleanup goes beyond comments and whitespace. This protocol forbids logic edits, control flow changes, and public renames, and verifies the final diff line by line, though running the actual test suite afterward is still recommended.

When should I not use automated comment polishing?

Avoid it when the goal is fixing bugs, changing behavior, restructuring architecture, or adding features, since those are explicitly out of scope. It also cannot recover intent that is not inferable from the code itself.

What happens to TODO comments and commented-out dead code?

Vague placeholders are converted into proper TODO notes stating the actual concern, or removed if stale. Commented-out code blocks are removed only when clearly unintentional; ambiguous cases are flagged to the user instead of silently deleted.