Agent skill

UI Iteration

by UniClipboard in UniClipboard/UniClipboard

Agent Loop for pixel-perfect UI adjustments: extract a structured spec from the user's intent, apply changes one property at a time, self-verify via screenshot, and converge instead of ping-ponging.

AGPL-3.0Auto-check: warningsFrontend & Design

Install UI Iteration

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add UniClipboard/UniClipboard --skill ui-iteration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install UniClipboard/UniClipboard ui-iteration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/UniClipboard/UniClipboard.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ui-iteration .claude/skills/ui-iteration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ui-iteration
GitHub stars
1.9k
Token cost
~1.8k tokens
SKILL.md length
660 words
Files
1
Skills in repo
24
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Agent Loop for pixel-perfect UI adjustments: extract a structured spec from the user's intent, apply changes one property at a time, self-verify via screenshot, and converge instead of ping-ponging.

  • Works in 8 steps: One property per iteration → Use design tokens, not magic numbers → Always read before editing → …
  • Tasks that involve Autonomous loops
  • SKILL.md covers Purpose, When to trigger, When NOT to use and Core principles, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

UI Iteration is an agent skill from UniClipboard/UniClipboard. Agent Loop for pixel-perfect UI adjustments: extract a structured spec from the user's intent, apply changes one property at a time, self-verify via screenshot, and converge instead of ping-ponging. Designed for high-fidelity UI cloning and spacing/style iteration.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Autonomous loops and Design to code. The repository describes itself as: Real-time clipboard sync across all your devices — local-first, peer-to-peer, and end-to-end encrypted. No account. No cloud dependency. No central server. The licence is AGPL-3.0.

When your agent uses it

  • Tasks that involve Autonomous loops
  • Tasks that involve Design to code

Example prompts

  • “/ui-iteration”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. One property per iteration
  2. Use design tokens, not magic numbers
  3. Always read before editing
  4. Build the adjustment spec
  5. Apply one change at a time
  6. Handle user feedback
  7. Reference-based iteration
  8. Platform-specific considerations

What it can do on your machine

Read from SKILL.md and the folder at commit 19fc8bc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

UI Iteration loads about 1.8k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 660 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningTells the agent its actions are pre-authorized / not to stop for confirmationSKILL.md:208
    - Spending 10 rounds on one property without asking the user for a reference

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from UniClipboard/UniClipboard at commit 19fc8bc, republished under its AGPL-3.0 licence (© UniClipboard). 660 words, ~1,816 tokens.

Download SKILL.mdSave it as .claude/skills/ui-iteration/SKILL.md (or your agent's skills folder).
name
ui-iteration
description
Agent Loop for pixel-perfect UI adjustments: extract a structured spec from the user's intent, apply changes one property at a time, self-verify via screenshot, and converge instead of ping-ponging. Designed for high-fidelity UI cloning and spacing/style iteration.

ui-iteration

Purpose

An Agent Loop for UI polish work where the user needs pixel-level adjustments and the current pattern ping-pongs between overshooting and undershooting.

Observed anti-pattern (Session S47: 29 prompts!):

text
User: "padding 太大"
Agent: [changes 24→16]
User: "太小了"
Agent: [changes 16→28]
User: "还是不对, 调到 24"
Agent: [changes 28→24]  ← back to where we started
User: "horizontal 也调一下"
Agent: [changes horizontal too, now vertical is wrong again]
... 20 more rounds ...

After:

text
/ui-iteration
Agent: "What needs to change? Let me build a spec."
User: "底部胶囊的间距和图标大小"
Agent: [builds spec: 3 properties to adjust]
Agent: [changes property 1, screenshots, confirms]
Agent: [changes property 2, screenshots, confirms]
Agent: [changes property 3, screenshots, confirms]
Done in 3 rounds.

When to trigger

  • /ui-iteration — start the structured UI adjustment loop
  • User sends a screenshot with complaints about spacing, sizing, colors, alignment
  • Multiple rounds of "还是不对", "间距不对", "太大/太小" style feedback
  • High-fidelity cloning from a reference app or design mockup
  • Any time you've made 3+ UI adjustments and the user is still not satisfied

When NOT to use

  • New feature implementation (layout, components) → just build it
  • Functional bugs (button doesn't work, data not loading) → use systematic-debugging
  • Color theme / dark mode issues → direct fix, no loop needed

Core principles

1. One property per iteration

Never change multiple visual properties at once. If the user says "padding is wrong and the icon is too small", that's two iterations, not one. Changing both at once means you can't tell which change fixed (or broke) the layout.

2. Use design tokens, not magic numbers

When adjusting spacing, prefer values from an established scale rather than arbitrary numbers:

Spacing scale (4px base):

text
0, 2, 4, 6, 8, 10, 12, 16, 20, 24, 28, 32, 40, 48, 64

When the user says "a bit more padding", move ONE step up the scale, not +2px.

3. Always read before editing

Before changing a UI value, read the component to understand:

  • What other components share this value (changing it may break siblings)
  • Whether the value comes from a theme/token or is hardcoded
  • The component hierarchy (is this padding on the parent or the child?)

Workflow

Step 1 — Build the adjustment spec

When the user describes what's wrong, extract a structured spec:

text
UI Adjustment Spec:
  Component: ServerSwitcherModal
  File: src/components/ServerSwitcher.tsx

  Adjustments:
    1. [SPACING] top padding: currently 16, user wants "more breathing room"
       → Try: 24 (next scale step up)
    2. [SIZE] close icon: currently 18, user says "too thin"
       → Try: 22 (next size step)
    3. [ALIGNMENT] empty state text: currently top-aligned, user wants centered
       → Try: flex justify-center

Present the spec to the user for confirmation before making any changes.

Step 2 — Apply one change at a time

For each adjustment in the spec:

  1. Read the current file and identify the exact property
  2. Change only that one property
  3. Verify — if possible, take a screenshot or describe the expected visual result
  4. Confirm with the user before moving to the next adjustment
text
Applied adjustment 1/3: top padding 16 → 24

Next: adjustment 2 (close icon size). Proceed?
Step 3 — Handle user feedback

When the user says the adjustment is wrong:

"Too much" / "太大了": Move one scale step DOWN from the attempted value "Too little" / "太小了": Move one scale step UP from the attempted value "Not what I meant": Ask for clarification, update the spec "Perfect" / accepted: Mark adjustment as done, move to next

Show full SKILL.md (318 more words)Show less
Step 4 — Reference-based iteration

When cloning from a reference app or screenshot:

  1. Study the reference thoroughly before making any changes:

    bash
    # If reference is a file in the repo
    Read /Users/mark/MyProjects/iOSApp/UniClipboard/Views/ServerSwitcherView.swift
    
    # If reference is a screenshot
    # Read the image file for visual analysis
    Read /tmp/reference-screenshot.png
  2. Build a Transfer Spec mapping reference → implementation:

    Reference → Implementation mapping:
      iOS .presentationDetents([.medium]) → snapPoints={['50%']}
      iOS .padding(.horizontal, 24) → paddingHorizontal: 24
      iOS .font(.body) → fontSize: 17 (iOS body = 17pt)
      iOS .foregroundStyle(.secondary) → color: theme.textSecondary
  3. Apply each mapping one at a time, verifying after each

Step 5 — Platform-specific considerations
iOS (Expo)
  • Use @expo/ui components for native feel when available
  • iOS system font sizes: caption2=11, caption=12, footnote=13, subheadline=15, body=17, title3=20, title2=22, title1=28, largeTitle=34
  • Standard iOS margins: 16 (compact), 20 (regular)
  • Use SafeAreaView for edge-to-edge layouts
Android (Expo)
  • Material Design 3 spacing: 4, 8, 12, 16, 24, 32
  • Use elevation for depth instead of shadows
  • Bottom sheet: use @gorhom/bottom-sheet with proper Android styling
React (desktop)
  • Tailwind spacing scale: 0.5=2px, 1=4px, 1.5=6px, 2=8px, 3=12px, 4=16px, 5=20px, 6=24px, 8=32px
  • Use CSS variables from the project's theme
  • Check both light and dark mode after changes

Convergence strategy

If after 3 rounds of adjusting the same property the user is still not satisfied:

text
We've adjusted top padding three times (16 → 24 → 20 → 22).
Let me ask more precisely:

What's the visual effect you're aiming for?
  A) Match the iOS Settings app spacing
  B) Equal spacing top and sides
  C) Specific pixel value you have in mind
  D) Show me a reference screenshot

