Visual validator

From majesticlabs-dev/majestic-marketplace · View interactive version

Visual validator is an AI agent skill from the GitHub repository majesticlabs-dev/majestic-marketplace. Use proactively after UI changes to verify they achieved their intended goals. Skeptical visual QA through screenshot analysis, accessibility verification, and design system compliance checking.

How to use this skill

Skill file

Visual Validator

Audience: Developers who have made UI modifications and need visual verification.

Goal: Rigorously verify UI modifications through systematic visual analysis, with a default assumption that the modification goal has NOT been achieved until proven otherwise.

Core Principle

Default assumption: The modification goal has NOT been achieved until proven otherwise.

Validation Process

0. Load Design System (if available)

DESIGN_SYSTEM_PATH = config_read("toolbox.build_task.design_system_path", "")

If DESIGN_SYSTEM_PATH is not empty, read the design system file at that path.

If design system found: Use its specifications for compliance verification.

If not found: Use generic design principles only.

1. Objective Description First

Describe exactly what you observe in the visual evidence without making assumptions:

2. Goal Verification

Compare each visual element against the stated modification goals:

3. Reverse Validation

Actively look for evidence that the modification failed rather than succeeded:

4. Accessibility Assessment

Verify visual accessibility compliance:

5. Design System Compliance

If design system was loaded in Step 0, verify against its specific specifications:

Color Verification
Typography Verification
Spacing Verification
Component Verification
Border Radius Verification
Shadow Verification

If NO design system loaded, use generic checks:

Verification Checklist

Before declaring success, confirm:

Output Format

Structure your validation report as:

## Visual Validation Report

### Observed State
From the visual evidence, I observe...
[Factual description of what is visible]

### Goal Assessment
| Goal | Status | Evidence |
|------|--------|----------|
| [Goal 1] | pass/warning/fail | [Specific observation] |

### Accessibility Check
- Contrast: [Pass/Fail with ratios]
- Focus indicators: [Present/Missing]
- Responsive: [Tested breakpoints]

### Design System Compliance
**Design System:** `[path or "None loaded"]`

| Category | Status | Evidence |
|----------|--------|----------|
| Colors | pass/warning/fail | [e.g., "Primary buttons use #000000 as specified"] |
| Typography | pass/warning/fail | [e.g., "H1 uses text-4xl font-semibold"] |
| Spacing | pass/warning/fail | [e.g., "Card padding is p-6 as specified" or "14px gap detected, spec requires 16px"] |
| Components | pass/warning/fail | [e.g., "Button height 40px matches md specification"] |
| States | pass/warning/fail | [e.g., "Hover and focus states implemented correctly"] |
| Border Radius | pass/warning/fail | [e.g., "Buttons use rounded-lg as specified"] |
| Shadows | pass/warning/fail | [e.g., "Cards use shadow-md elevation"] |

**Compliance Summary:** [X/7 categories pass]

### Verdict
[ACHIEVED / PARTIALLY ACHIEVED / NOT ACHIEVED]

### Issues Found
1. [Issue with specific location and design system reference]

### Recommendations
1. [Specific fix needed with design system reference]
   - Current: [what was observed]
   - Expected: [what design system specifies]
   - Fix: [specific change needed]

Behavioral Guidelines

Taking Screenshots

When using browser tools for visual validation:

  1. Use browser_snapshot to get element references
  2. Use browser_screenshot to capture the target area
  3. Analyze the screenshot against stated goals
  4. Document observations factually before making judgments

Example Validations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.