design-extract
Extract design tokens (color / typography / spacing) from imported source code, screenshots, or Figma exports into the canonical token bag token-map consumes.
npx skills add nexu-io/open-design --skill design-extract --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Design extract Spec §10 / §21.3.2: tokens scattered across a repo's CSS / theme files / Tailwind config / styled-components helpers / SCSS partials need to be lifted into one bag before `token-map` can crosswalk them onto the active OD design system. This atom does the lifting; the input shape is intentionally generic so the same atom serves both code-migration and figma-migration when fed different sources. ## Inputs - `code/index.json` from `code-import` (code-migration), OR - `figma/tree.json` from `figma-extract` (figma-migration), OR - A folder of screenshot images (tune-collab quick-tune flows). ## Output ```text project-cwd/ └── code/ └── tokens.json # { colors[], typography[], spacing[], radius[], shadow[] } ``` Each token entry carries: ```jsonc { "kind": "color", "name": "primary-500", // optional source name "value": "#5b8def", // canonical value "sources": ["styles/global.css:42", "tailwind.config.js:24"], "usage": ["Header.tsx", "Footer.tsx"] } ``` `sources[]` and `usage[]` are the audit trail `token-map.unmatched.json` references when a target token can't be found. ## Convergence The atom completes when `code/tokens.json` exists. Empty token bags emit a warning even
- Inputs
- Output
- Convergence
- Anti-patterns the prompt fragment forbids
- Status
What does the design-extract skill do?
Extract design tokens (color / typography / spacing) from imported source code, screenshots, or Figma exports into the canonical token bag token-map consumes.
How do I install it?
Run `npx skills add nexu-io/open-design --skill design-extract --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From nexu-io/open-design, a repository with 83,577 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.