Getting explicit alignment on the target prevents further oscillation.

Layout consistency check

After all adjustments are made, do a quick consistency audit:

bash
# Check if the adjusted values are consistent with sibling components
grep -n "padding\|margin\|gap\|spacing" <file> | head -20

If the same component family uses different padding values after adjustments, flag it:

text
⚠️ Consistency note:
  ServerSwitcherModal: paddingHorizontal=24
  AddServerSheet: paddingHorizontal=16
  
  These are sibling sheets — should they use the same value?

Anti-patterns

  • Changing 3+ properties at once ("I'll fix padding, margin, and font size together")
  • Using magic numbers instead of scale values (17px padding, 13px gap)
  • Not reading the component before editing (missing shared styles, theme tokens)
  • Oscillating between two values without asking for clarification
  • Applying iOS design values to Android without adaptation
  • Making spacing changes without checking dark mode / different screen sizes
  • Spending 10 rounds on one property without asking the user for a reference
  • Changing the component's structure/layout when only spacing was requested

© UniClipboard, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/ui-iteration of UniClipboard/UniClipboard.

Open the folder on GitHubat commit 19fc8bc

Compare with similar skills

UI Iteration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

UI Iteration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
UI Iteration this skillUniClipboard/UniClipboard1.9k—~1.8kAutomated safety check: WarnAGPL-3.0
Figma use_figma Plugin API Ruleswarpdotdev/warp65k4 repos~4.4kAutomated safety check: PassAGPL-3.0
Figma Design to Codewarpdotdev/warp65k4 repos~2.9kAutomated safety check: PassAGPL-3.0
Scalar Design Systemscalar/scalar16k—~2.7kAutomated safety check: PassMIT
Figma Design System Rules Generatorwarpdotdev/warp65k3 repos~4.6kAutomated safety check: PassAGPL-3.0
Figma Code Connect Componentswarpdotdev/warp65k2 repos~4.2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Required groundwork before any use_figma call: the rules and reference files for running JavaScript in a Figma file through the Plugin API without common failures.

    65k GitHub starsUsed in 4 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Figma Design to Code

    warpdotdev/warp

    Turns a Figma frame or component into production code that matches the design, using the Figma MCP server and the project's own design system.

    65k GitHub starsUsed in 4 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Scalar's design system — design tokens, theming (@scalar/themes), CSS variables, and the @scalar/components library.

    16k GitHub stars~2.7k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Creates project-specific design system rules from your codebase so coding agents implement Figma designs with your components, naming and tokens.

    65k GitHub starsUsed in 3 repos~4.6k tokens
    Frontend & DesignAuto-check passed
  • Maps published Figma components to their code implementations with Code Connect, using the Figma MCP suggestion and mapping tools.

    65k GitHub starsUsed in 2 repos~4.2k tokens
    Frontend & DesignAuto-check passed
  • Design To Code

    MigoXLab/coderio

    Pixel-perfect Figma to React conversion using coderio. An agent skill from MigoXLab/coderio.

    114 GitHub starsUsed in 2 repos~1.2k tokens
    Frontend & DesignAuto-check passed

