skills/design-polish-loop/SKILL.md
Iterative visual design-polish loop for an existing or WIP web UI. Each round: capture the live page as screenshots, judge it from the rendered pixels, and apply CSS polish toward a better-looking target using /css-wisdom's tight-token strategy — then re-capture and compare. The target direction is set by codex-imagegen 'north-star' mockups generated from the current screenshot, so the loop pursues a genuinely better look instead of nudging the existing one in place. Use when: (1) user says 'design-polish-loop', 'polish loop', 'polish this page/design/UI', (2) user wants to level up / upgrade the look of a current design or WIP project, (3) user wants AI-proposed redesign directions applied to a real rendering page, (4) user calls a design plain, dated, flat, or unpolished and wants it improved. Main use case: improving the current design of a WIP project. It polishes what already renders — not brand-new-from-scratch pages.
npx skillsauth add takazudo/claude-resources design-polish-loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Level up the look of a page that already renders. Each round looks at the actual pixels, finds the gap to a better-looking target, and closes it with on-system CSS — then re-captures and checks. The target is proposed by image generation, so the loop reaches for a genuinely nicer design rather than orbiting the current one.
This is a thin orchestrator — it owns the loop, not the techniques. It drives skills that already exist; its value is wiring them into a capture → propose → diagnose → polish → re-capture cycle with the right discipline at each step.
| Step | Skill it drives | Role |
| --- | --- | --- |
| Capture | /headless-browser | screenshot the live page at real breakpoints, worst-case content |
| Propose direction | /codex-imagegen | turn the current screenshot into polished "north-star" mockups (ChatGPT-billed) |
| Judge & diagnose | /design-iteration-wisdom | render→look→diagnose from pixels; reference-match against the chosen direction |
| Constrain the fix | /css-wisdom | polish using the tight-token strategy — system tokens, never arbitrary px/hex |
| Measure | /verify-ui | settle color / exact-value questions the eye can't (sample, don't eyeball) |
The novel ingredient is imagegen as the direction engine. A model handed the existing source over-anchors on it and "polish" collapses back to the original. A north-star mockup generated from the screenshot breaks that anchor — it shows a better look the loop then implements with real tokens. The mockup is direction, not spec (see caveats): mood, hierarchy, spacing rhythm, color, decorative treatment — never its exact text/numbers/components, which it hallucinates.
/pricing or http://localhost:5173/pricing). If omitted, ask which page, or infer the single obvious WIP route./design-iteration-wisdom self-judged polish (free, but only nudges the current look — no fresh direction)./prototype-first-wisdom) instead of in-place. Use when the chosen direction is a big departure that would fight the existing markup; otherwise default in-place polish on the WIP.Per /design-iteration-wisdom Step 0: find the design-system / token source (a project *design-system* skill/doc, or the existing token scale as de-facto), the dev-serve command + port (reuse a running server, don't spawn a duplicate), and the target route(s). Load /css-wisdom tight-token articles now so polish stays on-system from round 1 — at minimum methodology/design-systems/tight-token-strategy/index.mdx and component-tokens.mdx (the system-tokens-vs-arbitrary-values decision framework), plus color-tokens.mdx / typography-tokens.mdx / token-preview.mdx as the change demands.
Serve the page, then /headless-browser screenshot at ~390 / ~760 / ~1300px, on the worst-case content (longest title, longest list, near-empty group), not the page top. Read every PNG. This baseline is both the imagegen input and the before-shot.
--no-imagegen / --target)Feed the baseline (usually the desktop shot) to /codex-imagegen once per direction:
$HOME/.claude/skills/codex-imagegen/scripts/codex-imagegen.sh \
--in <baseline-desktop.png> --out direction-1.png \
--prompt "Polished, premium redesign of this screen. Keep the same content, structure, and information. Elevate spacing rhythm, typographic hierarchy, color, depth, and detailing. Modern, restrained, on-brand — not generic AI gradient slop."
Vary the brief per direction (e.g. "editorial / high-contrast", "calm / airy", "denser / utilitarian") to spread the options. Read the mockups, show them to the user, and let the user pick the direction — this is a taste call only a human owns. The picked mockup is the round target.
count times)Each round is /design-iteration-wisdom with the chosen direction as the reference:
/css-wisdom tight-token framework. "Cards read flat → raise elevation one step + tighten in-card gaps, widen between-card gap" beats "add shadow". Never introduce an arbitrary value where a token exists./verify-ui (color especially — the eye lies; sample computed styles).count.Commit each accepted round (or stash before a risky one) so any round is revertible.
Design has a taste component an AI approximates but doesn't own. When the computable invariants pass (/design-iteration-wisdom → contrast ≳2×, monotonic hierarchy) and it reads clean, stop and show before / after / north-star side by side for the final call. Don't loop chasing a verdict only a person can give.
Each north-star mockup is one /codex-imagegen call — roughly 90k–230k ChatGPT tokens (photoreal/complex prompts cost more). Generate directions once up front, not per round; the rounds themselves are free (capture + CSS). Re-invoke imagegen only to explore a new direction or when the loop plateaus and a fresh target is wanted. --no-imagegen removes the ChatGPT cost entirely.
/css-wisdom's tight-token strategy is that improvements move along the project's scale. An arbitrary #hex or 13px to "match the mockup" is a regression even if it looks closer — flag it, find the token./prototype-first-wisdom clean-room first (--cleanroom), then ported back deliberately.tools
Acceptance gate for a branch produced by an OpenAI Codex CLI run — usually Codex implementing a /big-plan epic that was handed off to it. Codex reports the work 'done' (or the user flags it WIP with corrections); this skill confirms the branch actually fulfils the original spec, fixes what falls short, and routes larger discoveries into GitHub issues. Use when: (1) User says '/finalize-codex-work', 'finalize codex work', 'confirm the codex work', 'check the codex branch', or 'codex said it's done', (2) A branch is the result of a Codex CLI session and needs verification against its spec issue/PR, (3) After assigning a /big-plan epic to Codex CLI. Pass -m/--merge to run /pr-complete -c at the end.
tools
Read a Figma design node directly from a share URL via the Figma REST API — no Dev Mode subscription, no MCP, no desktop app. Renders the node to PNG and dumps its full style/layout JSON so the design can be described, compared, or implemented. Use whenever the user gives a Figma design URL (figma.com/design/... or /file/...) and wants to see, read, inspect, reference, or implement that node — including `/fig-url-refer <url>`. This is the URL-based counterpart to `/figrefer` (which needs a Dev-plan desktop MCP); prefer this one when the input is a URL rather than a live desktop selection.
tools
Sync the user's Claude Code workflow skills into the OpenAI Codex CLI settings repo ($HOME/.codex) as Codex-native ports, fix the Codex .gitignore for new local state, then commit and push. Use when: (1) user says '/dev-codex-sync-settings-from-claude', 'sync codex settings', 'sync claude skills to codex', 'port skills to codex', or 'update codex from claude'; (2) after updating ~/.claude workflow skills (big-plan, x, x-as-pr, x-wt-teams) and Codex should catch up; (3) the $HOME/.codex repo has drifted behind $HOME/.claude. The ports are condensed Codex-native REWRITES, never file copies.
development
Analyze a video file (mov, mp4, webm, etc.) or a YouTube video by extracting still frames with ffmpeg and reading them chronologically with vision — Claude cannot ingest video files directly. Use whenever the user provides a video file path or YouTube URL and wants to know what happens in it: "read this video", "watch this video", "check this recording", "what happens in this .mov/.mp4", analyzing a screen recording of a UI bug, or verifying UI behavior captured in a video, even if they don't name this skill.