token-map
यह क्या करती है
यह प्रोग्राम किसी डिज़ाइन के विज़ुअल स्टाइल (जैसे रंग और फ़ॉन्ट) को मौजूदा डिज़ाइन सिस्टम के साथ सही तरीके से मिलाने में मदद करता है। यह आपके डिज़ाइन के स्टाइल की तुलना डिज़ाइन सिस्टम में तय स्टाइल से करता है और एक मैप बनाता है, ताकि सब कुछ एक जैसा रहे।
कब इस्तेमाल करें
- ✓जब किसी डिज़ाइन को Figma से कोड में ले जाना हो।
- ✓जब किसी मौजूदा डिज़ाइन को नए डिज़ाइन सिस्टम के हिसाब से अपडेट करना हो।
- ✓जब आप चाहते हों कि डिज़ाइन और डिज़ाइन सिस्टम के सभी विज़ुअल स्टाइल (रंग, फ़ॉन्ट, स्पेसिंग) एक जैसे हों।
Skill का लिंक
https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/token-map/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“कृपया मेरे डिज़ाइन के कलर और टाइपोग्राफ़ी टोकन को एक्टिव डिज़ाइन सिस्टम से मैप करो।”
हर हफ़्ते 5 नई skills, 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
…
अक्सर पूछे जाने वाले सवाल
'tokens' क्या होते हैं?
टोकन डिज़ाइन के विज़ुअल स्टाइल की बुनियादी इकाइयाँ हैं, जैसे कोई खास रंग (जैसे नीला #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
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
sample-plugin
101kआपके एजेंट से टेस्ट के लिए metadata file बनवाता है। इससे पक्का होता है कि कोड अलग-अलग स्थितियों में सही चलता है।
aster-atelier
101kआपके एजेंट से क्लासिक लुक वाली एक कलात्मक website बनवाता है। इसमें खूबसूरत इमेज, नीला आसमान और serif fonts इस्तेमाल होते हैं, जिससे सिनेमाई एहसास मिलता है।
audio-jingle
101kआपके एजेंट से जिंगल्स और sound effects जैसा audio बनवाता है। यह music और voice बना सकता है और नतीजा audio file में सेव करता है।
blog-post
101kआपका एजेंट लंबे articles या blog posts लिखने में मदद करता है। इसमें images, quotes और author की जानकारी के लिए जगह भी होती है।
मिलती-जुलती skills
canvas
394kयह आपके एजेंट को जुड़े Mac पैनल पर होस्टेड विज़ुअल विजेट दिखाने, पैनल छिपाने या उसे दूसरे पेज पर ले जाने देती है।
control-ui
394kयह आपके एजेंट को OpenClaw Control UI को व्यवस्थित करने और उसमें आने वाली दिक्कतें सुलझाने में मदद करती है, जिसमें सेशन, डैशबोर्ड और जुड़े Gateway शामिल हैं।
diagram-maker
394kयह आपके एजेंट को प्रक्रियाओं, सिस्टम आर्किटेक्चर और व्हाइटबोर्ड स्केच के लिए SVG, HTML या संपादन योग्य Excalidraw फ़ाइलों में साफ़ डायग्राम बनाने में मदद करती है।