{"id":"5229eda9-be88-46f4-9592-13b0328931b6","shortId":"kW6cCj","kind":"skill","title":"code-polish","tagline":"This skill should be used when the user asks to \"polish code\", \"simplify and review\", \"clean up and review code\", \"full code polish\", \"simplify then review\", \"refactor and review\", \"simplify and fix\", \"clean up and fix\", or wants a combined simplification and review workflow on r","description":"# Code Polish\n\nCombined simplification and review pipeline. This skill orchestrates two sub-skills in sequence:\n\n1. **`code-simplify`** — simplify for readability and maintainability\n2. **`code-review --fix`** — review for correctness, security, and quality, auto-applying all fixes\n\nOptimize for one scope resolution, one user-facing report, and no redundant simplify verification.\n\n## Scope Resolution\n\n1. Verify repository context: `git rev-parse --git-dir`. If this fails, stop and tell the user to run from a git repository.\n2. If user provides file paths/patterns, a commit/range, or a `Resolved scope` fenced block with one repo-relative path per line, scope is exactly those targets.\n3. Otherwise, scope is **only** session-modified files. Do not include other uncommitted changes.\n4. If there are no session-modified files, fall back to all uncommitted tracked + untracked files:\n   - tracked: `git diff --name-only --diff-filter=ACMR`\n   - untracked: `git ls-files --others --exclude-standard`\n   - combine both lists and de-duplicate.\n5. Exclude generated/low-signal files unless requested: lockfiles, minified bundles, build outputs, vendored code.\n6. If scope still resolves to zero files, report and stop.\n7. Normalize the final scope into a `Resolved scope` fenced block with one repo-relative path per line. Reuse that exact block for both sub-skills instead of asking them to rediscover scope.\n\n## Workflow\n\n### 1) Resolve scope once\n\n- Apply the \"Scope Resolution\" rules above.\n- Treat the resulting `Resolved scope` block as authoritative for all downstream work.\n- Forward user intent, constraints, and risk preferences, but do not forward raw duplicate scope selectors when the resolved block already captures them.\n\n### 2) Run `code-simplify`\n\nInvoke the `code-simplify` skill with:\n\n- the authoritative `Resolved scope` block\n- `--no-verify`\n- `--no-report`\n- any non-scope user intent that still matters\n\nTell `code-simplify` not to broaden or rediscover scope.\n\n### 3) Run `code-review --fix`\n\nInvoke the `code-review` skill with:\n\n- the same authoritative `Resolved scope` block\n- `--fix`\n- any non-scope user intent that still matters\n\nIf the user explicitly asks for a speed-first pass over maintainability coverage, you may also append `--skip-profile naming`. Do not skip the naming profile by default.\n\n### 4) Final verification\n\n- Treat `code-review`'s post-fix verification as the final verification summary when it already covers the final touched scope.\n- If verification was skipped, partial, or no longer matches the final diff, run one narrow final verification pass across the final touched scope.\n- Always report skipped checks explicitly.\n\n### 5) Report\n\nCombine the final state into one summary:\n\n1. **Scope**: Files and functions touched.\n2. **Simplifications**: Key changes from `code-simplify`, derived from the actual diff when needed because `--no-report` was used.\n3. **Review findings and fixes**: Findings and applied fixes from `code-review`.\n4. **Verification**: Commands run and outcomes.\n5. **Residual risks**: Assumptions or items needing manual review.","tags":["code","polish","agent","skills","paulrberg","agent-skills","ai-agents"],"capabilities":["skill","source-paulrberg","skill-code-polish","topic-agent-skills","topic-ai-agents"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/PaulRBerg/agent-skills/code-polish","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add PaulRBerg/agent-skills","source_repo":"https://github.com/PaulRBerg/agent-skills","install_from":"skills.sh"}},"qualityScore":"0.475","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 50 github stars · SKILL.md body (3,108 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T00:56:17.622Z","embedding":null,"createdAt":"2026-04-18T22:17:37.698Z","updatedAt":"2026-04-22T00:56:17.622Z","lastSeenAt":"2026-04-22T00:56:17.622Z","tsv":"'1':66,108,278,485 '2':75,133,322,491 '3':160,364,512 '4':175,423,525 '5':218,476,531 '6':231 '7':242 'acmr':201 'across':466 'actual':502 'alreadi':319,442 'also':409 'alway':471 'append':410 'appli':88,282,519 'ask':12,272,397 'assumpt':534 'authorit':295,335,379 'auto':87 'auto-appli':86 'back':185 'block':146,252,264,293,318,338,382 'broaden':360 'build':227 'bundl':226 'captur':320 'chang':174,494 'check':474 'clean':19,36 'code':2,15,23,25,50,68,77,230,325,330,356,367,373,428,497,523 'code-polish':1 'code-review':76,366,372,427,522 'code-simplifi':67,324,329,355,496 'combin':43,52,211,478 'command':527 'commit/range':140 'constraint':303 'context':111 'correct':82 'cover':443 'coverag':406 'de':216 'de-dupl':215 'default':422 'deriv':499 'diff':194,199,459,503 'diff-filt':198 'dir':118 'downstream':298 'duplic':217,312 'exact':157,263 'exclud':209,219 'exclude-standard':208 'explicit':396,475 'face':99 'fail':121 'fall':184 'fenc':145,251 'file':137,168,183,191,206,221,238,487 'filter':200 'final':245,424,437,445,458,463,468,480 'find':514,517 'first':402 'fix':35,39,79,90,369,383,433,516,520 'forward':300,310 'full':24 'function':489 'generated/low-signal':220 'git':112,117,131,193,203 'git-dir':116 'includ':171 'instead':270 'intent':302,350,389 'invok':327,370 'item':536 'key':493 'line':154,260 'list':213 'lockfil':224 'longer':455 'ls':205 'ls-file':204 'maintain':74,405 'manual':538 'match':456 'matter':353,392 'may':408 'minifi':225 'modifi':167,182 'name':196,414,419 'name-on':195 'narrow':462 'need':505,537 'no-report':342,507 'no-verifi':339 'non':347,386 'non-scop':346,385 'normal':243 'one':93,96,148,254,461,483 'optim':91 'orchestr':59 'other':207 'otherwis':161 'outcom':530 'output':228 'pars':115 'partial':452 'pass':403,465 'path':152,258 'paths/patterns':138 'per':153,259 'pipelin':56 'polish':3,14,26,51 'post':432 'post-fix':431 'prefer':306 'profil':413,420 'provid':136 'qualiti':85 'r':49 'raw':311 'readabl':72 'rediscov':275,362 'redund':103 'refactor':30 'relat':151,257 'repo':150,256 'repo-rel':149,255 'report':100,239,344,472,477,509 'repositori':110,132 'request':223 'residu':532 'resolut':95,107,285 'resolv':143,235,249,279,291,317,336,380 'result':290 'reus':261 'rev':114 'rev-pars':113 'review':18,22,29,32,46,55,78,80,368,374,429,513,524,539 'risk':305,533 'rule':286 'run':128,323,365,460,528 'scope':94,106,144,155,162,233,246,250,276,280,284,292,313,337,348,363,381,387,447,470,486 'secur':83 'selector':314 'sequenc':65 'session':166,181 'session-modifi':165,180 'simplif':44,53,492 'simplifi':16,27,33,69,70,104,326,331,357,498 'skill':5,58,63,269,332,375 'skill-code-polish' 'skip':412,417,451,473 'skip-profil':411 'source-paulrberg' 'speed':401 'speed-first':400 'standard':210 'state':481 'still':234,352,391 'stop':122,241 'sub':62,268 'sub-skil':61,267 'summari':439,484 'target':159 'tell':124,354 'topic-agent-skills' 'topic-ai-agents' 'touch':446,469,490 'track':189,192 'treat':288,426 'two':60 'uncommit':173,188 'unless':222 'untrack':190,202 'use':8,511 'user':11,98,126,135,301,349,388,395 'user-fac':97 'vendor':229 'verif':105,425,434,438,449,464,526 'verifi':109,341 'want':41 'work':299 'workflow':47,277 'zero':237","prices":[{"id":"e5952e34-1199-49ec-8050-7449ea5168ff","listingId":"5229eda9-be88-46f4-9592-13b0328931b6","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"PaulRBerg","category":"agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:17:37.698Z"}],"sources":[{"listingId":"5229eda9-be88-46f4-9592-13b0328931b6","source":"github","sourceId":"PaulRBerg/agent-skills/code-polish","sourceUrl":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/code-polish","isPrimary":false,"firstSeenAt":"2026-04-18T22:17:37.698Z","lastSeenAt":"2026-04-22T00:56:17.622Z"}],"details":{"listingId":"5229eda9-be88-46f4-9592-13b0328931b6","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"PaulRBerg","slug":"code-polish","github":{"repo":"PaulRBerg/agent-skills","stars":50,"topics":["agent-skills","ai-agents"],"license":"mit","html_url":"https://github.com/PaulRBerg/agent-skills","pushed_at":"2026-04-20T16:22:56Z","description":"PRB's collection of agent skills","skill_md_sha":"7969071efc60a0c817e36196129dfd76df8b1d5e","skill_md_path":"skills/code-polish/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/code-polish"},"layout":"multi","source":"github","category":"agent-skills","frontmatter":{"name":"code-polish","description":"This skill should be used when the user asks to \"polish code\", \"simplify and review\", \"clean up and review code\", \"full code polish\", \"simplify then review\", \"refactor and review\", \"simplify and fix\", \"clean up and fix\", or wants a combined simplification and review workflow on recently changed code."},"skills_sh_url":"https://skills.sh/PaulRBerg/agent-skills/code-polish"},"updatedAt":"2026-04-22T00:56:17.622Z"}}