polish

polish is a skill for Claude Code from mthines/agent-skills. It costs 118 tokens per session (2,060 once invoked), scanned A, original, MIT.

A pre-review quality check for the current branch, meaning the set of changes being developed before they are merged.

In plain words
What is it for?
Use it before sending work for review or after making many changes. It reviews the branch diff and can apply approved mechanical refactors while leaving judgment-based suggestions for you.
Why use it?
It combines a broad pull-request review with checks for mechanically simplifying code, helping identify review issues and clean up safe, obvious complexity. The broad review requires an open pull request.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the mthines-agent-skills plugin — 54 skills, 3 agents, 2 hooks shipped together

Good fit Use it before sending work for review or after making many changes. It reviews the branch diff and can apply approved mechanical refactors while leaving judgment-based suggestions for you.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mthines/agent-skills/polish
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mthines/agent-skills --skill polish
Clone the repo
git clone --depth 1 https://github.com/mthines/agent-skills

Made for: Claude Code.

Or install mthines-agent-skills, the plugin that ships this one along with the rest of its 54 skills, 3 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for polish

README.md
[![agentmods](https://agentmods.dev/badge/skills/mthines/agent-skills/polish/github.svg)](https://agentmods.dev/skills/mthines/agent-skills/polish)
Your own site
<a href="https://agentmods.dev/skills/mthines/agent-skills/polish"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/polish/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for polish

Your own site · 80×15
<a href="https://agentmods.dev/skills/mthines/agent-skills/polish"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/polish.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,060 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 106
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
  • medium Prompt Injection · line 50
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 62
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00118 $0.02060
Opus 5.5 $0.00047 $0.00824
Sonnet 5.5 $0.00024 $0.00412
Haiku 4.5 $0.00012 $0.00206

Measured 7d ago against content hash 086b7b5d5dc1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

polish scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/shortcut-ledger.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/quality/polish/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Polish — Re-runnable Branch Quality Gate

Get a branch into reviewable shape, and re-run any time after a batch of changes. Polish composes the pr-reviewer agent (read-only review via the branch's open PR) with its own simplify engine, rules/simplify.md, over the branch diff. How review-loop and /create-pr call polish: references/callers.md.

Contents: Modes · Step 0 · Step 1 · Step 2 · Step 3 · Step 4 · Hard rules

Modes

Parse the first token of $ARGUMENTS. Everything else is a flag.

Mode Trigger What runs
full (default) No mode token Pass A (review), then Pass B (simplify) — this order is fixed.
review First token review Pass A only.
simplify First token simplify Pass B only. simplify dry-run reports without writing; simplify <path> scopes to a path.
quick First token quick Pass C only — light mechanical pass (comments, docstrings, else after return, local names); no pr-reviewer pass, no structural refactors.
debt First token debt Run node "${CLAUDE_SKILL_DIR}/scripts/shortcut-ledger.mjs" per rules/debt.md, then stop: it scans the whole repo, not the branch diff, so Steps 0–4 do not run, and it works on main. Read-only.
Flag Effect
--no-commit Leave all changes in the working tree instead of committing each pass.
--critical Pass --critical through to pr-reviewer. Ignored by simplify / quick.
--no-optimize Accepted and ignored — the reviewer's optimality lens was removed. Never pass it through.

Step 0: Resolve mode and preconditions

git rev-parse --is-inside-work-tree >/dev/null 2>&1 || { echo "polish: not a git repo"; exit 1; }
BRANCH=$(git rev-parse --abbrev-ref HEAD)
git fetch origin main --quiet 2>/dev/null || git fetch origin --quiet 2>/dev/null
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
  echo "polish: on $BRANCH — check out a feature branch first."
  exit 1
fi
git diff --name-only origin/main...HEAD     # files changed on this branch
git diff --stat origin/main...HEAD

Read the full file on GitHub · 144 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed · +2 lines · +24 tokens per session 086b7b5d5dc1
  2. 1mo ago Changed · -127 lines · -123 tokens per session a5e925b90a7e
  3. 3mo ago First seen · 269 lines · 217 tokens per session scan A 11a6bace5db6

Subscribe to this mod's changes

polish is a skill published in the GitHub repository mthines/agent-skills (22 stars, last pushed yesterday), licensed MIT. It adds 118 tokens to every session and 2,060 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

polish compared with skills from other repositories

polish next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
polishmthines/agent-skillsSkill22yesterdayMITA118Claude Code
ego-lite-simplifycitrolabs/ego-liteSkill26kyesterdayMITA68Codex
create-pull-requestCodelyTV/agent-harnessSkill36310d agononeA64Claude Code
code-review-and-qualityshennawardana23/skillmeSkill41mo agoApache-2.0A86Claude Code
coding-standardsshennawardana23/skillmeSkill41mo agoApache-2.0A106Claude Code
doubt-driven-developmentshennawardana23/skillmeSkill41mo agoApache-2.0A81Claude Code
best-practicesshennawardana23/skillmeSkill41mo agoApache-2.0A49Claude Code