agentleFS
imMamdouhaboammarimMamdouhaboammar/Mimera/.agents/skills/design-dna-extraction/SKILL.md

design-dna-extraction

Skill1 starsChanged 33 days agoMITView on GitHub

Extracts design tokens, color harmony, typography hierarchy, vertical rhythm, and page decomposition hypotheses from multi-viewport reference evidence in Mimera. Formulates tokens into CSS custom properties and component boundary definitions without guessing.

The file

Files
SKILL.md

Design DNA Extraction Skill

This skill governs the extraction, synthesis, and codification of visual design tokens and structural component boundaries from captured multi-viewport DOM evidence.

Core Objectives

  1. Deterministic Token Synthesis:
    • Aggregate computed style evidence across captured viewports (Desktop 1440px, Tablet 768px, Mobile 390px).
    • Extract raw CSS color values and map them by frequency and semantic role (background, foreground, accent, border).
    • Determine baseline vertical rhythm and spacing scales using greatest common divisor (GCD) analysis of padding and margin values.
  2. Typography Hierarchy Modeling:
    • Detect primary and secondary font families (including self-hosted @font-face fonts).
    • Infer font size scales and line height ratios for structural roles:
      • heroTitle: 48px - 72px+
      • sectionTitle: 28px - 40px
      • cardTitle: 20px - 24px
      • body: 14px - 16px
      • caption / metadata: 11px - 13px
  3. Page Decomposition & Component Hypotheses:
    • Partition the page into distinct component boundaries:
      • Navigation / Header (navbar, header)
      • Hero Section (hero-banner, hero-visual)
      • Feature Matrix / Bento Grids
      • Interactive Showcases (Carousels, Video players, Tabs)
      • Testimonial / Proof sections
      • Footer / Legal navigation
    • Assign responsive behavior rules (e.g. stack-vertically, hide-on-mobile, wrap-grid).

CLI Execution

# Analyze captured evidence to generate Design DNA and page decomposition
bun mimera analyze

Generated Artifacts

Executing bun mimera analyze produces two cryptographic evidence payloads in SQLite:

  1. design-dna: Contains palette, typography, spacingScale, rhythmUnit, and responsiveRules.
  2. page-decomposition: Contains components array with bounding boxes, tag hierarchies, and assigned selectors.

Codification Pattern

Translate extracted Design DNA into clean CSS variables in your target stylesheet (e.g. src/styles/tokens.css):

:root {
  /* Extracted Palette */
  --bg-primary: #0a0a0c;
  --bg-surface: #141419;
  --text-primary: #ffffff;
  --text-muted: #8e8ea0;
  --accent-glow: #6366f1;

  /* Extracted Spacing Rhythm */
  --rhythm-unit: 8px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 64px;

  /* Typography */
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.