Skip to content
Back to search

anydesign

SkillWorks with Claude CodeGitHub

"Extract the design of a screenshot, website URL or Figma file into a design.md with tokens, components, layout and brand rules, or copy one element (navbar, card, illustration) into an element.md with a rebuild or image-generation prompt. Use when the user wants to document, replicate, audit or reverse-engineer a visual design: its design system, palette, typography or style."

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/uxkero--anydesign/badge.svg)](/listings/uxkero--anydesign)

HTML

<a href="/listings/uxkero--anydesign"><img src="/api/listings/uxkero--anydesign/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.

git clone https://github.com/uxKero/anydesign.git

# Personal skills (all projects)
cp -r anydesign ~/.claude/skills/

# OR for a single project
cp -r anydesign /path/to/project/.claude/skills/

Optional extras:

# Python deps for the companion scripts
pip install -r requirements.txt
playwright install chromium   # only for capture_site.py (~300MB first time)

To analyze **Figma files**, connect the Figma MCP in the Claude app (`Settings → Connectors`).

That's it — the skill activates automatically when Claude detects design-analysis intent ("extract the design system from X", "copy this navbar", "what palette does this site use"). No command to remember.

---

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.

SKILL.md · Manifest · 112 lines

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

  1. ---
  2. name: anydesign
  3. description: "Extract the design of a screenshot, website URL or Figma file into a design.md with tokens, components, layout and brand rules, or copy one element (navbar, card, illustration) into an element.md with a rebuild or image-generation prompt. Use when the user wants to document, replicate, audit or reverse-engineer a visual design: its design system, palette, typography or style."
  4. ---
  5. # AnyDesign: design analysis and documentation
  6. ## Role
  7. You are a **Design Systems Analyst**: part visual detective, part systems designer, part
  8. frontend engineer. Don't describe what you see; **diagnose the design**: which decisions
  9. were deliberate, which patterns repeat, which tokens operate under the surface, and what it
  10. would take to rebuild it. The reader is a designer or another AI that will reconstruct the
  11. design from your file. Work in the user's language.
  12. ## Two modes
  13. - **Full mode** (default): the design of a page, file or system → the workflow below,
  14. output `design.md`.
  15. - **Element mode**: ONE element ("copy this navbar", "just the pricing card", "recreate
  16. this 3D illustration", "give me a prompt to generate this graphic") → read
  17. `references/element-copy.md` and follow its E-steps, output `element.md`.
  18. Signals for element mode: a definite article plus a single component ("the navbar"), an
  19. element-scoped verb ("copy", "extract just", "recreate"), or any request for an
  20. image-generation prompt. Ambiguous ("analyze this card-heavy dashboard") → full mode, and
  21. offer element mode as the follow-up.
  22. ## Token budget (applies to every step)
  23. Every tool call re-sends the whole conversation, so whatever enters the context early is
  24. paid again on each later turn. A careless URL run measured 51 model calls and a 209k-token
  25. context. Keep it lean:
  26. - **Run scripts, never open their source.** `--help` is enough if a flag is unclear.
  27. - **Never read a dump whole.** `css-vars.json`, rendered HTML and Figma
  28. `get_design_context` on a whole file can each be 15k to 500k tokens. Work from the script
  29. digests. For a missing CSS variable, `extract_css_vars.py --grep 'pattern'`; never parse
  30. the JSON with your own code.
  31. - **Images: at most 4 desktop frames plus 2 mobile frames**, and only the ones you need.
  32. Don't write your own capture or scroll scripts; `capture_site.py --frames N` covers it.
  33. - **Batch.** Run the capture scripts in one turn, read the references you need in one turn,
  34. and group small checks into one command.
  35. - **Generate derived files, don't type them.** `design-tokens.json` comes from
  36. `build_tokens_json.py`, `design-a11y.md` from `check_contrast.py --output`.
  37. - **Write `design.md` once**, then fix lint findings with small edits, never a full rewrite.
  38. ## Workflow
  39. ### Step 1: source and emphasis
  40. Ask only if unclear: which source (image, URL, Figma, a combination) and which emphasis
  41. (reconstruction, mood/reference, design system). Default: reconstruction plus design
  42. system, at standard depth. Go deep only when the user asks for it.
  43. ### Step 2: capture
  44. Details and flags in `references/capture-flows.md`; read it only if something below doesn't
  45. cover your case.
  46. - **Image**: view it directly. `scripts/extract_colors.py <image>` when you need exact hex
  47. codes instead of vision estimates.
  48. - **URL**: in one turn, run `python scripts/extract_css_vars.py <URL>` (digest of the
  49. explicit tokens) and `python scripts/capture_site.py <URL> --viewports desktop,mobile`
  50. (computed styles of body, headings, buttons, inputs and cards, plus up to 4 readable
  51. frames per viewport). Together they usually carry the whole token layer. No Playwright →
  52. `WebFetch` for content and structure, and mark measured typography ⚠️.
  53. - **Figma**: `get_metadata` for structure, `get_variable_defs` for defined tokens,
  54. `get_design_context` on a node (never a whole file), `get_screenshot` for visual
  55. reference. Ask for a `node-id` link when given a whole file.
  56. - **Combination**: scripts or Figma for tokens, the user's screenshot for the state they
  57. care about; say in Source what each contributed.
  58. If something fails (URL down, Cloudflare wall, no Figma access, broken image), say so and
  59. propose an alternative, such as a manual screenshot. Don't bypass protections and don't
  60. invent content.
  61. ### Step 3 and 4: analyze and write
  62. Read `references/design-md.md`. It holds the six layers (identity, system, components,
  63. layout, reconstruction, brand rules), token rigor, the frontmatter and section contract,
  64. length caps per depth, and the art direction QA pass to run before writing. Connect the
  65. analysis to any context the user gave ("this is for an AI brand").
  66. Then, in order:
  67. 1. With 2+ text/surface color pairs:
  68. `python scripts/check_contrast.py --pair "FG,BG:label" ... --output design-a11y.md`
  69. 2. Write `design.md` in one go.
  70. 3. `python scripts/lint_design_md.py design.md`, and fix failures with targeted edits.
  71. 4. If Layer 2 produced concrete tokens: `python scripts/build_tokens_json.py design.md`.
  72. Never write the JSON by hand; anything to export belongs in the frontmatter.
  73. ### Step 5: deliver
  74. List the files and offer the next logical step for the chosen emphasis: refine a weak
  75. section, turn the design.md into a build prompt for Claude Code or v0, or analyze another
  76. source to compare. Don't close with "anything else?".
  77. ## Scripts
  78. | Script | Use | Deps |
  79. |---|---|---|
  80. | `extract_css_vars.py` | URL: token digest; `--grep` searches the saved JSON | stdlib |
  81. | `capture_site.py` | URL: computed styles + frames; `--selector` for element mode | `playwright` |
  82. | `extract_colors.py` | Image: dominant hex codes with area % | `Pillow` |
  83. | `check_contrast.py` | WCAG table; `--output` writes it | stdlib |
  84. | `lint_design_md.py` | Validates design.md (frontmatter, refs, components 1:1, sections 6-7) | stdlib |
  85. | `build_tokens_json.py` | design.md → DTCG `design-tokens.json` | stdlib |
  86. For the user, not part of a run: `verify_design.py` (drift of a tokens file against the live
  87. URL) and `export_for_claude_design.py` (bundle for claude.ai/design).
README.md · README · 322 lines

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

  1. <div align="center">
  2. # anydesign
  3. ### Point it at anything visual. Get a design system back.
  4. A Claude skill that turns **images, websites, and Figma files** into structured,
  5. machine-readable design specs — and copies **single elements** (navbars to 3D art)
  6. as rebuild prompts any AI can execute.
  7. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  8. [![Skill Version](https://img.shields.io/badge/version-0.6.0-blue.svg)](./CHANGELOG.md)
  9. [![Claude Skill](https://img.shields.io/badge/Claude-Skill-purple.svg)](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview)
  10. [![DTCG](https://img.shields.io/badge/Design%20Tokens-DTCG-green.svg)](https://www.designtokens.org/)
  11. [![GitHub stars](https://img.shields.io/github/stars/uxKero/anydesign?style=flat&color=orange)](https://github.com/uxKero/anydesign/stargazers)
  12. **[Install](#-install)** · **[See it work](#-see-it-work)** · **[Element mode](#-element-mode--copy-just-that)** · **[CLI scripts](#-standalone-cli-scripts)** · **[Examples](./examples)**
  13. </div>
  14. ---
  15. ## 🧠 What it does
  16. **`anydesign` runs in Claude — its output is universal.** Plain Markdown + W3C DTCG
  17. JSON that v0, Lovable, Cursor, Bolt, Claude Code, or a human designer can consume.
  18. No lock-in. It's not a description generator — it's a **design diagnostics** tool:
  19. every inference carries a confidence marker (✅ ⚠️ ❓), every color is a real hex,
  20. and inventing tokens is treated as worse than saying "not enough info".
  21. Two modes, picked automatically from what you ask:
  22. | You say | Mode | You get |
  23. |---|---|---|
  24. | *"Extract the design system from this site"* | **Full analysis** | `design.md` (7-section spec) + `design-tokens.json` (DTCG) + optional WCAG report |
  25. | *"Copy this navbar"* / *"Recreate this 3D graphic"* | **Element mode** | A focused `element.md`: code spec + rebuild prompt, or a **token-grounded image prompt** |
  26. ---
  27. ## 🎬 See it work
  28. Every image below is a real, reproducible run — sources and commands live in
  29. [`examples/`](./examples).
  30. ### Act 1 — A full design system becomes a running app
  31. The skill analyzed [vercel.com](https://vercel.com) (808 CSS custom properties
  32. extracted, nothing invented), produced a `design.md`, and v0 built this from it:
  33. [![A running app generated by v0 from a design.md this skill produced](./examples/v0-downstream-demo/screenshot.png)](https://v0-anydesignexample.vercel.app/)
  34. <div align="center"><sup>Live at <a href="https://v0-anydesignexample.vercel.app/">v0-anydesignexample.vercel.app</a> · full run in <a href="./examples/vercel-landing"><code>examples/vercel-landing/</code></a></sup></div>
  35. ### Act 2 — One element, rebuilt
  36. Element mode pointed at the retro Mac OS player of
  37. [poolsuite.net](https://poolsuite.net): DOM-precise capture, pixel-sampled palette,
  38. the verbatim bevel-shadow system — and a rebuild prompt that v0 turned into a
  39. working app.
  40. | Captured element | Rebuilt by v0 from the `element.md` |
  41. |---|---|
  42. | ![The Poolsuite player window captured by element mode](./examples/poolsuite-player-element/element.png) | ![The v0 rebuild](./examples/poolsuite-player-element/v0-result.png) |
  43. <div align="center"><sup>Live at <a href="https://retro-radio-player-zz.vercel.app/">retro-radio-player-zz.vercel.app</a> · run details in <a href="./examples/poolsuite-player-element"><code>examples/poolsuite-player-element/</code></a></sup></div>
  44. ### Act 3 — Art becomes a prompt that holds
  45. When the element is *art*, you get a generative image prompt **grounded in the
  46. extracted palette** — hex by hex. Discord's 3D hero scene, regenerated on the
  47. first pass: indigo world locked, every accent on its exact extracted hex, original
  48. characters (no brand mascots — there's an IP guardrail).
  49. | Captured element | Generated from the token-grounded prompt |
  50. |---|---|
  51. | ![Discord's 3D hero scene captured by element mode](./examples/discord-hero-asset/element.png) | ![The image generated from the token-grounded prompt](./examples/discord-hero-asset/element-3D.png) |
  52. And the same extraction as an **isolated, web-ready cutout** — single subject,
  53. real alpha, no scenery. Drop it straight into your site:
  54. <p align="center">
  55. <img src="./examples/discord-hero-asset/element-3D-isolated.png" width="260" alt="The robot companion as an isolated transparent PNG generated from the element.md prompt">
  56. </p>
  57. <div align="center"><sup>Both prompts + alpha verification in <a href="./examples/discord-hero-asset"><code>examples/discord-hero-asset/</code></a></sup></div>
  58. ### Act 4 — Game asset packs that stay consistent
  59. The #1 pain of AI game art is consistency between assets. Element mode extracts a
  60. game's art direction **once** — palette, lighting recipe, color-allocation rules —
  61. and emits a prompt pack where every asset shares that base. One key art in, a
  62. coherent sprite set out:
  63. | Captured key art | Original character generated from the pack |
  64. |---|---|
  65. | ![Toon battle-royale key art captured by element mode](./examples/game-asset-pack/element.png) | <p align="center"><img src="./examples/game-asset-pack/asset-character.png" width="240" alt="An original game character generated from the token-grounded asset-pack prompt, transparent PNG"></p> |
  66. <div align="center"><sup>Prompt pack (character + pickup + prop) in <a href="./examples/game-asset-pack"><code>examples/game-asset-pack/</code></a> · original subjects only, per the IP guardrail</sup></div>
  67. ---
  68. ## 🚀 Install
  69. ```bash
  70. git clone https://github.com/uxKero/anydesign.git
  71. # Personal skills (all projects)
  72. cp -r anydesign ~/.claude/skills/
  73. # OR for a single project
  74. cp -r anydesign /path/to/project/.claude/skills/
  75. ```
  76. Optional extras:
  77. ```bash
  78. # Python deps for the companion scripts
  79. pip install -r requirements.txt
  80. playwright install chromium # only for capture_site.py (~300MB first time)
  81. ```
  82. To analyze **Figma files**, connect the Figma MCP in the Claude app
  83. (`Settings → Connectors`).
  84. That's it — the skill activates automatically when Claude detects design-analysis
  85. intent ("extract the design system from X", "copy this navbar", "what palette does
  86. this site use"). No command to remember.
  87. ---
  88. ## 📦 What you get
  89. | File | What it is |
  90. |---|---|
  91. | **`design.md`** | 7-section spec: TL;DR → visual identity (incl. brand voice + the "ONE brand thing") → tokens → components → layout → reconstruction notes → Do's/Don'ts → open questions. YAML frontmatter + `{token.refs}` make it machine-parseable and refactor-safe. |
  92. | **`design-tokens.json`** | [W3C DTCG](https://www.designtokens.org/) format (`$value`/`$type`) — drops into Style Dictionary, Figma Variables, Tokens Studio. |
  93. | **`design-a11y.md`** *(optional)* | WCAG 2.1 contrast report with AA/AAA pass-fail. |
  94. | **`element.md`** *(element mode)* | Scoped spec + rebuild prompt (`code`), token-grounded image prompt (`asset`), or both (`hybrid`). |
  95. ---
  96. ## 🪄 Element mode — "copy just that"
  97. Sometimes you don't want the whole system — you want *that* navbar, *that* pricing
  98. card, *that* 3D illustration. Say so and the skill captures just the element
  99. (`capture_site.py --selector` grabs its exact bounding box + `outerHTML` on URLs)
  100. and classifies it:
  101. | Kind | Example | Output |
  102. |---|---|---|
  103. | `code` | Navbar, card, button, hero | Scoped token spec + paste-ready rebuild prompt (v0 / Claude Code / Lovable) |
  104. | `asset` | 3D illustration, mascot, photo art | **Token-grounded prompt for image models** (gpt-image, Midjourney, SD/Flux) |
  105. | `hybrid` | A card containing an illustration | Code spec + nested asset prompt |
  106. The image prompts are the differentiator: instead of an impressionistic description,
  107. the prompt embeds the **exact extracted palette**, observed lighting, and the parent
  108. brand's mood — so the regenerated asset *belongs* to the source design. Two delivery
  109. formats: `scene` (composition with background) or `isolated` (single subject,
  110. transparent PNG with alpha, ready for the web).
  111. ---
  112. ## 🔌 Works with any AI builder
  113. The deliverable is plain text. Anything that reads Markdown can use it.
  114. | Tool | How |
  115. |---|---|
  116. | **[v0](https://v0.dev)** / **[Bolt](https://bolt.new)** / **[Lovable](https://lovable.dev)** | Paste `design.md` as the brief — see both [live](https://v0-anydesignexample.vercel.app/) [demos](https://retro-radio-player-zz.vercel.app/) |
  117. | **[Claude Code](https://claude.com/claude-code)** / **[Cursor](https://cursor.sh)** / **[Windsurf](https://codeium.com/windsurf)** | Drop `design.md` + `design-tokens.json` into context, ask for the build |
  118. | **Style Dictionary / Tokens Studio / Figma Variables** | Import `design-tokens.json` directly (DTCG) |
  119. | **gpt-image / Midjourney / SD** | Paste the `element.md` image prompt |
  120. | **Notion / Linear / a human** | `design.md` reads as a designer brief |
  121. ---
  122. ## 🧰 Standalone CLI scripts
  123. Eight pure-Python tools in [`scripts/`](./scripts) that **work without Claude**:
  124. | Script | What it does | Deps |
  125. |---|---|---|
  126. | `extract_css_vars.py` | Pull every `--*` custom property from a URL's stylesheets: compact digest on screen, full JSON on disk | stdlib |
  127. | `capture_site.py` | Playwright captures: computed styles of typical elements, readable viewport frames, multi-viewport, cookie-banner dismiss, single-element (`--selector`) | `playwright` |
  128. | `extract_colors.py` | Dominant colors from an image, with area % | `Pillow` |
  129. | `check_contrast.py` | WCAG 2.1 contrast table for color pairs | stdlib |
  130. | `lint_design_md.py` | Validate a `design.md` against the spec | stdlib |
  131. | `build_tokens_json.py` | Generate `design-tokens.json` (DTCG) from a `design.md` | stdlib |
  132. | `verify_design.py` | **Drift audit**: compare a `design-tokens.json` against the live URL — is your spec still true? | stdlib |
  133. | `export_for_claude_design.py` | Bundle tokens into PPTX/DOCX/CSS/Tailwind for [claude.ai/design](https://claude.ai/design) | `pyyaml`, `python-pptx`, `python-docx` |
  134. <details>
  135. <summary><b>Command examples</b></summary>
  136. ```bash
  137. # Pull design tokens from any URL — no Claude needed
  138. python scripts/extract_css_vars.py https://vercel.com/
  139. # Computed styles + readable frames, desktop and mobile
  140. python scripts/capture_site.py https://your-site.com --viewports desktop,mobile
  141. # Capture a single element (screenshot + outerHTML)
  142. python scripts/capture_site.py https://your-site.com --selector "header.navbar" -o element.png
  143. # WCAG contrast check
  144. python scripts/check_contrast.py --pair "#111,#FFF" --pair "#3B82F6,#FFF" --output design-a11y.md
  145. # Validate a generated design.md, then derive its DTCG token file
  146. python scripts/lint_design_md.py path/to/design.md
  147. python scripts/build_tokens_json.py path/to/design.md
  148. # Audit declared tokens vs live site (the drift tool)
  149. python scripts/verify_design.py path/to/design-tokens.json https://vercel.com/
  150. # Bundle a design.md + tokens for upload to claude.ai/design
  151. python scripts/export_for_claude_design.py path/to/design.md --out my-brand-bundle/
  152. ```
  153. Each script has `--help`.
  154. </details>
  155. ---
  156. ## 💡 More you can do with it
  157. <details>
  158. <summary><b>Use with Claude Design</b> — get your captured brand into claude.ai/design persistently</summary>
  159. <br>
  160. [**Claude Design**](https://claude.ai/design) (Anthropic Labs) builds a persistent
  161. design system from brand assets you upload — PPTX decks, DOCX briefs, code repos.
  162. It doesn't ingest DTCG JSON or markdown directly, so the
  163. `export_for_claude_design.py` script bridges the gap:
  164. ```bash
  165. python scripts/export_for_claude_design.py path/to/design.md --out my-brand/
  166. ```
  167. | File | What Claude Design does with it |
  168. |---|---|
  169. | `brand-kit.pptx` | Primary asset — cover, atmosphere, swatches, typography, components, Do's/Don'ts |
  170. | `brand-overview.docx` | The full `design.md` as Word — use as the brand brief |
  171. | `tokens.css` | `:root { --... }` from your DTCG tokens — link via "Code repository" |
  172. | `tailwind.config.ts` | Same path, Tailwind v3 form — either works |
  173. | `README-claude-design.md` | Upload instructions |
  174. Workflow: run anydesign → export the bundle → upload it in Claude Design's
  175. design-system setup → every future project in your org defaults to that brand.
  176. Real bundle from the Vercel run:
  177. [`examples/vercel-landing/claude-design-bundle/`](./examples/vercel-landing/claude-design-bundle).
  178. </details>
  179. <details>
  180. <summary><b>Use cases</b> — eight real scenarios</summary>
  181. <br>
  182. - **🎨 Replicate a reference** — *"I love how Linear's landing feels — analyze it so I can brief my team."* HTML + CSS vars extracted as explicit tokens, `design.md` ready for a Notion brief.
  183. - **🧩 Tokens from a screenshot** — *"Pull the palette and typography from this Dribbble shot."* Direct vision + `extract_colors.py` for pixel-precise hexes, confidence-marked.
  184. - **🪄 Copy one element — including art** — *"Give me a prompt to generate this 3D blob for my own palette."* Element mode: token-grounded image prompt + consistency notes telling you which hex to swap for *your* brand.
  185. - **🛠️ Brief an AI builder** — *"A portfolio like vercel.com but simpler — give me something I can hand to v0."* Reconstruction-emphasis `design.md`, paste and go.
  186. - **🎯 Audit a Figma handoff** — declared variables (`get_variable_defs`) cross-referenced against actual usage; inconsistencies land in Open Questions.
  187. - **🔍 Design vs production** — pass the Figma file *and* the live site; get a discrepancies section: diverged tokens, off-spec components, missing states.
  188. - **📚 Document a legacy product** — extract the implicit system your team built without naming it; start from a baseline instead of zero.
  189. - **♿ WCAG quick-check** — `design-a11y.md` with AA/AAA ratios for every captured text/surface pair.
  190. </details>
  191. <details>
  192. <summary><b>How the skill thinks</b> — workflow + project structure</summary>
  193. <br>
  194. A strict 5-step workflow (full detail in [SKILL.md](./SKILL.md)):
  195. ```
  196. Step 1 — Identify source, mode (full vs element), and emphasis
  197. ↓
  198. Step 2 — Capture material
  199. (vision / HTML + CSS vars / Playwright / Figma MCP)
  200. ↓
  201. Step 3 — Layered analysis (Identity → System → Components → Layout
  202. → Reconstruction → Brand rules) + Art Direction QA pass
  203. ↓
  204. Step 4 — Generate design.md + design-tokens.json (or element.md)
  205. ↓
  206. Step 5 — Deliver + suggest next step
  207. ```
  208. The layered analysis goes general → specific, never jumping from "mood" to "tokens"
  209. without passing through "system" — that's what makes the output coherent.
  210. ```
  211. anydesign/
  212. ├── SKILL.md Main instructions (the "brain")
  213. ├── references/ Loaded on-demand (progressive disclosure)
  214. │ ├── capture-flows.md Capture flags and edge cases per source type
  215. │ ├── design-md.md Analysis layers, token rigor and the design.md contract
  216. │ └── element-copy.md Element mode: element.md + image prompts
  217. ├── scripts/ 8 standalone CLI tools
  218. └── examples/ Real, reproducible runs
  219. ├── vercel-landing/ Full analysis of vercel.com (+ Claude Design bundle)
  220. ├── landing-example/ Synthetic minimal example
  221. ├── poolsuite-player-element/ Element mode, code path (+ v0 rebuild)
  222. ├── discord-hero-asset/ Element mode, asset path (+ generated images)
  223. └── v0-downstream-demo/ The original downstream proof
  224. ```
  225. </details>
  226. ---
  227. <div align="center">
  228. **MIT** · See [LICENSE](./LICENSE) · Changelog in [CHANGELOG.md](./CHANGELOG.md)
  229. Made something with anydesign? **[Open an issue and show it](https://github.com/uxKero/anydesign/issues)** ✨
  230. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

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