Skip to content
Skills Library
Design & UX · Analysis

extract

/extract

Extract a full design system from an existing front-end repo in one guided flow. Tokens for every family come from what the code already uses (its CSS variables, Tailwind config, theme objects and token files first, then the raw values the audit finds), in the W3C Design Tokens format. Each primitive gets its props, variants, states and a usage rule, and the system gets a README. Everything is proposed family by family for the user's approval; nothing in the codebase changes without it. Use when a repo has components and styling but no formal design system, or when the user wants to extract, r

Repository
massimo ↗
Licence
MIT
Last repository change
10.11.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Extract a full design system from an existing front-end repo in one guided flow. Tokens for every family come from what the code already uses (its CSS variables, Tailwind config, theme objects and token files first, then the raw values the audit finds), in the W3C Design Tokens format. Each primitive gets its props, variants, states and a usage rule, and the system gets a README. Everything is proposed family by family for the user's approval; nothing in the codebase changes without it. Use when a repo has components and styling but no formal design system, or when the user wants to extract, r

Arguments

/extract [family or step to resume]
Original author description

Extract a full design system from an existing front-end repo in one guided flow. Tokens for every family come from what the code already uses (its CSS variables, Tailwind config, theme objects and token files first, then the raw values the audit finds), in the W3C Design Tokens format. Each primitive gets its props, variants, states and a usage rule, and the system gets a README. Everything is proposed family by family for the user's approval; nothing in the codebase changes without it. Use when a repo has components and styling but no formal design system, or when the user wants to extract, r

How it works

  1. Before starting
  2. Run
  3. Rules
Original SKILL.md headings · 35 lines, 2,262 words
SKILL.md preview
---
name: extract
description: Extract a full design system from an existing front-end repo in one guided flow. Tokens for every family come from what the code already uses (its CSS variables, Tailwind config, theme objects and token files first, then the raw values the audit finds), in the W3C Design Tokens format. Each primitive gets its props, variants, states and a usage rule, and the system gets a README. Everything is proposed family by family for the user's approval; nothing in the codebase changes without it. Use when a repo has components and styling but no formal design system, or when the user wants to extract, reverse-engineer or document the system a codebase already has.
argument-hint: "[family or step to resume]"
---

# massimo: extract

A repo with components and styling already has a design system: it is spread through the code, unnamed. This skill names it. It reads the values the repo keeps, counts the ones the code uses without a token, proposes a complete token set and a usage rule per primitive, and writes the README a newcomer reads first. The user approves each family; the codebase changes only on their OK.

Plugin root: two directories above this skill's base directory. `<project>` is the project folder: `projectDir` in `massimo.config.json`, `design-system` by default. Follow `<plugin>/reference/project.md` → Session protocol, and judge proposals with `<plugin>/reference/canon.md`.

This flow does the graph, tokens and documentation work of three phases in one sitting. It records progress against those phases (`graph`, `tokens`, `guard`), so `/massimo:start` and STATUS.md show it, and an existing project's state does not change shape.

## Before starting

- No `massimo.config.json` → run the start skill's Kickoff first (detect, a few questions, `init.mjs`), then come back. Say that extract covers graph, tokens and docs.
- An existing token set (`tokens.mjs check` reads it): extract still helps (it proposes what the set lacks), but say so and agree whether to extend the set or start a draft beside it.
- A resume: read `<project>/tokens/draft/report.md` and the decisions log, tell the user which families are approved, and continue from the next one.
- CSS that has to stay the source (its file also holds component classes, or scripts read it as it is): the token set is a mirror of it, not a draft beside it. Say so, and follow the tokens skill's step 3 for `tokens.mirror` instead of steps 4 to 6 here: it sets `minScripts` to `0.3.0`, and runs `tokens.mjs resolved` after mirror and build. The values the code uses without a variable still matter under a mirror: run `tokens.mjs extract` for its report, and add the ones the user approves to the style file as custom properties (in its `:root` block, or the theme block they belong to), then run `tokens.mjs mirror` again. The mirror only holds what the CSS declares, so a code-derived token goes into the CSS first.

