mcpField
B
brandmd

brandmd

github.com/yuvrajangadsinghDesign & UI7038 installsUpdated 3w ago
Repository

About brandmd

brandmd is a command-line tool that extracts a website’s design system into a DESIGN.md file for AI coding agents. It captures visual styles and design tokens from accessible pages, with optional outputs for dark themes, visual identity, CSS, Tailwind, HTML, and JSON.

Key features

  1. 01Extracts colors, typography, and layout
  2. 02Describes component styling
  3. 03Exports DESIGN.md or CSS formats
  4. 04Optional dark theme extraction
  5. 05Optional visual identity analysis

Use cases

  1. 01Match an existing site’s visual style
  2. 02Reuse design tokens in a new project
  3. 03Standardize AI-generated interface components

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/yuvrajangadsingh/brandmd --skill brandmd

After installing, type/brandmdin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

LICENSE
.gitignore
SECURITY.md
.npmignore
CHANGELOG.md
README.md
.github/
FUNDING.yml
.github/workflows/
ci.yml
release.yml
bin/
brandmd.js
docs/
cover-cognition.html
anthropic.html
devto-cognition-teardown.md
linear.html
index.html
mintlify.html
stripe.html
vercel.html
examples/
README.md
airbnb.md
anthropic.md
claude.md
atlassian.md
apple.md
cursor.md
clerk.md
diff-stripe-vs-vercel.md
framer.md
linear-tailwind.css
linear.md

Details

From the project README

brandmd

You extract a website's design system into a DESIGN.md file that AI coding agents use for on-brand UI generation.

When to use

  • User says "match this website's design" or "use the same style as [url]"
  • Starting a new frontend project and the user has an existing site
  • User wants design consistency across AI-generated components
  • User asks to "extract design tokens" or "get the design system" from a URL

How to run

npx brandmd <url> -o DESIGN.md

Pass the most design-rich page (usually the homepage) for best results. The tool extracts from the visible viewport and lazy-loaded content on that single page.

What it extracts

The output follows Google Stitch's DESIGN.md format. Sections 1-5 are always present; 6-7 are conditional on flags.

  1. Visual Theme & Atmosphere - mood, shape language, depth
  2. Color Palette & Roles - colors with semantic roles (background, text, accent, border)
  3. Typography Rules - Primary font (role-aware: display > heading > body, skipping mono/fallback/icon fonts), per-role font breakdown (Headings, Display, Body, Buttons), all detected fonts with frequencies, size scale, weights, line heights, letter spacing
  4. Component Stylings - buttons, cards, inputs with radii, colors, shadows
  5. Layout Principles - spacing scale, base grid unit, border radii
  6. Dark Theme Overrides (with --dark) - palette + atmosphere for dark mode
  7. Visual Identity Beyond CSS (with --vision) - illustration style, photography mood, copywriting voice, microcopy patterns. Requires GEMINI_API_KEY (free tier: aistudio.google.com/apikey).

After extraction

  1. Read the generated DESIGN.md to confirm it looks right
  2. Summarize the key tokens for the user (primary colors, fonts, spacing scale)
  3. Use these tokens in all subsequent UI code generation
  4. Reference specific hex codes, font names, and spacing values from DESIGN.md when writing CSS/Tailwind/styled-components

Options

  • npx brandmd <url> - DESIGN.md to stdout
  • npx brandmd <url> -o DESIGN.md - DESIGN.md to file
  • npx brandmd <url> --dark - also extract dark-mode palette (Section 6)
  • npx brandmd <url> --vision - also extract illustration / photography / voice / microcopy via Gemini (Section 7). Needs GEMINI_API_KEY env var.
  • npx brandmd <url> --css - CSS custom properties output instead of DESIGN.md
  • npx brandmd <url> --tailwind - Tailwind v4 @theme block instead of DESIGN.md
  • npx brandmd <url> --html - HTML brand guide (visual, shareable)
  • npx brandmd <url> --json - raw tokens as JSON (programmatic use)
  • Multiple URLs merge tokens: npx brandmd <url1> <url2> <url3>

Limitations

  • Extracts from a single page, not the entire site (multi-URL merges token frequencies but the vision screenshot is the first page only)
  • Can't read Figma tokens or design tool files
  • Color role assignment is heuristic (based on usage frequency and luminance)
  • Requires a publicly accessible URL (no auth-gated pages)
  • Cloudflare-protected sites: brandmd waits up to 20s for the JS challenge to auto-resolve (--cf-wait-ms to tune). If the challenge persists, you get a clear error rather than garbage tokens. Hard-blocked sites (openai.com, perplexity.ai, discord.com, etc.) are correctly flagged as bot-protected and not bypassed.

Comments

Markdown supported