Skip to content
Back to search

extract-design-system

Extract design tokens (colors, typography, spacing, border radius, shadows) from any public website. Generates JSON and CSS custom properties for local projects. Available as an AI agent skill (Claude, Cursor, Codex) and standalone CLI.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/arvindrk--extract-design-system/badge.svg)](/listings/arvindrk--extract-design-system)

HTML

<a href="/listings/arvindrk--extract-design-system"><img src="/api/listings/arvindrk--extract-design-system/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install the skill:

npx skills add arvindrk/extract-design-system

Run it from a supported coding agent with a public website:

Extract the design system from https://stripe.com and generate starter token files for this project.

Expected starter outputs:

- `.extract-design-system/raw.json` - `.extract-design-system/normalized.json` - `design-system/tokens.json` - `design-system/tokens.css`

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 241 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <a href="https://www.npmjs.com/package/extract-design-system">
  3. <img src="https://img.shields.io/npm/dw/extract-design-system?logo=npm&logoColor=white" alt="npm downloads" />
  4. </a>
  5. <a href="https://skills.sh/arvindrk/extract-design-system/extract-design-system">
  6. <img src="https://img.shields.io/badge/skills.sh-discovery-111111" alt="skills.sh" />
  7. </a>
  8. <a href="https://github.com/arvindrk/extract-design-system/actions/workflows/ci.yml">
  9. <img src="https://github.com/arvindrk/extract-design-system/actions/workflows/ci.yml/badge.svg" alt="ci" />
  10. </a>
  11. </p>
  12. # extract-design-system — Extract Design Tokens from Any Website
  13. Reverse-engineer design tokens (colors, typography, spacing, border radius, shadows) from any public website and generate starter JSON and CSS custom properties for your local project. Available as an AI agent skill (Claude, Cursor, Codex) and standalone CLI.
  14. Skills follow Anthropic's [Agent Skills overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and are installable through the [skills.sh](https://skills.sh/arvindrk/extract-design-system/extract-design-system) ecosystem.
  15. This repository is skills-first. It publishes an installable `extract-design-system` skill, and the bundled CLI is the executable workflow the agent runs under the hood.
  16. ## What It Extracts
  17. | Token category | Examples |
  18. |---|---|
  19. | **Colors** | brand palette, backgrounds, text, borders |
  20. | **Typography** | font families, sizes, weights, line heights |
  21. | **Spacing** | padding and margin scale |
  22. | **Border radius** | button, card, and pill radii |
  23. | **Shadows** | box-shadow values across elevation levels |
  24. Outputs a W3C-compatible `tokens.json` and a `tokens.css` file of CSS custom properties, ready to drop into any project.
  25. ## Quick Start
  26. Install the skill:
  27. ```bash
  28. npx skills add arvindrk/extract-design-system
  29. ```
  30. Run it from a supported coding agent with a public website:
  31. ```text
  32. Extract the design system from https://stripe.com and generate starter token files for this project.
  33. ```
  34. Expected starter outputs:
  35. - `.extract-design-system/raw.json`
  36. - `.extract-design-system/normalized.json`
  37. - `design-system/tokens.json`
  38. - `design-system/tokens.css`
  39. ## About This Repository
  40. This repository contains a focused agent skill for reverse-engineering a starter design system from a public website.
  41. The skill is designed to give coding agents a repeatable workflow for:
  42. - analyzing a public website's colors, typography, spacing, radius, and shadows
  43. - normalizing the extracted output into a stable structure
  44. - generating project-local starter token files
  45. - summarizing findings before broader styling or app changes
  46. ## Available Skill
  47. ### extract-design-system
  48. Extract a starter design system from a public website and turn it into local token files.
  49. **Use when:**
  50. - You want an agent to analyze a public website's visual primitives
  51. - You want starter design tokens for an existing project
  52. - You want a repeatable workflow instead of ad hoc prompting
  53. - You want the agent to summarize findings before applying broader changes
  54. **What it produces:**
  55. - `.extract-design-system/raw.json`
  56. - `.extract-design-system/normalized.json`
  57. - `design-system/tokens.json`
  58. - `design-system/tokens.css`
  59. ## Installation
  60. Install the skill from GitHub with the `skills` CLI:
  61. ```bash
  62. npx skills add arvindrk/extract-design-system
  63. ```
  64. You can also browse the skill on [skills.sh](https://skills.sh/arvindrk/extract-design-system/extract-design-system).
  65. ## Usage
  66. Once installed, the skill is available to supported coding agents. The agent should use it when a request matches the extraction workflow.
  67. **Example prompts:**
  68. ```text
  69. Extract the design system from https://stripe.com and generate starter token files for this project.
  70. ```
  71. ```text
  72. Analyze https://linear.app and summarize the design primitives before generating local tokens.
  73. ```
  74. ```text
  75. Extract colors, typography, spacing, and radius tokens from https://vercel.com and save them for this codebase.
  76. ```
  77. ```text
  78. Review https://tailwindcss.com, extract the most likely design primitives, and generate starter token files only if the results look usable.
  79. ```
  80. ## How The Skill Works
  81. The skill is designed to:
  82. - confirm that the target site is public and reachable
  83. - set expectations about scope and limitations
  84. - run the extraction workflow through the bundled CLI
  85. - summarize what was found in the normalized output
  86. - generate starter token files for the current project
  87. - ask before modifying existing app code, styles, or configuration
  88. ## Scope And Limitations
  89. - Public websites only
  90. - Single-page extraction workflow
  91. - Starter tokens, not a full component library
  92. - No framework config patching or automatic app rewrites
  93. - Dynamic, protected, or highly script-driven sites may yield incomplete output
  94. - Extraction is useful for initialization, not pixel-perfect reproduction
  95. ## Security Considerations
  96. - Target websites are untrusted third-party input and may influence extracted output
  97. - Generated tokens should be reviewed before being treated as authoritative design decisions
  98. - The skill is intended for extraction and starter token generation, not automatic broad app rewrites
  99. - Use only with public websites that you are comfortable fetching and analyzing at runtime
  100. - Ask for confirmation before applying extracted output to existing app code, styles, or configuration
  101. ## Repository Structure
  102. This repository currently exposes:
  103. - `skills/extract-design-system/SKILL.md` - Main skill instructions
  104. - `skills/extract-design-system/references/` - Supporting workflow and output references
  105. - `src/` - Bundled CLI implementation used by the skill
  106. - `tests/` - CLI and normalization test coverage
  107. ## MCP Server
  108. The package also ships an MCP server (`extract-design-system-mcp`) that exposes the same workflow as structured tool calls for Cursor, Claude Desktop, and any MCP-compatible agent.
  109. ### Tools
  110. | Tool | Description |
  111. |---|---|
  112. | `extract_design_system` | Run a full extraction from a URL and write `design-system/tokens.json` + `tokens.css` |
  113. | `init_design_system` | Re-emit token files from the cached `.extract-design-system/normalized.json` without re-fetching |
  114. | `get_tokens` | Read and return the current `design-system/tokens.json` without re-extracting |
  115. ### Cursor (project-local)
  116. Create `.cursor/mcp.json` in your project root:
  117. ```json
  118. {
  119. "mcpServers": {
  120. "extract-design-system": {
  121. "command": "npx",
  122. "args": ["-y", "extract-design-system-mcp"]
  123. }
  124. }
  125. }
  126. ```
  127. Restart Cursor. The server appears under Settings → Features → MCP with all 3 tools listed.
  128. ### Claude Desktop
  129. Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
  130. ```json
  131. {
  132. "mcpServers": {
  133. "extract-design-system": {
  134. "command": "npx",
  135. "args": ["-y", "extract-design-system-mcp"],
  136. "cwd": "/path/to/your/project"
  137. }
  138. }
  139. }
  140. ```
  141. Claude Desktop does not infer a working directory from context, so `cwd` is required. It controls where `design-system/tokens.json` and `.extract-design-system/` are written.
  142. ---
  143. ## Local Development
  144. The skill's executable workflow is backed by the published npm CLI in this repository.
  145. ```bash
  146. npm install
  147. npx playwright install chromium
  148. npm run typecheck
  149. npm test
  150. npm run build
  151. npm run dev -- --help
  152. npm run cli -- --help
  153. ```
  154. Useful local commands:
  155. ```bash
  156. npm run dev -- https://example.com
  157. npm run dev -- https://example.com --extract-only
  158. npm run cli -- https://example.com
  159. npm run cli -- init
  160. ```
  161. ## Community And Support
  162. - Read the contribution guide in [`CONTRIBUTING.md`](./CONTRIBUTING.md)
  163. - Review expected community behavior in [`CODE_OF_CONDUCT.md`](./CODE_OF_CONDUCT.md)
  164. - Report security issues using the process in [`SECURITY.md`](./SECURITY.md)
  165. - Support ongoing maintenance through [GitHub Sponsors](https://github.com/sponsors/arvindrk)
  166. ## Notes
  167. - Node.js 20+ is required
  168. - If extraction fails because Chromium is missing, run `npx playwright install chromium`
  169. - Extraction quality depends on the target site's DOM and CSS exposure
  170. ## License
  171. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.