codemod-runner

An automated refactoring agent that replaces repeated hardcoded visual values in a CSS file with shared design tokens, which are named values for colors, spacing, and similar styles.

In plain words
What is it for?
Use it for the mechanical design-simplification phase: create or reuse tokens in ui/src/index.css, run repeatable codemods, and verify the result with search gates, type checking, and Storybook snapshots.
Why use it?
Shared tokens make visual settings easier to change consistently while keeping the original values intact. The required checks help detect accidental styling or behavior changes.

Agent for Claude Code

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/paperclipai/paperclip/codemod-runner
Clone the repo
git clone --depth 1 https://github.com/paperclipai/paperclip

Made for: Claude Code.

Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 346 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.00045 $0.00346
Opus 5 $0.00023 $0.00173
Sonnet 5 $0.00009 $0.00069
Haiku 4.5 $0.00005 $0.00035

Measured 3d ago against content hash 1c984600400b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codemod-runner 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/agents/codemod-runner.md · 18 lines

What it actually says

You perform mechanical refactors via scripts, never hand-edits. Follow DESIGN.md at the repo root.

Rules:

  • The token destination is ui/src/index.css (Tailwind v4), optionally a tokens.css imported by it. NEVER create a parallel token source. Tokens that must be runtime-tunable go in a NON-inline block — @theme inline bakes literals at build time.
  • Where a hardcoded value EXACTLY matches an existing token, replace it with that token reference. Otherwise extract the value into a new token VERBATIM — no normalizing, rounding, or inventing a scale. Ugly values stay ugly.
  • Every rewrite happens through a codemod script committed to scripts/ before it is run. Scripts must be idempotent and reviewable.
  • Third-party style overrides that cannot use tokens go on a documented allowlist in the token source, each with an inline comment saying why.
  • Verify after every script run: rg gates (zero hardcoded hex, zero arbitrary px/bracket values in ui/src/components/** and ui/src/pages/** outside the allowlist), pnpm typecheck, and the Storybook snapshot suite. Snapshots must match the Phase 0 baseline exactly.
  • If a replacement cannot be made without visual change, skip it and record it in doc/design/TOKEN-AUDIT.md under "Needs human decision".
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 · 18 lines · 45 tokens per session scan A 1c984600400b

Subscribe to this mod's changes

codemod-runner is an agent published in the GitHub repository paperclipai/paperclip (79,833 stars, last pushed yesterday), licensed MIT. It adds 45 tokens to every session and 346 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-30.

Related

Other agents, from other repositories

cli-ui-designer

CLI interface design specialist. Use PROACTIVELY to create terminal-inspired user interfaces with modern web technologies. Expert in CLI aesthetics, terminal themes, and command-line UX patterns.

davila7/claude-code-templates · 40 tokens

frontend-styling-agent

Agent "frontend-styling-agent" from girijashankarj/cursor-handbook, covering styling agent, invocation, scope, expertise and when to use.

girijashankarj/cursor-handbook · 0 tokens

html-first-frontend

HTML-first frontend specialist using HTMX, Alpine.js, and Bootstrap for progressive enhancement. Use for simple, performant web interfaces without heavy JavaScript frameworks.

sgaunet/claude-plugins · 35 tokens

fec-ui-checker

Use this subagent to troubleshoot visual defects, layout confusion, CSS issues, responsive exceptions, and inconsistencies between interaction and design in the front-end UI, and save the report as a Markdown file. Supports obtaining design data from Figma, Sketch, MasterGo, Pixso, Moko, and Mock, compares the design…

bovinphang/frontend-craft · 89 tokens

superpowers-sage:visual-verifier

Compares implemented sections against design reference using screenshots; reads plan spec files and reference images, captures implementation via Playwright MCP, checks for arbitrary Tailwind values, reports visual match, drift, or missing elements.

hekivo/superpowers-sage · 50 tokens

ux-designer

UI/UX designer agent. Invoke for design direction, tokens, mockups, component specs, banners, slides, logos, CIP, icons. Produces HTML/CSS + tokens + specs — never .tsx React code. Target stack — React + Vite + Tailwind with shadcn/ui.

landim32/awesome-ai-skills · 66 tokens