1. Habit
  2. Skills
  3. Code Polish skill
paulrberg · 3K installs

Code Polish skill
Runs by itself, PR opened or updated.

Changed code ends up simpler.

Install the Code Polish skill and make it a habit: follow https://gethabit.dev/skills/paulrberg/code-polish.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

3K installs101 starsMIT licenceSource on GitHub ↗

Code Polish

by paulrberg · 3K installs

The skill

The code polish skill simplifies and reviews changed code over a fixed scope, fixing evidence-backed defects by risk with language and security profiles, then verifies with lint, types and tests.

Only when you ask.

The habit

Changed code ends up simpler.

↻ Runs by itselfPR opened or updated

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one fixed scope per run, or earlier when a fix needs a redesign or contract change.

  1. 01

    Fix the scope

    Take the changed files once, without lockfiles, generated outputs or vendored code.

  2. 02

    Simplify

    Apply only high-confidence simplifications that keep public contracts and behavior.

  3. 03

    Pick profiles

    Select each matching profile, such as security, typescript or shell, from references/profiles/.

  4. 04

    Review and fix

    Rank findings from CRITICAL to LOW and apply the smallest fix backed by evidence.

  5. 05

    Verify

    Run the narrowest formatter, lint, typecheck and targeted tests for the touched code.

  6. 06

    Report

    List Resolved and Open items with evidence, or a blocked report when parity cannot be shown.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the Code Polish skill helps.

Use it when

  • ✓ You just finished a change
  • ✓ You want a risk-ranked review
  • ✓ You want safe simplifications only

Skip it when

  • – The project is not a Git repository
  • – You plan a large redesign

Questions

Code Polish skill, answered.

Can I run only one half?

Yes. --simplify only simplifies, and --review only reviews and fixes.

Will it refactor my architecture?

No. It skips architecture cleanup, sync-to-async conversions and one-use abstractions.

How do I install the Code Polish skill?

Copy the prompt at the top into your agent. It installs the skill from paulrberg/agent-skills and sets up the habit. Or run npx skills add paulrberg/agent-skills --skill code-polish.

Is the Code Polish skill free?

Yes. It is published under MIT. Habit is free too.

Code Polish. Now as a habit.

Install the Code Polish skill and make it a habit: follow https://gethabit.dev/skills/paulrberg/code-polish.md

  • Free
  • No account
  • Undo in one line

All paulrberg skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by paulrberg, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.