Communitygithub.com

plugin87/design-tokens

DTCG形式のデザイントークンを生成、拡張、監査するスキル。カラーパレット、タイプスケール、スペーシング、シャドウ、マルチブランドテーマなどを3階層アーキテクチャ(プリミティブ→セマンティック→コンポーネント)で管理します。

design-tokens とは?

このスキルは、DTCG(`$type`/`$value`)形式のデザイントークンを3階層システム(プリミティブ→セマンティック→コンポーネント)に従って生成、拡張、監査するためのものです。カラーパレット、タイポグラフィ、スペーシング、シャドウ、ボーダー、ブレークポイント、モーション、グラデーション、オパシティ、ブラー、サイジング、ステート、テーマなど、あらゆるトークンカテゴリをカバーします。CLIツールとして、Claude Code、Cursor、Codexなど主要なAIエージェントプラットフォームで利用可能で、事前定義されたルールファイル(`tokens-and-color.md`、`typography-and-spacing.md`)から4pxベース、Major Thirdスケール、OKLCHカラーパレット生成、ダークモードセマンティックレイヤーといったルールを読み込みます。また、コントラスト比検証(`a11y-audit`スキル/`scripts/contrast.py`)やJSONバリデーション(`scripts/validate_tokens.py`)による自動チェックを実行し、アクセシビリティと整合性を担保します。出力は常にDTCG JSONで、各トークンに`$description`を保持し、エイリアス参照を多用してハードコードを避ける設計思想を持っています。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/plugin87/ux-ui-agent-skills/tree/main/.claude/skills/design-tokens

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

スキル: デザイントークン

プロジェクトの3階層システムに従って、DTCG($type/$value)トークンを生成・保守します。

手順

  1. .claude/rules/tokens-and-color.md → 「トークンシステム」+「カラーガイドライン」と.claude/rules/typography-and-spacing.mdのルール(4pxベース、Major Thirdスケール、OKLCHパレット生成、セマンティックレイヤーでのダークモード)を読み込む。
  2. tokens/ 内の関連する既存ファイルを読み込んで構造に合わせる:colors.json、typography.json、spacing.json、shadows.json、borders.json、breakpoints.json、motion.json、gradients.json、opacity.json、blur.json、sizing.json、states.json、theming.json。
  3. トークンの生成/拡張:
    • プリミティブ = 生の値(直接使用しない)。セマンティック = 目的のエイリアス。コンポーネント = コンポーネントスコープ。
    • 新しいパレット:11段階のOKLCHシェードを生成。500番が白色上で4.5:1以上(テキスト)、600番が3:1以上(UI)であることをa11y-auditスキル / scripts/contrast.pyを使って検証する。
    • マルチブランド/密度 → theming.json。
  4. 検証:python3 scripts/validate_tokens.pyを実行(JSONの妥当性+エイリアス解決)。

出力

DTCG JSON。すべてのトークンに$descriptionを保持する。参照(エイリアス)を使用し、ハードコードしない。

Individual skills in this repo

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

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/token-build

Set up or run the token build pipeline — transform the DTCG tokens/*.json (source of truth) into platform artifacts (CSS variables, Tailwind @theme, JS/TS, iOS Asset Catalog, Android, Compose) with Style Dictionary / Tokens Studio / W3C DTCG export. Use when the user wants to generate platform theme files from tokens, wire token CI, or multi-platform token output.

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.

関連スキル