aio-visual-diff

aio-visual-diff is a skill for Claude Code, Codex from aiocean/claude-plugins. It costs 116 tokens per session (2,924 once invoked), scanned A, original, MIT.

A measurement-based way to compare a frontend interface with Figma data or a saved baseline using values taken from the browser.

In plain words
What is it for?
It is for verifying AI-generated frontend pages, finding precise layout and styling differences, and turning those differences into code corrections.
Why use it?
It reveals differences in actual CSS values and element positions, including cases where class names appear correct but produce the wrong result.

Skill for Claude CodeCodex

Part of the aio-visual-diff plugin — 1 skill shipped together

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 skills/aiocean/claude-plugins/aio-visual-diff
Any agent
npx skills add aiocean/claude-plugins --skill aio-visual-diff
Clone the repo
git clone --depth 1 https://github.com/aiocean/claude-plugins

Made for: Claude Code, Codex.

Or install aio-visual-diff, the plugin that ships this one along with the rest of its 1 skill.

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 aio-visual-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-visual-diff.svg)](https://agentmods.dev/skills/aiocean/claude-plugins/aio-visual-diff)
Your own site
<a href="https://agentmods.dev/skills/aiocean/claude-plugins/aio-visual-diff"><img src="https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-visual-diff.svg" alt="Measured on agentmods" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,924 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.00116 $0.02924
Opus 5 $0.00058 $0.01462
Sonnet 5 $0.00023 $0.00585
Haiku 4.5 $0.00012 $0.00292

Measured yesterday against content hash 4f1407822ccb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

aio-visual-diff 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.

plugins/aio-visual-diff/skills/aio-visual-diff/SKILL.md · 232 lines

How it starts

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

Visual Diff — Measurement Driven, Not Eyeballed

"Heading font size is 28px, spec says 24px, change Heading size from 7 to 6." Specific, numerical, unambiguous. That is feedback the agent can act on.

This skill drives a measurement loop: navigate the dev server, extract computed CSS and bounding-box numbers via chrome-devtools MCP, diff against a Figma node (Figma fidelity mode) or a frozen baseline JSON (baseline regression mode), then convert every delta into a concrete "change X to Y in file Z" correction. The loop repeats until all deltas fall within threshold — no screenshot eyeballing at any step.

LLM (kể cả multimodal) yếu spatial pixel reasoning — đưa nó 2 screenshot rồi hỏi "giống không?" sẽ trả lời chủ quan và thường sai. Skill này thay bằng vòng lặp đo số → diff số → fix theo delta.


Required Setup

  • chrome-devtools MCP (bắt buộc) — extract measurements từ DOM thật. Tools dùng: navigate_page, evaluate_script.
  • figma MCP (optional) — Figma fidelity mode. Tool dùng: get_design_context. Không có → tự động fall sang baseline regression mode.

Cả hai đều phải có dev server đang chạy ở URL truyền vào.


Two Modes

Mode Khi dùng Reference source
Figma fidelity Có Figma file làm spec figma__get_design_context → node layout numeric
Baseline regression Không có Figma, chỉ chống drift .aio-visual-diff/<selector-hash>.json lần đo đầu tiên

Workflow

Step 1 — Identify target

Hỏi user chỉ những gì còn thiếu:

  • Dev URL (vd http://localhost:3000)
  • Selector của component cần verify (xem Selector Strategy bên dưới)
  • Figma node URL (optional) — không có → chạy baseline mode

Step 2 — Render & extract numbers

chrome-devtools__navigate_page → <dev-url>
chrome-devtools__evaluate_script → measurement function (paste-as-string)

Measurement function template — replace SELECTOR_HERE, paste nguyên cả block làm function arg cho evaluate_script:

Read the full file on GitHub · 232 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 · 232 lines · 116 tokens per session scan A 4f1407822ccb

Subscribe to this mod's changes

aio-visual-diff is a skill published in the GitHub repository aiocean/claude-plugins (4 stars, last pushed 2d ago), licensed MIT. It adds 116 tokens to every session and 2,924 once invoked, about $0.0006 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-09-03.

Related

Other skills, from other repositories

landing-page-generator

Generate complete, deploy-ready landing pages from any repository. Use when creating a homepage for an open-source project, building a project website, converting a README into a marketing page, or standardizing landing pages across multiple repos.

FlorianBruniaux/claude-code-ultimate-guide · 48 tokens

product-ui

Use this skill when UI design and UI implementation should happen together. It turns product context into usable frontend screens, components, layout decisions, design-system choices, accessibility rules, and visual polish.

Orkas-AI/Orkas · 2 tokens

ui-web

Web UI - glassmorphism, Tailwind, dark mode, accessibility.

alinaqi/maggy · 17 tokens

panel-app-react-vite-creator

Create or update an engineering-style NextClaw Panel component with pnpm, Vite, React, TypeScript, and Tailwind CSS, then build it into a static .panel directory inside a schema v2 package or an explicitly loose workspace Panel. Use for modern, reusable, complex, Agent-powered, typed Panel interfaces.

Peiiii/nextclaw · 73 tokens

eval-agents

Audit Claude Code agents defined in .claude/agents/ for description specificity, model tier appropriateness, tools scoping, and system prompt quality. Detects dispatch ambiguity between agents, flags over-permissive tool grants, and checks for human-in-the-loop patterns that break programmatic orchestration. Use when…

FlorianBruniaux/claude-code-ultimate-guide · 93 tokens

land-and-deploy

Merge PR, wait for CI, verify deploy, run canary. The complete landing pipeline.

FlorianBruniaux/claude-code-ultimate-guide · 24 tokens