design-md-chrome-extractor
```markdown
What this skill does
```markdown
---
name: design-md-chrome-extractor
description: Chrome extension that extracts design tokens from any website and generates DESIGN.md or SKILL.md files for use with AI coding agents
triggers:
- extract design system from website
- generate DESIGN.md from site styles
- create design skill for AI agent
- extract colors and typography from webpage
- generate SKILL.md design file
- build design system documentation from URL
- capture website design tokens
- create TypeUI design blueprint
---
# TypeUI DESIGN.md Extractor (Chrome Extension)
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
A Chrome extension that reads visual styles from any live website — typography, colors, spacing, border radius, shadows, and motion — and generates structured `DESIGN.md` or `SKILL.md` files compatible with AI coding agents like Claude Code, Cursor, Codex, and Google Stitch.
---
## What It Does
- **Auto-extracts** computed CSS styles from any active browser tab
- **Generates `DESIGN.md`** — a human-readable design system documentation file
- **Generates `SKILL.md`** — an agent-ready skill file for AI coding assistants
- Follows the open-source [TypeUI DESIGN.md](https://www.typeui.sh/design-skills) format
- Outputs downloadable markdown files for immediate use in AI workflows
---
## Installation (Developer / Load Unpacked)
```bash
# 1. Clone the repository
git clone https://github.com/bergside/design-md-chrome.git
cd design-md-chrome
# 2. Open Chrome and navigate to extensions
# chrome://extensions
# 3. Enable Developer Mode (toggle top-right)
# 4. Click "Load unpacked" and select the project folder
```
After loading:
- The extension icon appears in your Chrome toolbar
- Navigate to any website
- Click the extension icon to open the popup
---
## Project Structure
```
design-md-chrome/
├── manifest.json # Chrome extension manifest (MV3)
├── popup.html # Extension popup UI
├── popup.js # Popup logic, UI interactions, file download
├── content.js # Content script — injected into active tab to extract styles
├── background.js # Service worker for Chrome extension messaging
├── generator.js # DESIGN.md / SKILL.md markdown generation logic
├── tests/
│ └── run-tests.mjs # Node.js test runner
└── README.md
```
---
## How Style Extraction Works
The content script (`content.js`) is injected into the active tab and uses `getComputedStyle` to sample elements across the DOM, collecting:
| Token Category | What Gets Extracted |
|---|---|
| Typography | Font families, sizes, weights, line heights, letter spacing |
| Colors | Background, text, border, and accent colors (deduped) |
| Spacing | Margin/padding values across key elements |
| Border Radius | Extracted from buttons, cards, inputs |
| Shadows | `box-shadow` values from elevated elements |
| Motion | `transition` and `animation` properties |
### Example: Content Script Extraction Pattern
```javascript
// content.js — core extraction logic pattern
function extractDesignTokens() {
const elements = document.querySelectorAll(
'h1, h2, h3, p, a, button, input, [class*="card"], [class*="container"]'
);
const tokens = {
typography: new Set(),
colors: new Set(),
spacing: new Set(),
borderRadius: new Set(),
shadows: new Set(),
motion: new Set(),
};
elements.forEach((el) => {
const styles = window.getComputedStyle(el);
// Typography
tokens.typography.add({
fontFamily: styles.fontFamily,
fontSize: styles.fontSize,
fontWeight: styles.fontWeight,
lineHeight: styles.lineHeight,
letterSpacing: styles.letterSpacing,
});
// Colors
tokens.colors.add(styles.color);
tokens.colors.add(styles.backgroundColor);
tokens.colors.add(styles.borderColor);
// Spacing
tokens.spacing.add(styles.padding);
tokens.spacing.add(styles.margin);
// Radius
tokens.borderRadius.add(styles.borderRadius);
// Shadows
if (styles.boxShadow !== 'none') {
tokens.shadows.add(styles.boxShadow);
}
// Motion
if (styles.transition !== 'all 0s ease 0s') {
tokens.motion.add(styles.transition);
}
});
return {
typography: [...tokens.typography],
colors: [...tokens.colors].filter(Boolean),
spacing: [...tokens.spacing].filter(Boolean),
borderRadius: [...tokens.borderRadius].filter(Boolean),
shadows: [...tokens.shadows],
motion: [...tokens.motion],
url: window.location.href,
title: document.title,
};
}
// Send extracted tokens back to popup via Chrome messaging
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
if (request.action === 'extractStyles') {
sendResponse(extractDesignTokens());
}
});
```
---
## Triggering Extraction from Popup
```javascript
// popup.js — trigger content script and receive tokens
async function runExtraction() {
const [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
// Inject content script if not already present
await chrome.scripting.executeScript({
target: { tabId: tab.id },
files: ['content.js'],
});
// Request extraction
chrome.tabs.sendMessage(tab.id, { action: 'extractStyles' }, (tokens) => {
if (chrome.runtime.lastError) {
console.error('Extraction failed:', chrome.runtime.lastError.message);
return;
}
displayTokens(tokens);
window.__extractedTokens = tokens; // store for generation
});
}
document.getElementById('btn-extract').addEventListener('click', runExtraction);
```
---
## Generating DESIGN.md
```javascript
// generator.js — generate DESIGN.md from extracted tokens
function generateDesignMd(tokens) {
const { url, title, typography, colors, spacing, borderRadius, shadows, motion } = tokens;
return `# DESIGN.md — ${title}
## Mission
Define a consistent, accessible design system for ${title} (${url}).
## Brand
- **Product**: ${title}
- **URL**: ${url}
- **Audience**: Web users
- **Surface**: Web application
## Style Foundations
### Typography
${typography.map(t => `- Font: ${t.fontFamily}, Size: ${t.fontSize}, Weight: ${t.fontWeight}`).join('\n')}
### Colors
${colors.slice(0, 20).map(c => `- \`${c}\``).join('\n')}
### Spacing
${[...new Set(spacing)].slice(0, 10).map(s => `- ${s}`).join('\n')}
### Border Radius
${[...new Set(borderRadius)].slice(0, 8).map(r => `- ${r}`).join('\n')}
### Shadows
${shadows.slice(0, 6).map(s => `- ${s}`).join('\n')}
### Motion
${motion.slice(0, 6).map(m => `- ${m}`).join('\n')}
## Accessibility
- Follow WCAG 2.2 AA standards
- Minimum contrast ratio: 4.5:1 for text, 3:1 for UI components
- All interactive elements must have visible focus states
- Support keyboard navigation throughout
## Writing Tone
- Implementation-ready and precise
- Avoid ambiguity in component descriptions
- Use design token references over raw values
## Rules: Do
- Use extracted color tokens consistently
- Apply spacing scale from extracted values
- Maintain border radius consistency per component type
- Use motion values for transitions
## Rules: Don't
- Do not introduce new colors outside the extracted palette
- Do not use arbitrary spacing values
- Do not remove focus indicators
- Do not use motion that violates prefers-reduced-motion
## Quality Gates
- [ ] All colors reference extracted tokens
- [ ] Typography scale applied consistently
- [ ] WCAG AA contrast validated
- [ ] Keyboard navigation verified
`;
}
```
---
## Generating SKILL.md
```javascript
// generator.js — generate agent-ready SKILL.md
function generateSkillMd(tokens) {
const { url, title } = tokens;
return `---
name: ${title.toLowerCase().replace(/\s+/g, '-')}-design-system
description: Design system skill extracted from ${title} (${url})
triggers:
- implement ${title} design
- use ${title} styles
- apply ${title} design system
- build UI matching ${title}
---
# ${title} Design System Skill
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.