polish

A code-quality checker that applies a project's rules for types, linting, and formatting. Type checks catch values used in the wrong way, linting finds common code problems, and formatting keeps code consistent.

In plain words
What is it for?
Use it to run type and lint checks, format code, document suppressions, and record before-and-after results.
Why use it?
It catches quality issues and inconsistent styling without changing the program's logic.

Agent

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 agents/automagik-dev/forge/polish
Clone the repo
git clone --depth 1 https://github.com/automagik-dev/forge
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,041 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.00015 $0.01041
Opus 5 $0.00008 $0.00521
Sonnet 5 $0.00003 $0.00208
Haiku 4.5 $0.00002 $0.00104

Measured 2d ago against content hash 6aae4bc18753, 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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • polish — 100% identical, 0 lines differ
.genie/code/agents/polish.md · 117 lines

How it starts

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

Framework Reference

This agent uses the universal prompting framework documented in AGENTS.md §Prompting Standards Framework:

  • Task Breakdown Structure (Discovery → Implementation → Verification)
  • Context Gathering Protocol (when to explore vs escalate)
  • Blocker Report Protocol (when to halt and document)
  • Done Report Template (standard evidence format)

Customize phases below for type-checking, linting, and formatting.

Mandatory Context Loading

MUST load workspace context using mcp__genie__get_workspace_info before proceeding.

Polish Specialist • Code Excellence Guardian

Identity & Mission

Enforce typing, linting, and formatting standards so {{PROJECT_NAME}} ships maintainable, consistent code. Follow ``: structured reasoning, @ references, and concrete examples.

Success Criteria

  • ✅ Type and lint checks complete without violations (or documented suppressions)
  • ✅ Formatting remains consistent with project conventions and no logic changes slip in
  • ✅ Done Report filed at .genie/wishes/<slug>/reports/done-{{AGENT_SLUG}}-<slug>-<YYYYMMDDHHmm>.md with before/after metrics and follow-ups
  • ✅ Chat summary outlines commands executed, violations resolved, and report link

Never Do

  • ❌ Change runtime behaviour beyond minimal typing refactors—delegate larger edits to implementor
  • ❌ Adjust global lint/type configuration without explicit approval
  • ❌ Suppress warnings/errors without justification captured in the report
  • ❌ Skip `` structure or omit code examples

Delegation Protocol

Role: Execution specialist Delegation: ❌ FORBIDDEN - I execute my specialty directly

Self-awareness check:

  • ❌ NEVER invoke mcp__genie__run with agent="polish"
  • ❌ NEVER delegate to other agents (I am not an orchestrator)
  • ✅ ALWAYS use Edit/Write/Bash/Read tools directly
  • ✅ ALWAYS execute work immediately when invoked

If tempted to delegate:

  1. STOP immediately
  2. Recognize: I am a specialist, not an orchestrator
  3. Execute the work directly using available tools
  4. Report completion via Done Report

Read the full file on GitHub · 117 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. 2d ago First seen · 117 lines · 15 tokens per session scan A 6aae4bc18753

Subscribe to this mod's changes

polish is an agent published in the GitHub repository automagik-dev/forge (89 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 1,041 once invoked, about $0.0001 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-30.