More from UniClipboard/UniClipboard

All 24 skills in this repo
  • Beui

    UniClipboard/UniClipboard

    Pick and install beUI (@beui) animated React components from the shadcn registry.

    1.9k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Create PR

    UniClipboard/UniClipboard

    Push the current branch and open a GitHub pull request against main.

    1.9k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Design Audit

    UniClipboard/UniClipboard

    定期审计代码库的工程设计问题(高心智复杂度、单一真相源被破坏、catch-all 胖接口、死代码、散落魔法字面量、泄漏抽象、资源生命周期靠环形缓冲)与可优化点,范围限定为自上次审计以来的 git churn,每条发现都落到 file:line 并对照本项目自己的 VISION.md / 各级 AGENTS.md / memory…

    1.9k GitHub stars~554 tokensUpdated today
    Auto-check passed
  • Dual Side Debug

    UniClipboard/UniClipboard

    Inspect uniclipboard logs from BOTH the macOS host and the mounted Windows peer when debugging cross-platform sync, pairing, transfer, or daemon issues.

    1.9k GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • E2E Test Thinker

    UniClipboard/UniClipboard

    Analyze the current branch's diff against main and determine which changes are testable via CLI-based end-to-end tests.

    1.9k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • iOS Log Diagnose

    UniClipboard/UniClipboard

    Drive the UniClipboard iOS app in a simulator and read its OSLog yourself to diagnose a mobile-sync bug, instead of asking the user to paste logs.

    1.9k GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Questions about UI Iteration

What does UI Iteration do?

Agent Loop for pixel-perfect UI adjustments: extract a structured spec from the user's intent, apply changes one property at a time, self-verify via screenshot, and converge instead of ping-ponging. UI Iteration is an agent skill from UniClipboard/UniClipboard. Agent Loop for pixel-perfect UI adjustments: extract a structured spec from the user's intent, apply changes one property at a time, self-verify via screenshot, and converge instead of ping-ponging.

When should I use UI Iteration?

UI Iteration fits situations like: tasks that involve Autonomous loops; tasks that involve Design to code.

How do I install UI Iteration in Claude Code?

Run `npx skills add UniClipboard/UniClipboard --skill ui-iteration -a claude-code`. Or copy the skill folder (.agents/skills/ui-iteration in UniClipboard/UniClipboard) into .claude/skills/ui-iteration in your project. Claude Code loads it when a task matches its description.

How do I install UI Iteration in Codex?

Run `npx skills add UniClipboard/UniClipboard --skill ui-iteration -a codex`. Or copy the skill folder (.agents/skills/ui-iteration in UniClipboard/UniClipboard) into .agents/skills/ui-iteration in your project. Codex loads it when a task matches its description.

Can I use UI Iteration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add UniClipboard/UniClipboard --skill ui-iteration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ui-iteration, .gemini/skills/ui-iteration, .github/skills/ui-iteration and .opencode/skills/ui-iteration in your project.

What does UI Iteration need to run?

SKILL.md names no scripts, command-line tools or credentials: UI Iteration is instructions for the agent only.

Does UI Iteration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is UI Iteration safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): tells the agent its actions are pre-authorized / not to stop for confirmation. Read the flagged lines before installing; the check is not a guarantee either way.

What licence does UI Iteration use?

UI Iteration is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does UI Iteration use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to UI Iteration?

Skills that share tags, products or a category with UI Iteration: Figma use_figma Plugin API Rules (warpdotdev/warp, 65k stars), Figma Design to Code (warpdotdev/warp, 65k stars), Scalar Design System (scalar/scalar, 16k stars) and Figma Design System Rules Generator (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains UI Iteration?

UniClipboard (a GitHub organization) maintains it in UniClipboard/UniClipboard, which has 1,860 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 9, 2026.

Source: UniClipboard/UniClipboard on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.