agentleFS
pmatospmatos/skills/extract-design-system/SKILL.md

extract-design-system

Skill2 starsChanged 4 months agoMITView on GitHub

Extract the design system (fonts, logos, colors, CSS tokens, favicons, OG assets) from a public website URL into a fresh local git repo with a fact-only README. Use when the user wants to "extract a design system", "steal a design", "pull fonts and colors from a site", "scrape design tokens", "build a design-system repo from a URL", or prepare assets to upload to claude.ai/design.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use tailwind-design-system, find-animation-opportunities and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xfstudioSkill

    tailwind-design-system

    Build scalable design systems with Tailwind CSS, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.

    Also in 3 projects that use this

  • wxyhgkSkill

    find-animation-opportunities

    Search a codebase or UI for places that don't animate but should, and reject everything that shouldn't. Read-only; it proposes motion with exact values, it does not implement it. Use when the user asks "what could be animated here?" or wants to "make this feel more alive". For fixing existing animations, use improve-animations or review-animations instead.

    Also in 4 projects that use this

  • wxyhgkSkill

    improve-animations

    Survey a codebase's animation and motion code as a senior motion advisor, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper models) to execute. Read-only on source code — it plans improvements, it does not apply them. Use when the user asks to "improve the animations", "audit the motion", "make this app feel better", or wants a roadmap of animation fixes rather than a review of a single diff.

    Also in 4 projects that use this

  • attentiondotnetSkill

    animation-vocabulary

    Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

    Also in 4 projects that use this

  • cal1888Skill

    pick-ui-library

    Pick the right library for a given frontend task from a curated, opinionated list — numbers, OTP inputs, charts, command menus, virtualization, drag and drop, toasts, state, styling, and more. Only runs when explicitly invoked; it does not trigger on its own.

    Also in 3 projects that use this

  • arkanSkill

    review-animations

    Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write a machine-readable manifest.json and a fact-only README.md.

    line 44
  2. Very specific:

    If the summary shows near-zero CSS/fonts/SVGs, the site is likely a JS SPA.

    line 50
  3. Distinctive:

    Only record facts present in the page or its linked resources.

    line 94
  4. Very specific:

    If a field is missing (no og:image, no theme color, no @font-face), leave it out of the README — do not invent.

    line 95

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Extract Design System

Turn a public URL into a local git repo full of that site's real design assets and tokens. Only capture what is actually in the page and its linked resources — never invent colors, fonts, or brand facts from visual inspection.

Inputs to collect

  1. URL — the page to extract from. Require a full https://....
  2. Parent directory — where to create the repo. Default: ~/design-systems/. Ask; do not assume.
  3. Repo name — derive from the host (e.g. example.com → example-com). Offer the default, let the user override.

Confirm all three before running anything.

Workflow

Step 1 — Try WebFetch for a first look

Use WebFetch on the URL and ask it to return: page title, meta description, and any mentions of brand or site name. This is cheap and gives you enough to confirm the target is what the user expects. If WebFetch is blocked, skip to Step 2 without retrying.

Step 2 — Run the extractor

mkdir -p "<parent>/<repo-name>"
uv run "${CLAUDE_PLUGIN_ROOT}/extract-design-system/scripts/extract.py" \
  "<url>" --output "<parent>/<repo-name>"

${CLAUDE_PLUGIN_ROOT} is set by Claude Code to the plugin's install directory. If it is unset (skill loaded outside a plugin), fall back to the path shown in the skill's own directory — e.g. resolve the script relative to this SKILL.md.

The script uses requests + beautifulsoup4 + tinycss2 to:

  • Fetch the HTML and every linked stylesheet (following @import one level).
  • Parse @font-face rules and download each font file into fonts/.
  • Extract :root / html CSS custom properties into tokens/variables.css.
  • Download favicons, Apple touch icons, and web-manifest icons into images/favicons/.
  • Save inline <svg> blocks (likely logos) into logos/.
  • Download the Open Graph image into images/.
  • Snapshot the raw HTML into source/page.html.
  • Write a machine-readable manifest.json and a fact-only README.md.

On success it prints a JSON summary (fonts, stylesheets, favicons, inline SVGs, custom-property counts).

Step 3 — Fallback chain if the page is JS-rendered

If the summary shows near-zero CSS/fonts/SVGs, the site is likely a JS SPA. Render it with a real browser and re-run with --html:

3a. Playwright CLI (preferred fallback):

playwright install chromium  # only if not yet installed
cat > /tmp/render.js <<'EOF'
const { chromium } = require('playwright');
(async () => {
  const b = await chromium.launch();
  const p = await b.newPage({ userAgent:
    'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Chrome/126.0 Safari/537.36' });
  await p.goto(process.argv[2], { waitUntil: 'networkidle', timeout: 60000 });
  process.stdout.write(await p.content());
  await b.close();
})();
EOF
node /tmp/render.js "<url>" > /tmp/rendered.html

3b. MCP Playwright tools (if Node/Playwright CLI fails): use mcp__plugin_playwright_playwright__browser_navigate, then mcp__plugin_playwright_playwright__browser_evaluate with () => document.documentElement.outerHTML to capture HTML. Write it to /tmp/rendered.html.

3c. claude-in-chrome (last resort): load the tool with ToolSearch select:mcp__claude-in-chrome__navigate,mcp__claude-in-chrome__get_page_text, navigate, then use javascript_tool to read document.documentElement.outerHTML.

Then re-run the extractor with the rendered HTML:

uv run "${CLAUDE_PLUGIN_ROOT}/extract-design-system/scripts/extract.py" \
  "<url>" --output "<parent>/<repo-name>" --html /tmp/rendered.html

Step 4 — Initialize git and commit

cd "<parent>/<repo-name>"
git init -q
git add -A
git commit -q -m "Initial extraction from <url>"

Report the repo path, a one-line summary of what was captured, and any obvious gaps (e.g. zero fonts — probably means a JS-rendered site; rerun with Step 3).

Ground rules

  • Only record facts present in the page or its linked resources. Never guess colors from visual inspection.
  • If a field is missing (no og:image, no theme color, no @font-face), leave it out of the README — do not invent.
  • Respect robots.txt and Terms of Service. If the user asks to extract from a site that disallows scraping, surface this and wait for confirmation.
  • The script is idempotent: re-running into the same directory overwrites manifest.json and README.md and re-downloads assets.

Output layout

<repo-name>/
├── README.md           # fact-only summary
├── manifest.json       # structured extraction record
├── fonts/              # downloaded font files
├── logos/              # inline SVGs (candidate logos)
├── images/             # og:image and other page images
│   └── favicons/       # favicons + apple-touch + web-manifest icons
├── css/                # downloaded stylesheets
├── tokens/
│   ├── variables.css   # extracted :root custom properties
│   └── fonts.css       # rewritten @font-face rules pointing to local files
└── source/
    ├── page.html       # raw/rendered HTML snapshot
    └── manifest.webmanifest  # if the site exposes one

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.