Agent skill

Pixel Perfect

by bitovi in bitovi/ai-enablement-prompts

Orchestrate a complete visual QA workflow to make a dev/Storybook page match a baseline URL pixel-for-pixel.

MITAuto-check passedFrontend & Design

Install Pixel Perfect

skills CLI
$ npx skills add bitovi/ai-enablement-prompts --skill pixel-perfect -a claude-code

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

GitHub CLI
$ gh skill install bitovi/ai-enablement-prompts pixel-perfect --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/bitovi/ai-enablement-prompts.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/playwright/skills/pixel-perfect .claude/skills/pixel-perfect && 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
pixel-perfect
GitHub stars
121
Token cost
~2.6k tokens
SKILL.md length
1,012 words
Files
1
Skills in repo
40
Repo updated
First seen
Licence
MIT

At a glance

Orchestrate a complete visual QA workflow to make a dev/Storybook page match a baseline URL pixel-for-pixel.

  • Works in 4 steps: Initial Visual Diff → Computed Style Extraction → Re-Diff → …
  • Replicating a production page
  • SKILL.md covers When to Use, When NOT to Use, Prerequisites and Design System, plus 8 more sections
  • Calls node

What it does

Pixel Perfect is an agent skill from bitovi/ai-enablement-prompts. Orchestrate a complete visual QA workflow to make a dev/Storybook page match a baseline URL pixel-for-pixel. Combines the visual-diff skill (screenshot comparison) with the computed-styles skill (CSS property extraction) in a loop until the pages match. Use when replicating a production page, matching a design reference, or achieving pixel perfection on a component.

Its SKILL.md is about 2.6k 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 Visual regression testing and Design to code. It works with Storybook. The repository describes itself as: Prompts Bitovi uses for software development. The licence is MIT.

When your agent uses it

  • Replicating a production page
  • Matching a design reference
  • Achieving pixel perfection on a component

Example prompts

  • “/pixel-perfect”

Workflow steps

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

  1. Initial Visual Diff
  2. Computed Style Extraction
  3. Re-Diff
  4. Convergence

What it can do on your machine

Read from SKILL.md and the folder at commit df229b1. 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

    Shell commands in SKILL.md call:

    • node

    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

Pixel Perfect loads about 2.6k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 1,012 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 bitovi/ai-enablement-prompts at commit df229b1, republished under its MIT licence (© bitovi). 1,012 words, ~2,634 tokens.

