polish

polish is a skill for Claude Code from mthines/agent-skills. It costs 217 tokens per session (3,801 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 — 55 skills, 4 agents 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 55 skills, 4 agents.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 217 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,801 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.00217 $0.03801
Opus 5 $0.00109 $0.01901
Sonnet 5 $0.00043 $0.00760
Haiku 4.5 $0.00022 $0.00380

Measured 7d ago against content hash 11a6bace5db6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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.

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 · 269 lines

How it starts

The opening of the file, as written. The whole thing — 269 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 clean, reviewable shape before it goes up for review — and run it again any time you've made a lot of changes and want to tidy up.

This skill is an orchestrator. It does not contain quality rules of its own; it composes two existing pieces over the current branch diff:

  1. The pr-reviewer agent — broad review via the branch's open PR (read-only; findings are surfaced for you to act on, applied via implement-suggestion). Requires an open PR — pr-reviewer has no PR-less mode. If no PR is open, Pass A is skipped and you are told to open a draft PR via /create-pr first.
  2. The code-quality skill in simplify mode — applies Class M mechanical refactors one at a time behind Skill("confidence", "code") ≥ 90 % and a scoped fast-check, reverting any that fail. Class J (judgment) recipes stay as proposals.

/create-pr delegates its post-draft quality step to review-loop (the bounded convergence loop), which calls only polish simplify — never full polish. You can run polish standalone at any point for a pre-draft local check.

Modes

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

Mode Trigger What runs
full (default) No mode token review pass (pr-reviewer, read-only), then simplify pass. The "do the works" button.
review First token review pr-reviewer pass only — read-only review surfaced as findings for you to act on.
simplify First token simplify code-quality simplify pass only — apply Class M mechanical refactors.
optimize First token optimize Optimality pass only — Skill("optimize-approach", "apply") over the branch diff (gated approach rewrite).
quick First token quick Light mechanical pass only (comments, naming, dead code). No pr-reviewer pass, no structural refactors.

Read the full file on GitHub · 269 lines

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 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 (12 stars, last pushed 2d ago), licensed MIT. It adds 217 tokens to every session and 3,801 once invoked, about $0.0011 per session on Opus 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

Other skills, from other repositories

pre-pr-audit

Pre-PR confidence audit with 5-dimension scoring. Use when: final check before commit/push/PR, evaluating PR readiness, assessing test quality + risk + coverage holistically. Triggers: pre-pr, readiness check, confidence audit, final verification, ready to PR, how confident. Not for: code review (use…

sd0xdev/sd0x-harness · 95 tokens

code-review

Review .NET changes for bugs, regressions, architectural drift, missing tests, incorrect async or disposal behavior, and platform-specific pitfalls before you approve or merge them. USE FOR: reviewing a pull request or patch in a .NET repository; checking for behavioral regressions, API misuse, or missing tests…

managedcode/dotnet-skills · 118 tokens

mine-plan-review

Strictly review one implemented repository plan against AGENTS.md, architecture, the immutable plan, implementation commits, real runtime behavior, verification evidence, and downstream contracts. Use when the user invokes the host-specific mine-plan-review skill with a plan path, asks whether a plan can be accepted…

6ixGODD/mine · 100 tokens

review

Review recent changes - run all validators and report status.

peteski22/agent-pragma · 12 tokens

verification-loop

Unified verification engine for Python data science projects. Covers environment checks, type checking, linting, tests, security scans, code review with DS anti-patterns, and notebook checks. Commands (/verify, /quality-gate) invoke different subsets of this skill.

Benkapner/claude-code-basecamp · 55 tokens

verify-pr

Heavyweight PR verification that produces a structured report: code review (delegates to miguel-review), test verification with gap analysis and execution, and upstream assumption validation. Use when the user mentions verify PR, verify my PR, PR verification, test plan for PR, or validate PR changes.

tomimor/skills · 61 tokens