brandmd
Skill66 starsChanged 4 months agoMITView on GitHub
Extract a website's design system into a DESIGN.md file. Use when starting a new frontend project, rebuilding a site, or when the user wants AI-generated UI to match an existing brand.
- Reads credentials
In this repositoryOne other file it gives its agents.
- ClaudeCLAUDE.md
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Read the generated DESIGN.md to confirm it looks right
- Distinctive: line 45
Use these tokens in all subsequent UI code generation
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.mdPass 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.
- Visual Theme & Atmosphere - mood, shape language, depth
- Color Palette & Roles - colors with semantic roles (background, text, accent, border)
- 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
- Component Stylings - buttons, cards, inputs with radii, colors, shadows
- Layout Principles - spacing scale, base grid unit, border radii
- Dark Theme Overrides (with
--dark) - palette + atmosphere for dark mode - Visual Identity Beyond CSS (with
--vision) - illustration style, photography mood, copywriting voice, microcopy patterns. RequiresGEMINI_API_KEY(free tier: aistudio.google.com/apikey).
After extraction
- Read the generated DESIGN.md to confirm it looks right
- Summarize the key tokens for the user (primary colors, fonts, spacing scale)
- Use these tokens in all subsequent UI code generation
- 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 stdoutnpx brandmd <url> -o DESIGN.md- DESIGN.md to filenpx brandmd <url> --dark- also extract dark-mode palette (Section 6)npx brandmd <url> --vision- also extract illustration / photography / voice / microcopy via Gemini (Section 7). NeedsGEMINI_API_KEYenv var.npx brandmd <url> --css- CSS custom properties output instead of DESIGN.mdnpx brandmd <url> --tailwind- Tailwind v4@themeblock instead of DESIGN.mdnpx 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-msto 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.
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
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.

