visual-verify
FreeNo executable scriptsNot checkedThis skill should be used when the user asks to 'verify visual output', 'check how it looks', 'render and review', 'visual verify', 'check the slide', 'does…
by edwinhu★ 28 GitHub starsAbout this skill
What this skill carries — grep references/ for any subject the names below miss:
!d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"
Announce: "I'm using visual-verify to set up a render-vision-fix loop."
NO VISUAL TASK IS COMPLETE WITHOUT RENDERING, SCORING, AND MEETING THE THRESHOLD.
Source code correctness does NOT imply visual correctness. You MUST render to PNG, score with vision (0-10) — Gemini CLI, or a subagent with Read if Gemini is unavailable — and iterate until score >= 9.5. Claiming "done" with a score below threshold delivers broken visuals to the user.
Skipping the score check is NOT HELPFUL — the user gets a visual artifact with defects you didn't verify.
Gemini CLI Vision
Gemini CLI is inherently agentic — it can read files, crop, zoom, and re-examine regions autonomously. No special flags needed for complex vs. simple images; it handles both automatically.
The Loop
0. PAGE MAP -> If Typst + Touying: Skill("teaching:find-slide-page")
| Returns heading → physical page mapping
| Skip if: single-page file, non-Typst, or page already known
|
1. CHANGE -> Modify source code (Task agent)
|
2. RENDER -> Produce PNG + PDF (see references/render-commands.md)
| Render fails? -> fix source, back to step 1
|
2.5 TEXT -> pdftotext pre-screen (Typst/PDF outputs with diagrams ONLY)
| Run: pdftotext -f <page> -l <page> -layout output.pdf -
| Check for defect #10 (adjacency violations)
| Any violations? -> fix source, back to step 1 (skip vision)
| Clean? -> proceed to step 3
| Skip if: non-PDF output, no diagrams on page
|
3. VISION -> Two-part check:
| a) INTENT — Does the render match the design intent?
| (Does the visual structure argue what it should?)
| b) DEFECTS — Scan for the 10 visual defect categories:
| 1. Text clipped by or overflowing its container
| 2. Text or shapes overlapping other elements
| 3. Arrows crossing through elements instead of routing around
| 4. Arrows landing on wrong element or pointing into empty space
| 5. Labels floating ambiguously (not anchored to what they describe)
| 6. Labels squeezed between adjacent elements without clearance
| 7. Uneven spacing (cramped sections next to spacious ones)
| 8. Text too small to read at rendered size
| 9. Parallel sub-diagrams with inconsistent layout
| 10. Edge labels fused with node text (pdftotext adjacency)
| Gemini CLI vision call with SCORING:
| → Score 0-10 against checklist items
| → Record in SCORES.md
|
4. DECIDE -> Score >= 9.5 AND exit criteria met? → DONE
Score < 9.5 OR defects remain? → extract fixes, back to step 1
Step 2.5: pdftotext Pre-Screen (Diagrams Only)
What it catches: Edge labels colliding with node text in Fletcher/CeTZ diagrams. When two text elements overlap or touch horizontally in the rendered PDF, pdftotext -layout fuses them into a single string without whitespace — e.g., Republic of1937 war bonds instead of Republic of 1937 war bonds.
When to run: Any page that contains a #fletcher-diagram or #cetz.canvas. Skip for pages with only body text, tables, or bullet points.
How to check:
- Extract the page:
pdftotext -f <page> -l <page> -layout output.pdf - - Collect all node labels and edge labels from the source code
- Scan the extracted text for any two labels appearing concatenated without whitespace
- A fused pair (node text running directly into edge label text) is a BLOCKING defect — return to step 1 without spending a vision call
Why this works: PDF text extraction preserves spatial positions. If elements have clear space between them, whitespace appears in the output. If they overlap or touch, words concatenate. This is cheap, deterministic, and catches the most common Fletcher layout failure that vision scoring misses.
Why this is NOT a replacement for vision: pdftotext only catches horizontal text collisions. It cannot detect labels sitting on top of arrow lines (vertical overlap), misaligned arrows, or spacing imbalance. Vision (step 3) is still required for a full pass.
When to Stop
The loop is done when ALL of these hold:
- Score >= 9.5
- The rendered output matches the design intent (not just defect-free but correct)
- No text is clipped, overlapping, or unreadable
- All arrows/lines connect to
Install visual-verify in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the visual-verify skill do?
This skill should be used when the user asks to 'verify visual output', 'check how it looks', 'render and review', 'visual verify', 'check the slide', 'does this look right', or when any task produces rendered visual output (slides, charts, documents, UI).
How do I install the visual-verify skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the visual-verify skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
by Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
by Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
by Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
by Anthropic