Agent skill
design-compare
Use when comparing a frontend implementation against a reference design (Figma, mockup, screenshot). Performs pixel-level and structural analysis to identify discrepancies.
Install this agent skill to your Project
npx add-skill https://github.com/manashmandal/claude-skills/tree/main/skills/design-compare
SKILL.md
Design Compare
Overview
Compare your frontend implementation against a reference design to identify visual discrepancies, spacing inconsistencies, and structural mismatches.
Core principle: Every pixel matters. Systematic comparison reveals what eyeballing misses.
When to Use
Use this skill when:
- Implementing a design from Figma/Sketch/mockup
- Checking if implementation matches design spec
- Debugging visual differences between design and code
- QA review before handoff
- User says "compare this to the design" or "check against mockup"
Required Inputs
- Reference design - Screenshot, Figma export, or mockup image
- Implementation - Screenshot of current frontend OR URL to capture
Announce: "I'll compare your implementation against the reference design using design-compare."
Comparison Process
Phase 1: Capture and Prepare
-
Obtain reference design
- User provides screenshot/image path
- Read the image using Read tool
- Note dimensions, viewport size
-
Capture implementation
- User provides screenshot OR
- Request user to capture current state
- Match viewport/dimensions to reference
Phase 2: Structural Analysis
Compare these elements systematically:
| Element | Check For |
|---|---|
| Layout | Grid alignment, container widths, flex/grid structure |
| Spacing | Margins, padding, gaps between elements |
| Typography | Font family, size, weight, line-height, letter-spacing |
| Colors | Background, text, borders, shadows |
| Components | Button styles, inputs, cards, icons |
| Hierarchy | Visual weight, heading levels, emphasis |
| Responsive | Breakpoint behavior if applicable |
Phase 3: Generate Comparison Report
Output format:
## Design Comparison Report
### Match Score: [X/10]
### Critical Discrepancies (Must Fix)
- [ ] Issue description | Location | Reference vs Implementation
### Minor Discrepancies (Should Fix)
- [ ] Issue description | Location | Reference vs Implementation
### Acceptable Variations
- Variation description | Reason acceptable
### Pixel-Perfect Elements
- Element that matches exactly
Evaluation Criteria
Spacing (Weight: High)
- Measure in pixels or design tokens
- Flag differences > 4px
- Check consistency across similar elements
Typography (Weight: High)
- Font family must match exactly
- Size tolerance: ±1px
- Weight must match (400 vs 500 matters)
- Line-height tolerance: ±2px
Colors (Weight: Medium)
- Hex values within #02 tolerance per channel
- Check in multiple states (hover, active, focus)
- Gradient direction and stops
Layout (Weight: Critical)
- Container widths must match
- Alignment (left/center/right)
- Element ordering
- White space distribution
Visual Polish (Weight: Medium)
- Border radius consistency
- Shadow values
- Icon sizing and alignment
- Image aspect ratios
Common Discrepancies
| Issue | Impact | Typical Cause |
|---|---|---|
| Inconsistent spacing | High | Missing design tokens |
| Wrong font weight | Medium | Default browser styles |
| Color off by shade | Low | Color space conversion |
| Different line-height | High | Framework defaults |
| Misaligned icons | Medium | Baseline alignment issues |
| Border radius mismatch | Low | Hardcoded values |
Output Actions
After comparison, offer:
- Generate CSS fixes - Output corrected values
- Create issue list - Checklist format for tickets
- Deep dive - Analyze specific element in detail
Red Flags
Stop and clarify if:
- Reference image is low resolution
- Implementation uses different viewport size
- Design has responsive variants not provided
- Component states differ (hover vs default)
Integration
Related skills:
design-audit- For identifying issues without referencedesign-report- For comprehensive expert analysis
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
design-audit
Use when reviewing frontend design quality without a reference. Identifies UX issues, accessibility problems, and visual inconsistencies with actionable fix suggestions.
design-report
Use when conducting comprehensive design review before launch, for stakeholder presentation, or when user requests expert-level design analysis. Produces detailed report from senior Apple product designer perspective.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Didn't find tool you were looking for?