compare

compare is a skill for Claude Code from MadAppGang/magus. It costs 27 tokens per session (2,554 once invoked), scanned C, original, MIT.

Instructions for running a tool that compares a reference design with an implementation using pixel-level and semantic checks.

In plain words
What is it for?
Use it to compare screenshots or rendered pages, configure viewport sizes and tolerances, and produce image-based difference results.
Why use it?
It standardizes how to measure visual differences and classify their severity, which makes design comparisons more repeatable.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the designer plugin — 5 skills, 3 commands, 2 agents shipped together

Good fit Use it to compare screenshots or rendered pages, configure viewport sizes and…

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add MadAppGang/magus
Claude Code
/plugin install designer

Made for: Claude Code.

Or install designer, the plugin that ships this one along with the rest of its 5 skills, 3 commands, 2 agents.

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 compare

README.md
[![agentmods](https://agentmods.dev/badge/skills/madappgang/magus/compare.svg)](https://agentmods.dev/skills/madappgang/magus/compare)
Your own site
<a href="https://agentmods.dev/skills/madappgang/magus/compare"><img src="https://agentmods.dev/badge/skills/madappgang/magus/compare.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,554 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00027 $0.02554
Opus 5 $0.00014 $0.01277
Sonnet 5 $0.00005 $0.00511
Haiku 4.5 $0.00003 $0.00255

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

Security

Grade C, and why

compare scanned grade C with 1 finding 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 7d 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.

Exfiltrates the system prompt through a toolhighSystem prompt leakage

Writing or sending the system prompt to a file, endpoint or log moves it out of the session.

# Write prompt to file for auditability
plugins/designer/skills/compare/SKILL.md · 314 lines

How it starts

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

UI Comparison Skill

This skill documents how to use the designer plugin's comparison engine from any agent context. It covers:

  1. The compare.ts CLI invocation pattern
  2. The semantic comparison prompt template
  3. Severity thresholds reference
  4. Tips for reducing false positives

1. compare.ts CLI Invocation

The comparison script is located at ${CLAUDE_PLUGIN_ROOT}/scripts/compare.ts. It performs deterministic pixel-level comparison: normalization, optional masking, pixelmatch, and 3-panel diff image composition.

Basic Invocation

bun "${CLAUDE_PLUGIN_ROOT}/scripts/compare.ts" \
  --ref "${OUTPUT_DIR}/reference-raw.png" \
  --impl "${OUTPUT_DIR}/implementation-raw.png" \
  --output "${OUTPUT_DIR}" \
  --width 1440 \
  --height 900

Full Invocation with All Options

bun "${CLAUDE_PLUGIN_ROOT}/scripts/compare.ts" \
  --ref "${REFERENCE_IMAGE_PATH}" \
  --impl "${IMPLEMENTATION_IMAGE_PATH}" \
  --output "${OUTPUT_DIR}" \
  --width "${VIEWPORT_WIDTH:-1440}" \
  --height "${VIEWPORT_HEIGHT:-900}" \
  --threshold "${THRESHOLD:-0.1}" \
  --masks "${MASKS_JSON:-[]}"

CLI Arguments Reference

Argument Type Required Default Description
--ref path YES Absolute path to reference image
--impl path YES Absolute path to implementation image
--output path YES Output directory (created if not exists)
--width integer no 1440 Target viewport width in pixels
--height integer no 900 Target viewport height in pixels
--threshold float no 0.1 Per-pixel tolerance (0.0–1.0)
--masks JSON no [] Array of MaskRegion objects to exclude

Mask Region Format

Masks allow excluding dynamic regions (timestamps, ads, user avatars) from the diff.

[
  { "x": 0, "y": 0, "width": 200, "height": 40, "reason": "dynamic timestamp" },
  { "x": 1200, "y": 800, "width": 240, "height": 100, "reason": "user avatar" }
]

Read the full file on GitHub · 314 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. 7d ago First seen · 314 lines · 27 tokens per session scan C 30c4dc257f7d

Subscribe to this mod's changes

compare is a skill published in the GitHub repository MadAppGang/magus (9 stars, last pushed 2d ago), licensed MIT. It adds 27 tokens to every session and 2,554 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (exfiltrates the system prompt through a tool). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

accessibility

Consolidated accessibility skill entrypoint for WCAG 2.2, ARIA Authoring Practices, cognitive accessibility, Section 508, EN 301 549, design intent verification, and the Accessibility Planner workflow.

microsoft/hve-core · 47 tokens

make-resume

A Chinese-language tool for creating editable HTML resumes that can be changed in a browser and printed to PDF. It uses available resume templates when they are installed and otherwise provides a simpler fallback.

Hisn00w/ASu-skills · 86 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens