본문으로 건너뛰기
Skillpedia
인터페이스 (UI/UX)101k · #990

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/token-map/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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.json from figma-extract (figma-migration), OR
  • code/tokens.json from design-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, or CTA.
  • 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-primary than 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