polish

An interactive codebase-improvement process that audits a project from selected viewpoints and records progress in a POLISH.md file.

In plain words
What is it for?
Use it to inspect projects such as Rust libraries, command-line tools, or web frontends for issues like unclear interfaces and missing public operations.
Why use it?
It turns repeated reviews into a tracked loop, so later sessions can see what changed and what was already checked.

Skill for Claude CodeCodex

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.

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

Made for: Claude Code, Codex.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,787 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00034 $0.01787
Opus 5 $0.00017 $0.00894
Sonnet 5 $0.00007 $0.00357
Haiku 4.5 $0.00003 $0.00179

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

.claude/skills/polish/SKILL.md · 134 lines

How it starts

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

/polish

You are running an incremental codebase polish session. This is one step of a fixpoint loop — audit, review with user, apply, repeat.

Step 1: Orient

Check for an existing POLISH.md in the project root:

  • If it exists: read it, note the lenses used last time, the round number, and the git hash or timestamp recorded. Run git log --oneline <recorded-hash>..HEAD (or git log --since=<timestamp> --oneline if hash unavailable) to summarize what changed since last polish. Present this summary to the user before anything else: what changed, which lenses were run last time.
  • If it does not exist: note this is a fresh session.

Also check the project type: Rust library, CLI tool, web frontend, CLAUDE.md / documentation, etc. Infer from the file structure.

Step 2: Agree on lenses

Present the user with lens options based on project type. Suggest a preset but let them choose or customize. Do not proceed until confirmed.

Universal lenses

These apply to any codebase:

  • api-clarity — public surface legibility from an external consumer's perspective: naming, ergonomics, discoverability
  • api-gaps — public surface completeness: missing operations, asymmetric coverage, things you'd expect to exist that don't
  • consistency — are patterns, contracts, error handling, and validation applied uniformly across analogous components? (goes beyond naming — behavioral consistency)
  • doc-coverage — public items documented? examples work? links valid?
  • ui-text — audit UI-visible strings (status bars, tooltips, dialogs, labels). Flag text that exists outside the functional inventory: labels, inputs, navigation, non-visible status, errors with remediation. Tutorials, narration of visible state, encouragement, and redundant descriptions are noise — recommend deletion, not rewording.
  • error-surface — error types complete, meaningful, and consistent?
  • completeness — what inputs or cases does this code silently accept that it should validate or reject?
  • adversarial — make the strongest case against this code
  • overfit — code over-tuned for one specific scenario at the cost of generality, correctness at edge cases, or readability; algorithms or data structures chosen for a benchmark that doesn't represent real usage
  • interaction-model — from a user's perspective, what standard capabilities or flows for this kind of software are missing, broken, or incomplete? Compare against the established interaction conventions of the software category, not just the codebase's own API surface.
  • affordance-design — Good UI answers "what can I do here?" from its own structure. Interactions are typed (commands, gestures, ambient signals, navigation) and each type earns a surface suited to it — forcing everything into command-form is itself a smell. Audit for: surfaces that force hunting instead of scanning; irrelevant items dimmed when they should be absent; layout that shifts unpredictably within a mode; and search or palette load-bearing for primary workflows instead of serving as a long-tail fallback. When a surface feels overwhelming, the fix is fewer composable primitives, not better filtering over a messy graph.
  • legacy-debt — unannotated legacy code: stale patterns, commented-out blocks, deprecated paths, or dead code with no comment explaining why it's still present. Priority: unannotated legacy actively poisons agent context — an agent seeing an unexplained old pattern treats it as signal and copies it
  • incomplete-migrations — in-progress transitions where old and new patterns coexist without a clear signal about which is canonical: type/struct renames where both names still appear, call sites not yet updated after an API change, mixed import styles, half-migrated error handling, TODOs referencing an in-flight refactor. Severity scales with breadth — a migration spread across dozens of files where old patterns dominate by count is the worst case: a cold agent surveys the codebase, concludes the old pattern is the house style, and copies it forward, making the migration harder to complete with every session

Read the full file on GitHub · 134 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. 3d ago First seen · 134 lines · 34 tokens per session scan A fb342333a7af

Subscribe to this mod's changes

polish is a skill published in the GitHub repository rhi-zone/normalize (5 stars, last pushed 4d ago), licensed Apache-2.0. It adds 34 tokens to every session and 1,787 once invoked, about $0.0002 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

repomix

Pack and analyze codebases into AI-friendly single files using Repomix. Use when the user wants to explore repositories, analyze code structure, find patterns, check token counts, or prepare codebase context for AI analysis. Supports both local directories and remote GitHub repositories.

yamadashy/repomix · 58 tokens

knowledge-base

Create and maintain a Markdown knowledge base that any AI agent can read, search, and update. Use when the user wants to start a knowledge base, add or update notes, organize docs/notes for an agent or LLM to consume, build an index of notes, or run a cleanup/maintenance pass on an existing MD knowledge base. Triggers…

wonderwhy-er/DesktopCommanderMCP · 112 tokens

sem

Use sem to get entity-level (function/class/method) semantic diffs, impact analysis, blame, and dependency context from any Git repo. Trigger this skill whenever the user asks what changed in a commit or PR, wants to understand the blast radius of a change, needs to know who last modified a function, wants to trace…

Ataraxy-Labs/sem · 112 tokens

weave

Entity-level semantic merge driver for Git. Resolves conflicts at the function/class level instead of the line level, so two changes to different functions in the same file never conflict.

Ataraxy-Labs/weave · 0 tokens

ix

This skill should be used when answering structural questions about a codebase: understanding what a symbol is, tracing flows, measuring change impact, finding callers/callees/imports, or detecting code smells. It drives the Ix CLI (ix map/explain/trace/impact/search/rank/smells) against a persistent code graph stored…

ix-infrastructure/Ix · 103 tokens

roam

Codebase comprehension via roam-code CLI. Use when exploring codebases, planning modifications, debugging failures, assessing PR risk, or checking architecture health. Triggers on: understanding project structure, pre-change safety checks, finding symbols/files, blast radius analysis, affected tests, health scoring…

Cranot/roam-code · 86 tokens