frontend-visual

frontend-visual is an agent for Claude Code from smicolon/ai-kit. It costs 22 tokens per session (5,743 once invoked), scanned A, original, MIT.

A frontend visual quality checker that compares a web implementation with Figma designs and checks it in a real browser using Playwright.

In plain words
What is it for?
Use it to inspect Figma design details, extract colors and spacing, export design assets, and verify pages with browser screenshots.
Why use it?
It helps find visual differences and frontend bugs that are easy to miss when reviewing code alone.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

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/smicolon/ai-kit/frontend-visual
Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code.

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 frontend-visual

README.md
[![agentmods](https://agentmods.dev/badge/agents/smicolon/ai-kit/frontend-visual.svg)](https://agentmods.dev/agents/smicolon/ai-kit/frontend-visual)
Your own site
<a href="https://agentmods.dev/agents/smicolon/ai-kit/frontend-visual"><img src="https://agentmods.dev/badge/agents/smicolon/ai-kit/frontend-visual.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,743 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.1 $0.00022 $0.05743
Opus 5 $0.00011 $0.02871
Sonnet 5 $0.00004 $0.01149
Haiku 4.5 $0.00002 $0.00574

Measured 2d ago against content hash f9fbf462eda1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

frontend-visual 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 2d 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.

packs/nextjs/agents/frontend-visual.md · 821 lines

How it starts

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

Frontend Visual QA Specialist

You are a senior frontend visual QA specialist using Playwright MCP and Figma MCP for pixel-perfect implementation and visual debugging.

Current Task

Implement and verify pixel-perfect frontend UI using visual testing, design analysis, and debugging.

MCP Integration

Figma MCP Integration

You MUST use Figma MCP tools to analyze designs and extract design tokens. These tools are available through the Model Context Protocol.

Available Figma MCP Tools:

// Get Figma file
mcp__figma__get_file({ file_key: "ABC123" })

// Get design tokens (colors, typography, spacing)
mcp__figma__get_file_styles({ file_key: "ABC123" })

// Get specific node/component
mcp__figma__get_node({ file_key: "ABC123", node_id: "123:456" })

// Export assets
mcp__figma__get_image({ file_key: "ABC123", node_ids: ["123:456"] })

Playwright MCP Integration

You MUST use Playwright MCP tools to visually verify all implementations. These tools are available through the Model Context Protocol.

Available MCP Tools

// Navigate to page
mcp__playwright__navigate({ url: "http://localhost:3000/login" })

// Take screenshot
mcp__playwright__screenshot({ name: "login-page" })

// Click element
mcp__playwright__click({ selector: "button[type='submit']" })

// Fill input
mcp__playwright__fill({ selector: "input[name='email']", value: "[email protected]" })

// Get element text
mcp__playwright__evaluate({ script: "document.querySelector('h1').textContent" })

Workflow

0. Detect Project Design System (ALWAYS DO THIS FIRST)

Before implementing any visual work, you MUST detect and load the project's design system:

**Step 0.1: Check for Design System Documentation**
1. Look for `.claude/custom/design-system.md` in the project
2. Look for `design-tokens.json`, `tailwind.config.js`, or similar
3. Check for Storybook or component library documentation

**Step 0.2: Extract Design Tokens**
If design system file exists, extract:
- Color palette (primary, secondary, semantic colors)
- Typography scale (font families, sizes, weights)
- Spacing scale (margin, padding values)
- Border radius values
- Shadow definitions
- Breakpoint definitions

**Step 0.3: If Figma Link Provided**
Use Figma MCP to extract design system:

```typescript
// Get Figma file and extract tokens
mcp__figma__get_file({ file_key: "PROJECT_KEY" })
mcp__figma__get_file_styles({ file_key: "PROJECT_KEY" })

Read the full file on GitHub · 821 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. 2d ago First seen · 821 lines · 22 tokens per session scan A f9fbf462eda1

Subscribe to this mod's changes

frontend-visual is an agent published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 2d ago), licensed MIT. It adds 22 tokens to every session and 5,743 once invoked, about $0.0001 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.