code-polish▌
paulrberg/agent-skills · updated Apr 8, 2026
Combined simplification and review pipeline. This skill orchestrates two sub-skills in sequence:
Code Polish
Combined simplification and review pipeline. This skill orchestrates two sub-skills in sequence:
code-simplify— simplify for readability and maintainabilitycode-review --fix— review for correctness, security, and quality, auto-applying all fixes
Optimize for one scope resolution, one user-facing report, and no redundant simplify verification.
Scope Resolution
- Verify repository context:
git rev-parse --git-dir. If this fails, stop and tell the user to run from a git repository. - If user provides file paths/patterns, a commit/range, or a
Resolved scopefenced block with one repo-relative path per line, scope is exactly those targets. - Otherwise, scope is only session-modified files. Do not include other uncommitted changes.
- If there are no session-modified files, fall back to all uncommitted tracked + untracked files:
- tracked:
git diff --name-only --diff-filter=ACMR - untracked:
git ls-files --others --exclude-standard - combine both lists and de-duplicate.
- tracked:
- Exclude generated/low-signal files unless requested: lockfiles, minified bundles, build outputs, vendored code.
- If scope still resolves to zero files, report and stop.
- Normalize the final scope into a
Resolved scopefenced block with one repo-relative path per line. Reuse that exact block for both sub-skills instead of asking them to rediscover scope.
Workflow
1) Resolve scope once
- Apply the "Scope Resolution" rules above.
- Treat the resulting
Resolved scopeblock as authoritative for all downstream work. - Forward user intent, constraints, and risk preferences, but do not forward raw duplicate scope selectors when the resolved block already captures them.
2) Run code-simplify
Invoke the code-simplify skill with:
- the authoritative
Resolved scopeblock --no-verify--no-report- any non-scope user intent that still matters
Tell code-simplify not to broaden or rediscover scope.
3) Run code-review --fix
Invoke the code-review skill with:
- the same authoritative
Resolved scopeblock --fix- any non-scope user intent that still matters
If 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.
4) Final verification
- Treat
code-review's post-fix verification as the final verification summary when it already covers the final touched scope. - If verification was skipped, partial, or no longer matches the final diff, run one narrow final verification pass across the final touched scope.
- Always report skipped checks explicitly.
5) Report
Combine the final state into one summary:
- Scope: Files and functions touched.
- Simplifications: Key changes from
code-simplify, derived from the actual diff when needed because--no-reportwas used. - Review findings and fixes: Findings and applied fixes from
code-review. - Verification: Commands run and outcomes.
- Residual risks: Assumptions or items needing manual review.
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★44 reviews- ★★★★★Chinedu Srinivasan· Dec 24, 2024
Useful defaults in code-polish — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Li Menon· Dec 4, 2024
Registry listing for code-polish matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Emma Rahman· Nov 23, 2024
code-polish reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Min Wang· Nov 15, 2024
We added code-polish from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Alexander Smith· Oct 14, 2024
We added code-polish from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Chinedu White· Oct 6, 2024
code-polish reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Nikhil Menon· Sep 25, 2024
Keeps context tight: code-polish is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Emma Sharma· Sep 25, 2024
We added code-polish from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Neel Wang· Sep 21, 2024
code-polish fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Nikhil Reddy· Sep 13, 2024
code-polish has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 44