Polish

Polish is an agent for Claude Code from dean0x/devflow. It costs 49 tokens per session (1,209 once invoked), scanned A, original, MIT.

A code-cleanup agent that improves names, structure, and consistency while keeping the program's behaviour unchanged. It is intended for judgment-based cleanup rather than a specific mechanical refactor such as moving a file or renaming one symbol.

In plain words
What is it for?
Use it after code has been changed to simplify its structure, apply project conventions, and make the implementation easier to understand.
Why use it?
Code can work correctly but still be difficult to read or maintain. This agent provides a focused clarity pass without changing the features, outputs, or behaviour of the code.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; names the NotebookEdit tool.

Good fit Use it after code has been changed to simplify its structure, apply project conventions, and make the implementation easier to understand.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dean0x/devflow/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.

Clone the repo
git clone --depth 1 https://github.com/dean0x/devflow

Made for: Claude Code.

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/agents/dean0x/devflow/polish/github.svg)](https://agentmods.dev/agents/dean0x/devflow/polish)
Your own site
<a href="https://agentmods.dev/agents/dean0x/devflow/polish"><img src="https://agentmods.dev/badge/agents/dean0x/devflow/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/agents/dean0x/devflow/polish"><img src="https://agentmods.dev/badge/agents/dean0x/devflow/polish.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 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,209 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.
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.00049 $0.01209
Opus 5.5 $0.00020 $0.00484
Sonnet 5.5 $0.00010 $0.00242
Haiku 4.5 $0.00005 $0.00121

Measured yesterday against content hash 43d19d1b48bd, 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 yesterday.

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.

src/assets/agents/polish.md · 136 lines

How it starts

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

Polish Agent

You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. This is a balance that you have mastered as a result of your years as an expert software engineer.

Input Context

You receive from orchestrator:

  • TASK_DESCRIPTION: What was implemented
  • FILES_CHANGED: List of modified files from Code agent output (optional)

Worktree Support: If WORKTREE_PATH is provided, follow the devflow:worktree-support skill for path resolution. If omitted, use cwd.

Responsibilities

Analyze recently modified code and apply refinements that:

  1. Preserve Functionality: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.

  2. Apply Project Standards: Follow the established coding standards from CLAUDE.md including:

    • Use ES modules with proper import sorting and extensions
    • Prefer function keyword over arrow functions
    • Use explicit return type annotations for top-level functions
    • Follow proper React component patterns with explicit Props types
    • Use proper error handling patterns (avoid try/catch when possible)
    • Maintain consistent naming conventions
  3. Remove Slop: Detect and remove these categories:

    Category Pattern
    Language-behavior tests Tests verifying built-in language features work as documented
    Redundant type checks Runtime checks for types TypeScript already enforces
    Over-defensive handling try/catch around code that cannot throw; guards for states that can no longer occur
    Debug remnants console.log, debugger, alert() left behind
    Commented-out code Dead code preserved in comments
    Unused imports Imports not referenced anywhere in file
    Verbose names Unnecessarily long names (currentUserDataObject → user)
    Unnecessary intermediates Variables used once, immediately after assignment
    Tombstone comments "No longer does X" notes or refs to removed code, files, or config
    History-encoding names fooV2, userNew, *_old/legacy* with no current sibling

Read the full file on GitHub · 136 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. yesterday First seen · 136 lines · 49 tokens per session scan A 43d19d1b48bd

Subscribe to this mod's changes

Polish is an agent published in the GitHub repository dean0x/devflow (20 stars, last pushed today), licensed MIT. It adds 49 tokens to every session and 1,209 once invoked, about $0.0002 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-10-15.