Download SKILL.mdSave it as .claude/skills/pixel-perfect/SKILL.md (or your agent's skills folder).
name
pixel-perfect
description
Orchestrate a complete visual QA workflow to make a dev/Storybook page match a baseline URL pixel-for-pixel. Combines the visual-diff skill (screenshot comparison) with the computed-styles skill (CSS property extraction) in a loop until the pages match. Use when replicating a production page, matching a design reference, or achieving pixel perfection on a component.

Skill: Pixel-Perfect Orchestration

Drive a page or component to pixel-perfect fidelity with a baseline by orchestrating visual-diff (screenshot comparison) and computed-styles (CSS property extraction) in a converging loop.


When to Use

  • Replicating a production page's look in the local codebase
  • Matching a Storybook component to a live reference
  • Any task where the user says "make it match" or "pixel perfect"

When NOT to Use

  • Building new designs from scratch (no baseline exists)
  • Content-only changes with no visual target
  • Figma-based design work (use the Figma MCP skill instead)

Prerequisites

  1. All prerequisites from the visual-diff and computed-styles skills are met
  2. The baseline URL and current URL are known
  3. The dev server or Storybook is running

Design System

All fixes must use the Bitovi design token system defined in src/styles/bitovi-theme.css. Prefer token-based Tailwind classes over arbitrary values. Only use [arbitrary] syntax when no matching token exists in the theme.


Workflow Overview

┌─────────────────────────────────────┐
│  For each breakpoint:               │
│  desktop → tablet → mobile          │
│                                     │
│  1. VISUAL DIFF                     │
│     Screenshot both pages           │
│     Run pixel diff                  │
│     Identify problem regions        │
│     diffPercent < 2%? ──── YES ──── next breakpoint (or DONE if all 3 pass)
│              │                      │
│              NO                     │
│              ▼                      │
│  2. COMPUTED STYLES                 │
│     Extract CSS from both pages     │
│     Build property diff table       │
│     Fix mismatches with Tailwind    │
│     Verify fixes took effect        │
│              │                      │
│              ▼                      │
│  3. RE-DIFF                         │
│     Re-screenshot current page      │
│     Run pixel diff again            │
│     diffPercent < 2%? ──── YES ──── next breakpoint
│              │                      │
│              NO                     │
│              ▼                      │
│     Go to step 2 with new regions   │
└─────────────────────────────────────┘

Detailed Steps

Step 1: Initial Visual Diff

Load the visual-diff skill and run the full workflow:

  1. Screenshot the baseline at desktop breakpoint (1280x720)
  2. Screenshot the current page at the same breakpoint
  3. Run node scripts/visual-diff.mjs to produce the diff image and JSON stats
  4. View the diff image through the HTTP server + Playwright vision
  5. Record the diffPercent and identify which regions (top, middle, bottom) have red clusters

If diffPercent < 2%, the pages are effectively matching. Report success and stop.

If diffPercent >= 2%, proceed to Step 2.

Interpreting the Diff Image

Map red clusters to specific DOM regions:

Red cluster locationLikely DOM regionExample
Top bandNavigation barHeight, padding, logo, nav items
Below navHero sectionFont sizes, spacing, background
Middle gridCard layoutCard sizing, gaps, typography
BottomFooterLink colors, spacing, background
Full-width bandsContainer widthMax-width, padding differences
Scattered dots onlyFont renderingUsually acceptable, not actionable
Step 2: Computed Style Extraction

Load the computed-styles skill. Based on the regions identified in Step 1:

  1. Plan extraction targets: Map each red region to specific DOM elements and CSS properties
  2. Extract from baseline: Use mcp_playwright_browser_evaluate on the baseline URL
  3. Extract from current: Use mcp_playwright_browser_evaluate on the current URL (remember the Storybook iframe pattern if applicable)
  4. Build diff table: Compare every property, flag mismatches
  5. Fix mismatches: Apply Tailwind classes — always resolve computed values to design tokens from src/styles/bitovi-theme.css first (see the Design System section above). Only use [arbitrary] values when no token matches.
  6. Verify each fix: Re-extract from current to confirm the computed value now matches
Prioritization

Fix differences in this order (highest visual impact first):

  1. Layout: width, height, maxWidth, padding, margin, display, flexDirection
  2. Typography: fontSize, fontWeight, fontFamily, lineHeight, letterSpacing
  3. Colors: color, backgroundColor, borderColor
  4. Decoration: borderRadius, boxShadow, opacity
  5. Fine-tuning: textTransform, gap, overflow
Step 3: Re-Diff

After fixing a batch of computed style differences:

  1. Re-screenshot only the current page (baseline hasn't changed)
  2. Re-run the pixel diff
  3. View the new diff image

Evaluate progress:

New diffPercentAction
< 2%Done. Report final stats.
Decreased significantlyGood progress. If > 2%, identify remaining red regions and loop back to Step 2.
Unchanged or increasedSomething went wrong. Check that fixes actually applied (Tailwind theme overrides, specificity conflicts). Use computed-styles to verify.
Step 4: Convergence

Continue the loop (Steps 2-3) until diffPercent < 2% or the remaining differences are confirmed to be not worth further pursuit.

Show full SKILL.md (454 more words)Show less
Stop and flag for manual review — do NOT keep iterating on these:
  • Sub-pixel font rendering (different OS/browser/font-smoothing)
  • Anti-aliasing artifacts (icon edges, curved borders)
  • Pixel-level positioning offsets (elements within 1–3px of correct position)
  • Shadow or gradient rendering variance
  • Third-party embedded content (reCAPTCHA, chat widgets, analytics overlays)
  • Dynamic content (timestamps, user-specific data, live chat, cookie banners)
  • Differences that require non-Tailwind workarounds or browser-specific hacks

When stopping for one of these reasons, clearly state:

  1. What the remaining diffPercent is
  2. Which specific element(s) are causing it
  3. Why it is not worth automating further
  4. What the user could do manually to address it

Using Subagents

For complex pages with many regions to fix, use subagents to parallelize investigation:

Investigation Subagent

Use the Explore agent to research element structures before extracting styles:

"Explore the DOM structure of [baseline URL]. Find all elements in the 
[region] section. Report element tags, class names, and nesting structure. 
Thoroughness: medium."
Extraction Pattern

When extracting styles, do both pages in sequence (not parallel, since Playwright MCP shares one browser):

  1. Navigate to baseline → extract → store results
  2. Navigate to current → extract → store results
  3. Compare in conversation context

Breakpoint Strategy

Always run the pixel-perfect loop at all three breakpoints:

BreakpointWidthHeightOrder
Desktop12807201st — fix base layout here first
Tablet76810242nd — fix responsive breakpoint issues
Mobile3756673rd — fix mobile-specific issues

Workflow:

  1. Run the full visual-diff + computed-styles loop at desktop until diffPercent < 2%
  2. Then run at tablet — resize viewport, re-screenshot both sides, diff, fix, re-diff
  3. Then run at mobile — same process

Fix desktop first so you're not chasing responsive issues against a broken base layout. Each breakpoint has its own screenshot files (e.g. temp/vdiff-baseline-tablet.png, temp/vdiff-current-tablet.png, temp/vdiff-diff-tablet.png).

Component-scoped comparison at smaller breakpoints: Re-measure the component height at each breakpoint (it will change) and resize the viewport accordingly before screenshotting.


Session Notes

Keep a running log of what was fixed and verified. This helps avoid re-checking properties and provides a summary at the end.

Use session memory (/memories/session/) to store:

  • The diff table with baseline vs current values
  • Which properties have been fixed and verified
  • Current diffPercent after each round

Success Criteria

LeveldiffPercentDescription
Pixel perfect< 1%Only sub-pixel rendering differences remain
Excellent match1–2%Minor font rendering, anti-aliasing, or shadow differences — stop here
Good match2-5%Small spacing or color differences worth fixing
Needs work> 5%Significant visual differences still present

The default target is < 2%. Stop and report as soon as this threshold is met — do not keep iterating to squeeze from 1% to 0% unless the user explicitly asks. Flag remaining issues that fall into the "hard to align" bucket (font rendering, sub-pixel spacing, third-party overlays) and let the user decide whether to fix them manually.


Example Session

User: "Make the nav component match production"

Agent:
1. Load pixel-perfect skill
2. Load visual-diff skill → screenshot production nav + Storybook nav
3. Run diff → diffPercent: 12.3%
4. View diff → red clusters at: nav height, logo area, nav item spacing, CTA button
5. Load computed-styles skill
6. Extract nav properties from production:
   nav.height = 80px, nav.padding = 0px 128px, logo.width = 108px ...
7. Extract same from Storybook:
   nav.height = 60px, nav.padding = 0px 32px, logo.width = 80px ...
8. Build diff table, fix mismatches with Tailwind — resolve to design tokens from `src/styles/bitovi-theme.css` (e.g. `bg-brand-orange`, `text-teal-500`, `font-semibold`, `p-md`)
9. Verify fixes with re-extraction
10. Re-screenshot + re-diff → diffPercent: 3.1%
11. View diff → remaining red at CTA button border-radius
12. Extract CTA styles, fix borderRadius
13. Re-diff → diffPercent: 0.8%
14. Done! Report final comparison table.

Cleanup

After the session:

bash
rm -f temp/vdiff-*.png

All computed style data lives in conversation context and session memory only.

© bitovi, MIT. 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 plugins/playwright/skills/pixel-perfect of bitovi/ai-enablement-prompts.

Open the folder on GitHubat commit df229b1

Compare with similar skills

Pixel Perfect 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.

Pixel Perfect compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pixel Perfect this skillbitovi/ai-enablement-prompts121—~2.6kAutomated safety check: PassMIT
MiniMax M3 Multimodal Inputmadebyaris/advance-minimax-m3-cursor-rules126—~1.6kAutomated safety check: PassMIT
Figma To StaticLeoYeAI/openclaw-master-skills2.2k—~7.1kAutomated safety check: PassMIT
Figma Design Handoffyonatangross/orchestkit290—~2.7kAutomated safety check: PassMIT
Design To Codeyonatangross/orchestkit290—~4.4kAutomated safety check: NotesMIT
Storybook MCP Integrationyonatangross/orchestkit290—~1.5kAutomated safety check: PassMIT

Similar skills

  • MiniMax M3 Multimodal Input

    madebyaris/advance-minimax-m3-cursor-rules

    Teaches an agent on MiniMax M3 to ground visual claims in attached images, screenshots, mockups and clips, and to re-read results after a visual change.

    126 GitHub stars~1.6k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Figma To Static

    LeoYeAI/openclaw-master-skills

    Convert Figma design files to pixel-level mobile-first static HTML/CSS pages.

    2.2k GitHub stars~7.1k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Figma Design Handoff

    yonatangross/orchestkit

    Figma-to-code design handoff patterns including Figma Variables to design tokens pipeline, component spec extraction, Dev Mode inspection, Auto Layout to CSS Flexbox/Grid mapping, and visual…

    290 GitHub stars~2.7k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Design To Code

    yonatangross/orchestkit

    Mockup-to-component pipeline using Google Stitch, 21st.dev, and Storybook MCP.

    290 GitHub stars~4.4k tokensUpdated today
    Frontend & DesignAuto-check: notes
  • Storybook MCP Integration

    yonatangross/orchestkit

    Reference for the Storybook MCP server itself (@storybook/addon-mcp): 6 tools across 3 toolsets (dev, docs, testing), availability detection, and per-agent toolset filtering.

    290 GitHub stars~1.5k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Replica

    adobe/skills

    Same-design migration — re-platform a site to AEM Edge Delivery (or any clean front end) keeping its current design near pixel-perfect.

    197 GitHub stars~8.9k tokensUpdated today
    Frontend & DesignAuto-check passed

More from bitovi/ai-enablement-prompts

All 40 skills in this repo
  • Component Registry

    bitovi/ai-enablement-prompts

    Track reusable UI components and unextracted patterns. An agent skill from bitovi/ai-enablement-prompts.

    121 GitHub stars~597 tokensUpdated 28 days ago
    Auto-check passed
  • Computed Styles

    bitovi/ai-enablement-prompts

    Extract and compare computed CSS styles between a baseline URL and a dev/Storybook URL using Playwright MCP evaluate calls.

    121 GitHub stars~2.4k tokensUpdated 28 days ago
    Auto-check passed
  • Create Plugin

    bitovi/ai-enablement-prompts

    A skill your agent uses when the user asks to "create a plugin", "add a plugin", "make a new plugin", "build a plugin", or wants to package skills into an installable plugin for this marketplace.

    121 GitHub stars~2k tokensUpdated 28 days ago
    Auto-check passed
  • Create React Modlet

    bitovi/ai-enablement-prompts

    Create React components, hooks, or utilities following the modlet pattern.

    121 GitHub stars~2.1k tokensUpdated 28 days ago
    Auto-check passed
  • Create Skill

    bitovi/ai-enablement-prompts

    A skill your agent uses when the user asks to "create a skill", "add a skill", "make a new skill", "build a skill", or wants to automate a repeated workflow into a reusable prompt.

    121 GitHub stars~1.6k tokensUpdated 28 days ago
    Auto-check passed
  • Create Skill

    bitovi/ai-enablement-prompts

    Create new Agent Skills for this project. An agent skill from bitovi/ai-enablement-prompts.

    121 GitHub stars~1.7k tokensUpdated 28 days ago
    Auto-check passed

Works with

Questions about Pixel Perfect

What does Pixel Perfect do?

Orchestrate a complete visual QA workflow to make a dev/Storybook page match a baseline URL pixel-for-pixel. Pixel Perfect is an agent skill from bitovi/ai-enablement-prompts. Orchestrate a complete visual QA workflow to make a dev/Storybook page match a baseline URL pixel-for-pixel.

When should I use Pixel Perfect?

Pixel Perfect fits situations like: replicating a production page; matching a design reference; achieving pixel perfection on a component.

How do I install Pixel Perfect in Claude Code?

Run `npx skills add bitovi/ai-enablement-prompts --skill pixel-perfect -a claude-code`. Or copy the skill folder (plugins/playwright/skills/pixel-perfect in bitovi/ai-enablement-prompts) into .claude/skills/pixel-perfect in your project. Claude Code loads it when a task matches its description.

How do I install Pixel Perfect in Codex?

Run `npx skills add bitovi/ai-enablement-prompts --skill pixel-perfect -a codex`. Or copy the skill folder (plugins/playwright/skills/pixel-perfect in bitovi/ai-enablement-prompts) into .agents/skills/pixel-perfect in your project. Codex loads it when a task matches its description.

Can I use Pixel Perfect 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 bitovi/ai-enablement-prompts --skill pixel-perfect -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pixel-perfect, .gemini/skills/pixel-perfect, .github/skills/pixel-perfect and .opencode/skills/pixel-perfect in your project.

What does Pixel Perfect need to run?

Going by SKILL.md and its folder, Pixel Perfect needs the command-line tools its instructions call (node).

Does Pixel Perfect 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 Pixel Perfect safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pixel Perfect use?

Pixel Perfect is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pixel Perfect use?

About 2.6k tokens (SKILL.md is roughly 11k 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 Pixel Perfect?

Skills that share tags, products or a category with Pixel Perfect: MiniMax M3 Multimodal Input (madebyaris/advance-minimax-m3-cursor-rules, 126 stars), Figma To Static (LeoYeAI/openclaw-master-skills, 2.2k stars), Figma Design Handoff (yonatangross/orchestkit, 290 stars) and Design To Code (yonatangross/orchestkit, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pixel Perfect?

bitovi (a GitHub organization) maintains it in bitovi/ai-enablement-prompts, which has 121 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on September 11, 2026.

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