Communitygithub.com

plugin87/token-build

Configure ou execute o pipeline de build de tokens — transforme os tokens DTCG `tokens/*.json` (fonte da verdade) em artefatos de plataforma (variáveis CSS, `@theme` do Tailwind, JS/TS, Asset Catalog iOS, Android, Compose) com Style Dictionary / Tokens Studio / exportação W3C DTCG. Use quando o usuário quiser gerar arquivos de tema de plataforma a partir de tokens, configurar CI de tokens ou saída de tokens multiplataforma.

O que é token-build?

Esta skill automatiza o processo de transformar tokens de design no formato DTCG (Design Tokens Community Group) em artefatos prontos para múltiplas plataformas, como CSS, Tailwind, JavaScript/TypeScript, iOS e Android. Ela é extremamente útil para equipes de design e desenvolvimento que desejam manter uma única fonte da verdade para tokens (cores, espaçamentos, tipografia) e gerar automaticamente os arquivos de tema correspondentes para cada plataforma, eliminando inconsistências manuais. A skill suporta ferramentas como Style Dictionary (padrão), Tokens Studio (para integração com Figma) e exportadores W3C DTCG, além de scripts personalizados. O pipeline inclui validação de aliases, geração de variações (modo escuro, marcas, densidade) como deltas, e integração com CI para garantir que os artefatos comissionados estejam sempre atualizados quando os tokens de origem mudarem.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/token-build

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Skill: Token Build

Transforme a fonte da verdade dos tokens DTCG em saídas prontas para plataforma. Os tokens são escritos uma vez; cada saída de plataforma é gerada.

Etapas

  1. Leia workflows/token-build.md (arquitetura, opções de ferramentas, regras de resolução, alvos de saída, CI).
  2. Escolha a ferramenta: Style Dictionary (multiplataforma, o padrão), Tokens Studio (tokens do Figma — combina com figma-integration), exportação W3C DTCG ou um script personalizado pequeno (modelo em scripts/validate_tokens.py).
  3. Respeite as regras de resolução: resolva aliases para valores finais por plataforma; exponha tokens semânticos e de componente (primitivos permanecem internos); emita base + sobreposições de escuro/marca/densidade (tokens/theming.json) apenas como deltas; formate por $type.
  4. Gere o(s) alvo(s) solicitado(s): variáveis CSS :root, @theme do Tailwind v4, JS/TS tipado, Asset Catalog iOS + Color.DS/Spacing, colors.xml do Android/tema Compose.
  5. Configure CI: em alteração de tokens/*.json, execute scripts/validate_tokens.py, regenere, falhe se artefatos comissionados estiverem desatualizados; bloqueie cores com scripts/contrast.py.

Verificação (definição de pronto)

  • python3 scripts/validate_tokens.py passa (sem aliases não resolvidos).
  • Regenerar não produz diff em relação aos artefatos comissionados.
  • Saídas de escuro/marca/densidade contêm apenas deltas, não duplicatas completas.

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

plugin87/design-tokens

Generate, extend, or audit design tokens in DTCG format with the 3-tier architecture (primitive → semantic → component). Use when the user wants a color palette, type scale, spacing/shadow/radius/motion tokens, multi-brand theming, or wants to validate token files. Covers colors, typography, spacing, shadows, borders, breakpoints, motion, gradients, opacity, blur, sizing, states, theming.

plugin87/governance

Govern how the design system evolves — SemVer for tokens/components, the contribution workflow, deprecation policy, and change communication. Use when the user wants to add/promote/deprecate a component or token, decide a version bump, set up a contribution process, or keep the system from fragmenting.

plugin87/image-to-code

Turn a reference image, screenshot, or mockup into token-driven, accessible code — infer the design system from the reference (palette, type scale, spacing, radius, layout archetype), map it to the 3-tier tokens, rebuild it, then verify with the kit's gates. Use when the user provides a design/screenshot and wants matching UI code.

plugin87/performance

Optimize UI performance against Core Web Vitals — LCP, INP, CLS — with loading/code-split strategy, layout-shift prevention, and animation performance rules. Use when the user wants to improve speed, fix jank or layout shift, hit Web Vitals budgets, or make a UI feel fast on low-end devices.

plugin87/prototype

Move an idea up the fidelity ladder (content-first → wireframe → low-fi → high-fi → code) with a validation plan at each level, plus user-journey mapping and usability-testing scripts. Use when the user wants to prototype, wireframe, map a user flow, or plan/run usability testing.

plugin87/redesign

Upgrade an existing website or app to premium quality without breaking functionality — audit the current design, identify generic/AI tells, then apply taste and system rules surgically. Use when the user wants to improve, modernize, polish, or "make better" an existing UI/codebase.

plugin87/ux-writing

Write or review UI copy — buttons, errors, empty states, microcopy, notifications, labels — using the voice & tone system (clear, concise, useful, human, honest) with the what→why→how error formula and inclusive-language rules. Use when the user needs interface copy, error messages, empty-state text, or a copy review.

Habilidades Relacionadas