## Run

1. **Begin.** `state.mjs set tokens in_progress --note "extract: reading the repo"`.
2. **Sources.** Show what `massimo.config.json` → `tokens` will read, from detect: `styleFiles` (CSS custom properties, `@theme`, DaisyUI themes), `tailwindConfig`, `themeFiles` (CSS-in-JS or JS themes), `importFiles` (DTCG or Tokens Studio JSON), and `figmaExport` (Figma variables exported as JSON, if the user has one). Ask the user to confirm or correct them in one question. JavaScript is read as text, never run, so a config's spreads and computed values are skipped and named. A config section that is a name from another module (`colors: brandColors`) is named with the module it is imported from. In a Sass style file, a custom property written with interpolation is read when the interpolation holds a literal or a rem conversion (`#{toRem(12)}`, read at 16px a rem unless the call gives its own base, which a note says), and named in a note when only Sass can work it out, as is one whose name holds interpolation (`--#{$prefix}radius`). In a theme file, the first theme object is read (a theme call such as `createGlobalTheme(':root', vars, {…})`, an export named `theme…` or `tokens…`, or the default export), and so is any export named like a theme key (`export const colors = {…}`); the notes name every other object in the file. A theme contract (`createThemeContract`, `createGlobalThemeContract`) holds the names of CSS variables, not values, so neither the reader nor the audit takes its strings as values.
3. **Audit and graph.** `node <project>/scripts/audit.mjs` (the "before": canon numbers, colour clusters with what each is used for, the inventory of line heights, weights, shadows, borders, motion, layers and opacity, and the Tailwind palette classes the code uses, which the tokens skill's step 2 says how to present). `node <project>/scripts/graph.mjs` (components, props, variants, states, usage). Fix the graph's unresolved imports as the graph skill says, then `state.mjs set graph done --note "<N> components"` (or `in_progress` with what is left).
4. **Propose.** `node <project>/scripts/tokens.mjs extract`. It writes a 2025.10 draft in `<project>/tokens/draft/` and `report.md`: every token with its value and where it came from (a source file, or "used N× in code"), family by family, the assumptions it made, and the values the code uses that were not proposed (used once, off the grid, off a scale the sources define, only ever data, a duration under 1ms, a width or height, since massimo proposes no size tokens yet, or a length in em, which follows a font size, so no rem token can hold it). The body size, `font.size.base`, is the one a `body`, `html` or `:root` rule sets, else the most used; such a rule's size in em follows the root size, so it is the body size, not a length in em. It is proposed even beside a type scale the sources define. Three or more sizes in the sources close a scale, so the code's other sizes are listed as off it, unless they all sit on one side of the body size, come only from a Tailwind config's `theme.extend` (which adds to Tailwind's own scale, as `theme.extend.spacing` and `theme.extend.borderRadius` do), or the config left part of the section unread, which a note says. In a Tailwind repo, a radius or font size takes Tailwind's name only when its value is Tailwind's for that name, and is named by its size otherwise (a radius also when the sources already use that name), so wiring the tokens into Tailwind never changes what a `rounded-*` or `text-*` class renders; the tailwind4 output writes a type step of Tailwind's own scale with its size and Tailwind's own line height only, never its weight or letter spacing, which Tailwind's own `text-*` classes do not set, and any other step a size token writes (an app's own `--text-display` in `@theme`) with that size and the line height a source sets for it only, so a composite's assumed weight or line height never reaches a `text-*` class. In a Tailwind 4 repo, the `@theme` lines that map a colour onto the variable that holds it (`--color-primary: var(--primary)`, as shadcn writes them) are Tailwind's wiring, not tokens: each colour keeps its own variable and name, a note says so, and the tailwind4 output writes the wiring again. In a Tailwind repo, a colour from the code takes one of Tailwind's palette names (`yellow-500`) only when its value is Tailwind's for that name in the repo's Tailwind version, and a step between Tailwind's otherwise (`green-465`), so wiring the tokens never recolours a palette class; when the config's own colours went unread, every colour takes a step between. Semantic colours come from the page first: the background and text colour a `body`, `html` or `:root` rule in `tokens.styleFiles` sets (a declaration, or the `bg-` and `text-` classes of an `@apply` list; such a rule wins over a light theme's selector), with the dark theme's from the dark selector's rule or a `dark:` class; then the code's most used backgrounds on the default theme's side, and the text that reads on them. When the body size comes from a rule in a file `tokens.styleFiles` does not list and no page colour was read, a note names that file. When the dark theme sets only the page's two colours, a note says the other semantic colours have no dark value yet. A numbered ramp (`surface.900`) is primitives, whatever its group is called, and only a colour, or an alias of one, counts as the sources' own semantic layer (a font size in the `text` group does not). Shadow and easing names are not yet checked against Tailwind's (a shadow named `sm` replaces Tailwind's `shadow-sm` once wired), so check those two families before the wiring step. A name with a dot in it (a spacing step's `0.5`) is written with `_` (`0_5`), since a token name cannot hold a dot, and a note says so. The radius, spacing and shadow tables end with a row listing Tailwind's own classes the code uses, which need no tokens. It prints its notes and lists them under Notes in `report.md`; show the user each one before the review, since some say where a value was left out: two places that set one property for the same theme with different values (the token keeps the first, except that a plain `:root` block wins over a light theme's selector, since it is the default theme), an import file it read no tokens from, a Tokens Studio token that refers to its own path (the earlier set's token stays), and a draft with no semantic colour or no dark theme, with the reason (such as colours set only through Tailwind palette classes and their `dark:` variants), which the colour semantics review then fills by hand. An app on daisyUI's built-in themes, picked in `@plugin "daisyui" { themes: … }` (a bare `@plugin "daisyui";` picks light and dark), gets a note on them in place of the note on semantic colour and, when the app has more than one theme, the note on a dark theme: it names those themes, which is the default and which is for a system that prefers dark, and daisyUI's colour names, and says their values live in the daisyui package (`theme/<name>.css`); the review copies them into semantic tokens, one theme per mode. When the style files define colours of their own (a `@plugin "daisyui/theme"` block), the note only says which built-in themes keep their values in the package. Build the preview of the draft: `tokens.mjs preview --source <project>/tokens/draft/tokens.resolver.json`, serve the project folder (`serve.mjs`) and open `/tokens/preview.html`. Check its contrast: `tokens.mjs check --source <project>/tokens/draft/tokens.resolver.json`. When none fails, it says how many pairs it checked, and it says so when it checked none: then the draft has no pair yet, and the review adds them.
5. **Review, family by family.** In this order, one decision each: colour primitives (ramps and overlays), colour semantics (with the contrast results per theme), typography (families, weights, sizes, composites), spacing, radius, shadow and border, motion, layers and opacity. For each, show the report's table for that family, point out every assumption and every value that came from the code rather than a source, and the rare values left out. Ask: approve, change, or drop. Edit the draft files to match (the format rules are in the tokens skill, step 5); keep every existing CSS variable's name through `$extensions.massimo.cssVar`. Record each family with `state.mjs decide "tokens: <family> approved, <what changed>" --phase tokens`, and note progress (`state.mjs set tokens in_progress --note "<n>/9 families approved"`) so a stop at any point resumes cleanly.
6. **Adopt the tokens.** With every family approved, move the draft's files into `<project>/tokens/` and set `tokens.source` to `<project>/tokens/tokens.resolver.json`. Then the tokens skill's steps 6 to 9 (outputs, build, wiring, proving nothing moved, contrast), each one asked first, since they write into the codebase. A `css` output declares the names the style files already declare: in wiring, remove the hand-written declarations on the user's OK (tokens skill, step 7), so the token set is the one source. The audit then takes its nearest tokens from the token set. `state.mjs set tokens done --note "<n> tokens, <outputs>"`.
7. **Components.** From `graph.md`, take the primitives (tier Primitives, or the most used where there is no tier yet), in batches of five to eight. For each, show its props with their values and defaults, how call sites use them, its states, and the tokens and variables it reads. Draft its `ds:group` and one `ds:use-when` sentence (when to reach for it instead of its neighbours, from how it is actually used), and a `ds:never` only where the code shows a real misuse. Show the batch in one list; the user approves or rewrites each line. Write the accepted lines as comments at the top of each component file (the graph skill's ds headers section) only after that OK, re-run `graph.mjs`, and check they show under rules with no header faults. Record the batch with `state.mjs decide`. `state.mjs set guard in_progress --note "rules on <n> primitives"`.
8. **Docs.** `node <project>/scripts/docs.mjs` writes `<project>/README.md`: the token set with every semantic token's meaning, the contrast pairs, how to change tokens, each component with its rule and props, and how to start a design. Show it. Write the hand-written part around the generated block with the user: who decides what (from `product.md` → Team), and anything the team wants a newcomer to know.
9. **End.** Tell the user, in a few lines: how many tokens per family and how many came from the code, how many primitives have rules, what changed in the codebase (token outputs, their imports, ds headers) and what stayed in `<project>/`. The next steps are the tidy phase (move raw values onto the new tokens, in batches) and the guard phase (`ds:check` in CI, which also keeps the README current). Follow the session protocol's End steps.

## Rules

- Values come from the repo, never from taste: its sources first, then what the code uses at least twice. Where a composite needs a part the code never states, say what was assumed and let the user decide.
- Nothing outside `<project>/` changes without the user's OK: not the token outputs, not the imports, not a ds header.
- Never rename or delete an existing CSS variable. Keep old names working through `cssVar` until tidy moves their consumers.
- A drafted description or usage rule is a proposal. Mark it as one until the user approves it.

Versions

RepositoryScoreLicence
This page · darioabc/massimo90MIT
alirezarezvani/claude-skills100MIT
sttsspjy/pptx-kit100MIT
actionbook/actionbook100Apache-2.0
filiphsps/commerce100MIT
akarachen/aghub100MIT
athola/claude-night-market100MIT
aladicf/better-web-ui100MIT
adobe/skills95Apache-2.0

Database snapshot: 13.11.2026 · package version 391bd4f48fe2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100design-md
    Extract a comprehensive design system (DESIGN.md) directly from frontend source code — React, Vue, Svelte, Angular, plain HTML/CSS, or any web framework. Analyzes component files, stylesheets, Tailwind configs, theme definitions, and design tokens to produce a rich,…
  • 90stitch::extract-design-md
    Extract a comprehensive design system (DESIGN.md) directly from frontend source code — React, Vue, Svelte, Angular, plain HTML/CSS, or any web framework. Analyzes component files, stylesheets, Tailwind configs, theme definitions, and design tokens to produce a rich,…
  • 82design-system
    Generate, extract or audit the project's design tokens: writes or lints .desk/DESIGN.md and exports CSS custom properties or a Tailwind theme. Use when a project needs its tokens made, pulled out of existing code, or checked for drift.
  • 100extract-design
    Extract the full design language from any website URL. Produces 8 output files including AI-optimized markdown, visual HTML preview, Tailwind config, React theme, shadcn/ui theme, Figma variables, W3C design tokens, and CSS variables. Also runs WCAG accessibility scoring. Use…
  • 100figma-design-system
    Builds and maintains a design system in Figma, then extracts and codifies it for code consumers. Invoked when the user says "build a design system in Figma", "create components in Figma", "extract design tokens", "extract Figma variables", "codify design system", "pull tokens…
  • 100tokens
    Audit the repo's styling for raw colours, sizes, spacing and fonts, then define design tokens with the user (primitives, semantic tokens, light and dark) in one W3C Design Tokens 2025.10 source that builds into the repo's own styling (CSS variables, Tailwind 4 or 3, SCSS, TS)…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.