pattern-detection

Compute nine visual signals from design tokens and screenshots.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/imehr/design-extractor --skill pattern-detection-imehr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pattern-detection
Source: https://github.com/imehr/design-extractor/tree/main/skills/pattern-detection
Command: npx skills add https://github.com/imehr/design-extractor --skill pattern-detection-imehr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, and includes references (resource) components.

What problem does it solve?

Extracts measurable visual signals from design tokens and screenshots so subjective descriptions of a brand's "feel" become objective, comparable metrics that drive replica refinement and design-system corrections.

Core Features & Use Cases

  • Nine Mechanical Signals: Computes spacing rhythm, type scale ratio, component density, alignment grid, CTA placement, border-radius language, shadow elevation, motion language, and colour temperature with confidence scores.
  • Evidence-led Interpretation: Produces machine-readable patterns.json and a human summary, always tying qualitative claims to numeric measurements and sample evidence.
  • Integration Scenarios: Diagnose replica drift against a source site, compare brand personalities across sites, or feed objective metrics into an automated refinement loop.

Quick Start

Run the pattern-detection skill against the brand's extracted tokens and optional desktop screenshot to produce patterns.json in the brand cache.

Frequently Asked Questions about pattern-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I quantify visual rhythm and spacing from design tokens?

Quantify visual rhythm by applying pattern detection to parsed design tokens and screenshots. This computes nine measurable signals for spacing, typography, density, and colour, turning subjective design feel into objective metrics.

What measurable signals can I extract from typography and color tokens?

Extracting signals from typography and color tokens yields nine metrics: spacing rhythm, type scale ratio, component density, grid alignment, CTA placement, border-radius language, shadow elevation, motion language, and colour temperature.

How do I diagnose design system drift using extracted patterns?

Diagnose design system drift by running pattern detection to compare computed mechanical signals against source tokens. This reveals misalignments in spacing and typography, producing a machine-readable patterns.json for automated refinement loops.

Does pattern detection require screenshots to analyze design tokens?

Pattern detection does not strictly require screenshots to analyze design tokens, but an optional desktop PNG can be processed. When screenshots are used, an image processor like Pillow is required to compute visual signals.

What file format do I need for parsing borders, shadows, and transitions?

Parsing borders, shadows, and transitions requires a tokens-output.json file. This parsed JSON format must contain specific design tokens including spacing, typography, borders, shadows, transitions, and colours to successfully compute visual patterns.

Can I use Pillow to compute component density and grid alignment?

You can use Pillow to process optional desktop PNG screenshots to compute component density and grid alignment. The visual signals are then output into a machine-readable patterns.json file alongside a human summary with confidence scores.