design-extract is a command-line tool that examines live websites with a headless browser and turns their visual and interaction rules into design-system files. It is used by developers and designers to extract tokens, component details, responsive behavior, accessibility findings, and platform-specific outputs, while the catalogue commands, skills, plugin, and rule expose that process to coding agents.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/manavarya09/design-extract/theme-swapgit clone --depth 1 https://github.com/Manavarya09/design-extractWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/manavarya09/design-extract/theme-swap)<a href="https://agentmods.dev/commands/manavarya09/design-extract/theme-swap"><img src="https://agentmods.dev/badge/commands/manavarya09/design-extract/theme-swap.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00059 | $0.00566 |
| Opus 5 | $0.00030 | $0.00283 |
| Sonnet 5 | $0.00012 | $0.00113 |
| Haiku 4.5 | $0.00006 | $0.00057 |
Grade A, and why
theme-swap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Take any extracted site and swap its brand primary to the user-provided hex. The whole palette rotates around that hue while neutrals and structural tokens stay put.
npx designlang theme-swap $ARGUMENTS
If $ARGUMENTS doesn't contain both a URL and --primary <hex>, ask the user for the missing piece.
After the run completes, all output goes to ./design-extract-output/:
*.themeswap.html— editorial side-by-side preview (open this)*.themeswap.md— markdown diff table*.themeswap.json— structured before→after deltas*.themeswap.tokens.json— recoloured DTCG token set you can drop into a project
After the command finishes:
- Read
*.themeswap.mdto summarise the swap (from → to, hue shift, count of changed colours). - Show the user the verdict line ("X colours changed, neutrals preserved, type/spacing/motion untouched").
- Offer to open the HTML preview (
--opendoes this automatically). - Suggest the recoloured token files as drop-ins for an existing Tailwind / shadcn project.
Useful flags
| Flag | Effect |
|---|---|
--primary <hex> |
required. Target brand colour (e.g. "#ff4800"). |
--from <hex> |
Override the auto-detected source primary when the extractor misclassifies (e.g. a neutral got promoted by usage count). |
--format html|md|json|tokens|all |
Pick the output(s). Default all. |
--out <dir> |
Output directory. Default ./design-extract-output. |
--open |
Open the HTML preview in your default browser. |
Pairs nicely with
/grade <url>— grade the recoloured site by feeding the same target through/extractthen/grade./pack <url>— bundle the recoloured tokens as a downloadable design-system folder./remix <url> --as <vocab>— full vocabulary swap (brutalist, art-deco, cyberpunk…) instead of just brand colour.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 43 lines · 59 tokens per session scan A c41b45006bac
theme-swap is a command published in the GitHub repository Manavarya09/design-extract (4,048 stars, last pushed 5d ago), licensed MIT. It adds 59 tokens to every session and 566 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
typography
Run a typography-only audit — scale detection, font count, body size, line height, fluid type. Scoped variant of /ui-ux-suite:audit.
full-diagnostic
Comprehensive design system health sweep.
dashboard-layout
Design and build a complete dashboard layout — sidebar navigation, KPI cards, chart areas, data tables, filter bar, and responsive behavior. Outputs production-ready HTML/CSS.
design-system
Generate design tokens, theme configuration, or extract a design system from existing code or Figma files.
figma-sync
Detect drift between Figma designs and code implementation — compare tokens, spacing, colors, typography, and component structure.
describe-component
Generate an AI-optimised component description.