token-map
하는 일
디자인의 시각 스타일(색, 글꼴 등)을 기존 디자인 시스템과 잘 맞도록 정리하는 프로그램입니다. 디자인의 스타일을 디자인 시스템에 정의된 스타일과 비교하고, 모든 것이 일관되게 맞도록 지도를 만듭니다.
사용하는 경우
- ✓Figma에서 코드로 디자인을 옮길 때.
- ✓기존 디자인을 새 디자인 시스템을 쓰도록 업데이트할 때.
- ✓디자인과 디자인 시스템 사이에서 모든 시각 스타일(색, 글꼴, 간격)이 일관되도록 하고 싶을 때.
스킬 링크
https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/token-map/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 디자인의 색과 타이포그래피 토큰을 활성 디자인 시스템에 매핑해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
프로그램은 Figma나 코드에서 추출한 디자인의 시각 스타일(토큰)을 분석합니다. 사용 방식을 바탕으로 각 스타일의 목적(예: 기본 색이나 제목)을 추측합니다. 그다음 디자인의 각 스타일이 디자인 시스템의 어떤 스타일에 대응하는지 보여 주는 파일을 만듭니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Token map
Spec §10 / §21.3.1: every figma-migration / code-migration run crosses the same boundary — "the source has its own tokens; the target uses the active OD design system; we need a deterministic mapping". This atom produces that mapping.
Inputs
figma/tokens.jsonfromfigma-extract(figma-migration), ORcode/tokens.jsonfromdesign-extract(code-migration).- The active design system DESIGN.md (already injected into the prompt; the atom reads from the staged design-system context).
Output
project-cwd/
└── token-map/
├── colors.json # { source: '#hex' | 'tokenName', target: '--ds-token' }[]
├── typography.json # font + size + weight pairings
├── spacing.json # spacing scale crosswalk
├── unmatched.json # { source: ..., reason: 'no-target-equivalent' }[]
└── meta.json # { sourceKind: 'figma' | 'code', generatedAt, atomDigest }
unmatched.json is the audit list a human reviews; the agent must
not invent target tokens silently.
Semantic token inference
Figma often exports anonymous source names such as color-3,
paint/17, or raw #5B8DEF. Do not ask the user to rename those
before mapping. First infer the semantic role from usage evidence:
- Node path, component name, instance overrides, variant/state labels,
frame name, layer name, and nearby text such as
Primary,Selected,Link,Error,Focus,Nav,Button, orCTA. - CSS-like position in the rendered tree: background fill, foreground text/icon, border, divider, overlay, shadow tint, focus ring, status badge, chart series, or brand/accent treatment.
- Contrast relationships: a color paired repeatedly with the main canvas is likely foreground; one paired with foreground inside CTA components is likely primary/accent background; a thin outline around interactive elements is likely border or focus-ring.
- Reuse topology: a value that appears across primary buttons,
selected tabs, and active nav items is stronger evidence for
--ds-color-primarythan a value that appears once in an illustration.
Use that role evidence to choose among existing active design-system
tokens and to decide whether an anonymous token should be renamed or
left unmatched before the executable mapping pass. Keep the on-disk
token-map contract unchanged: the atom still writes the existing bucket
files, unmatched.json, and meta.json only.
For example, this is a useful reasoning note for deciding whether
color-3 should map to the active primary token:
{
"source": "color-3",
"value": "#5B8DEF",
"role": "primary",
"targetCandidates": ["--ds-color-primary", "--ds-color-link"],
"evidence": [
"Button/Primary fill",
"Selected tab indicator",
"Link text in Settings frame"
]
}
Then map to an active design-system token only when the evidence is
role-based, not value-only. If the top candidates are too close to
call, or if the evidence points to conflicting roles (primary vs
link vs focus-ring), leave the source token unmatched using the
existing no-target-equivalent reason and include the competing
candidates in the hint. This keeps automation useful for common
anonymous-token cases while preserving human review for ambiguous
brand decisions.
Before / after expectation
Without semantic inference, an anonymous Figma token can only produce an uncertain value-level mapping:
{
"source": "color-3",
"value": "#5B8DEF",
"target": null,
"reason": "no-target-equivalent"
}
With semantic inference, the same token should carry role evidence before it is accepted:
{
"source": "color-3",
"value": "#5B8DEF",
"target": "--ds-color-primary",
"via": "name"
}
This deterministic v1 atom does not claim a measured accuracy lift by
itself. Treat the expected improvement as coverage of previously
manual anonymous-token cases when the Figma tree contains enough role
evidence. Real accuracy numbers require a fixture suite with known
source tokens, expected semantic roles, and a before/after agent run.
See examples/semantic-inference-before-after.json for a deterministic
same-token-batch simulation that compares the old value-level output
with the semantic inference output.
Convergence
The atom completes when every input token is either mapped or
explicitly recorded under unmatched.json with a non-empty
reason. The until evaluator reads tokens.unmatched.length === 0
…
자주 묻는 질문
'토큰'은 무엇인가요?
디자인 시각 스타일의 기본 구성 요소로, 특정 색(예: 파란색 #0000FF), 글꼴 크기(예: 16px), 간격 값(예: 8px) 등이 있습니다.
디자인 시스템에 대응하는 것이 없는 스타일은 어떻게 되나요?
프로그램은 이런 스타일을 'unmatched.json'이라는 파일에 나열하고, 매핑하지 못한 이유를 설명합니다. 임의로 만들어 내지 않고, 사용자가 직접 검토하고 결정할 수 있게 합니다.
프로그램은 어떤 스타일이 어떤 것과 맞는지 어떻게 아나요?
구성 요소 이름, 스타일이 쓰인 맥락(예: 버튼 텍스트), 색의 관계 같은 단서를 사용해 스타일의 목적을 추론하고, 디자인 시스템에서 가장 알맞은 것을 찾습니다.
상세 정보
작성자의 원본 설명
Map an extracted Figma / source-code token bag onto the active OD design system, producing a deterministic mapping the generate stage can consume.
repo: nexu-io/open-design
인기도
- GitHub 스타
- 101k
- 순위
- #990
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
sample-plugin
101k에이전트가 테스트용 메타데이터 파일을 만들도록 합니다. 코드가 다양한 상황에서 올바르게 작동하도록 돕습니다.
aster-atelier
101k클래식한 느낌의 예술 웹사이트를 만들도록 에이전트를 돕습니다. 우아한 이미지, 푸른 하늘, 세리프 글꼴로 영화 같은 분위기를 냅니다.
audio-jingle
101k징글(jingle)과 효과음 같은 오디오를 에이전트가 생성하도록 합니다. 음악과 음성을 만들고 결과를 오디오 파일로 저장할 수 있습니다.
blog-post
101k긴 기사나 블로그 글을 쓰도록 에이전트를 돕습니다. 이미지, 인용문, 작성자 정보를 넣을 공간이 포함됩니다.
비슷한 스킬
canvas
394k에이전트가 연결된 Mac 패널에 호스팅된 시각적 위젯을 띄우고, 패널을 숨기거나 다른 페이지로 옮기도록 돕습니다.
control-ui
394k에이전트가 세션, 대시보드, 연결된 Gateway를 포함해 OpenClaw Control UI를 정리하고 문제를 해결하도록 돕습니다.
diagram-maker
394k에이전트가 프로세스, 시스템 구조, 화이트보드 스케치를 위해 SVG, HTML, 편집 가능한 Excalidraw 파일로 명확한 다이어그램을 만들도록 돕습니다.