design-extract
できること
このツールは、コードファイルや画像に散らばっている色、タイポグラフィ(書体や文字の組み方)、余白などのデザイン情報を集めて、ほかのプログラムが使えるように1か所にまとめます。
使う場面
- ✓デザイン要素があちこちに分散しているプロジェクトがあるとき。
- ✓あるプログラムから別のプログラムへデザインを移行するとき。
- ✓Webサイトやアプリケーションのビジュアルスタイルをまとめて整理したいとき。
スキルのリンク
https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/design-extract/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“コードと画像にあるデザイン要素を、1つのファイルにまとめて整理して。”
毎週5つの新しいスキル。1分で読めます。
仕組み
ツールは、CSSやJavaScriptなどのさまざまな種類のコードファイルと画像の中から、色、フォント、余白の定義を探します。見つけた情報を収集し、標準化された形式で保存します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Design extract
Spec §10 / §21.3.2: tokens scattered across a repo's CSS / theme
files / Tailwind config / styled-components helpers / SCSS partials
need to be lifted into one bag before token-map can crosswalk
them onto the active OD design system. This atom does the lifting;
the input shape is intentionally generic so the same atom serves
both code-migration and figma-migration when fed different sources.
Inputs
code/index.jsonfromcode-import(code-migration), ORfigma/tree.jsonfromfigma-extract(figma-migration), OR- A folder of screenshot images (tune-collab quick-tune flows).
Output
project-cwd/
└── code/
└── tokens.json # { colors[], typography[], spacing[], radius[], shadow[] }
Each token entry carries:
{
"kind": "color",
"name": "primary-500", // optional source name
"value": "#5b8def", // canonical value
"sources": ["styles/global.css:42", "tailwind.config.js:24"],
"usage": ["Header.tsx", "Footer.tsx"]
}
sources[] and usage[] are the audit trail token-map.unmatched.json
references when a target token can't be found.
Convergence
The atom completes when code/tokens.json exists. Empty token bags
emit a warning event but do not abort — token-map handles the
empty case by skipping its mapping pass.
Anti-patterns the prompt fragment forbids
- Hard-coded hex values inside JSX literals (
color: '#fff') are tokens for this atom's purposes; record them withkind:'color'and a synthetic name so they don't disappear into the noise. - Tailwind utility scans must dedupe palette references against the
active theme — never list
bg-blue-500andbg-blue-600as one token.
Status
Implemented by the daemon runner in
apps/daemon/src/plugins/atoms/design-extract.ts. It scans the indexed
source files, extracts CSS, Tailwind, and JavaScript token evidence, and
writes code/tokens.json.
よくある質問
「デザイントークン」とは何ですか?
プロジェクトの見た目を構成する基本的な要素のことです。使われている正確な色、フォントの種類、要素同士の間隔などを指します。
なぜこの「トークン」を整理することが重要なのですか?
トークンを整理すると、プロジェクト全体でデザインを管理しやすくなり、統一感を保ちやすくなります。また、ほかのツールがこの情報を効率よく使えるようになります。
どのような種類のファイルからでもデザインを抽出できますか?
一般的なコードファイル(CSS、JavaScript、Tailwindなど)と画像に対応するように設計されています。Figmaで作られた複雑なデザインなどの場合は、追加の手順が必要になることがあります。
詳細
作者による元の説明
Extract design tokens (color / typography / spacing) from imported source code, screenshots, or Figma exports into the canonical token bag token-map consumes.
repo: nexu-io/open-design
人気
- GitHubのスター
- 101k
- ランキング
- #981
- ライセンス
- Apache-2.0
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
sample-plugin
101kエージェントがテスト用のメタデータファイルを作成できるようにします。さまざまな状況でコードが正しく動作することを確認する助けになります。
aster-atelier
101kエージェントが、クラシックな雰囲気のアート系ウェブサイトを作成できるようにします。映画のような雰囲気を出すために、洗練された画像、青い空、セリフ体のフォントを使用します。
audio-jingle
101kエージェントがジングルや効果音などのオーディオを生成できるようにします。音楽や音声を作成し、その結果をオーディオファイルとして保存できます。
blog-post
101kエージェントが長文の記事やブログ記事を書けるようにします。画像、引用、著者情報を入れるスペースも含まれています。
似ているスキル
canvas
394k接続されたMacのパネルにホスト型のビジュアルウィジェットを表示し、そのパネルを隠したり別のページに移動したりするようエージェントを支援します。
control-ui
394kセッション、ダッシュボード、接続されたGatewayを含め、OpenClaw Control UIを整理し、問題を解決するようエージェントを支援します。
diagram-maker
394kプロセス、システムのアーキテクチャ、ホワイトボードのスケッチのために、SVG、HTML、または編集可能なExcalidrawとして、分かりやすい図を作るようエージェントを支援します。