brand-extraction
БесплатноБез исполняемых скриптовНе проверенExtract a design system from a live website or a screenshot — colours, typography, scale, radii, spacing, shadows, logo — and deliver DESIGN.md, tokens.css…
от juspay★ 837 звёзд на GitHubОб этом скилле
Brand extraction
Produce a design system from a source someone already has. You are reading an existing brand, not designing one. Measure what is there; never improve it.
Deliver exactly three files, plus assets:
| File | Purpose |
|---|---|
DESIGN.md |
The prose contract. Injected verbatim into later /design runs. |
tokens.css |
Custom properties under :root. |
brand.json |
Structured summary. Renders the review card. |
Assets: logo.*, favicon.*, screenshot-desktop.png, screenshot-mobile.png.
From a URL
Measure computed styles. Do not read colours off a screenshot — anti-aliasing and image compression shift them, and a hex that is one digit out produces a system that looks subtly wrong everywhere it is used.
sandbox-pw-navigateto the URL.sandbox-pw-wait-forthe page to settle so webfonts have swapped — reading before that yields the fallback stack.sandbox-pw-evaluateto walk the rendered DOM and tally real values:// Count every colour actually painted, with the element it came from. const tally = new Map(); const bump = (map, key, el) => { const e = map.get(key) ?? { n: 0, tags: new Set() }; e.n += 1; e.tags.add(el.tagName.toLowerCase()); map.set(key, e); }; for (const el of document.querySelectorAll('body *')) { const cs = getComputedStyle(el); const rect = el.getBoundingClientRect(); if (!rect.width || !rect.height) continue; // skip hidden nodes bump(tally, `color|${cs.color}`, el); if (cs.backgroundColor !== 'rgba(0, 0, 0, 0)') bump(tally, `bg|${cs.backgroundColor}`, el); if (cs.borderTopWidth !== '0px') bump(tally, `border|${cs.borderTopColor}`, el); }Gather the same way:
fontFamily,fontSize,fontWeight,lineHeight,letterSpacing,borderRadius,boxShadow, and the margin/padding values that repeat.Skip invisible nodes (zero-area,
display:none,visibility:hidden) — they carry inherited defaults that are not part of the brand and will otherwise dominate the tally.Assign roles from usage, not from appearance:
background— the colour behind the largest painted areatext— thecolorof the most body copyprimary— the colour of primary buttons and linksborder,surface,muted— as measured Leave a role out rather than guessing it.
Derive the type scale from headings actually present (
h1…h6) plus body. Record measured px, not a theoretical ratio.Capture the logo (
header img,[class*=logo], or an inlinesvgin the header) and the favicon fromlink[rel~=icon]. Capturescreenshot-desktop.pngat 1440px wide andscreenshot-mobile.pngat 390px.Follow redirects and record the URL you actually landed on in
sourceUrl.
From a screenshot
With no URL, derive the same fields from the attached image. You cannot count
occurrences, so omit occurrences rather than inventing a number, and add a
gap: "colour frequency unavailable — derived from a screenshot".
Read colours from large flat regions, not from edges or gradients. State
sizes in px relative to the image's own scale and note that in gaps when the
device pixel ratio is unknown.
Admitting gaps
brand.json has a gaps array. Use it. Every entry is more useful than a
confident invention, because a wrong token is silently wrong in every artifact
built from it afterwards.
Record a gap when: no webfont file is served, shadows are absent, the logo cannot be isolated, the page is behind auth or a consent wall, or the spacing shows no discernible rhythm.
If the page cannot be reached at all — DNS failure, 403, a consent wall you cannot dismiss — say so plainly and deliver nothing. Do not produce a system from the error page.
Output contract
brand.json must satisfy BrandSummary in
packages/xyne-claw-shared/src/brand-extraction.ts. The card validates it and
refuses a payload that does not match, so check before delivering:
versionis1colors[].hexis#RRGGBB, uppercase, six digits — convertrgb()and drop alphacolors[].roleis one ofprimary,accent,background,surface,text,muted,border,success,warning,dangercolors[].tokenmatches the custom property intokens.csswithout--fonts[].roleisheading,bodyormonotypeScale[]entries carrynameand numericsizePx
tokens.css defines every colors[].token under :root as --<token>, plus
type, radii, spacing and shadow values. Name by purpose, not by appearance:
--brand-primary, not --blue-600.
DESIGN.md states the rules a later /design run must follow — palette and
when each colour applies, typefaces and the scale, radii, spacing rhythm,
elevation. Write it as binding instructions, not as a description of the site.
Keep it under 32,000 characters: the runtime drops a larger system silently.
Only ever write your own visual rules into DESIGN.md. The
Установить brand-extraction в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл brand-extraction?
Extract a design system from a live website or a screenshot — colours, typography, scale, radii, spacing, shadows, logo — and deliver DESIGN.md, tokens.css and brand.json for review.
Как установить скилл brand-extraction?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл brand-extraction запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic