Saltar al contenido
Skillpedia
Interfaces (UI/UX)101 mil · #990

token-map

Qué hace

Este programa ayuda a organizar los estilos visuales de un diseño (como colores y tipografías) para que funcionen bien con un sistema de diseño existente. Compara los estilos de tu diseño con los que están definidos en el sistema de diseño y crea un mapa para asegurar que todo coincida de forma coherente.

Cuándo usarla

  • ✓Cuando pasas un diseño de Figma a código.
  • ✓Cuando actualizas un diseño existente para usar un nuevo sistema de diseño.
  • ✓Cuando quieres asegurarte de que todos los estilos visuales (colores, fuentes, espaciados) sean coherentes entre el diseño y el sistema de diseño.

Link de la skill

https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/token-map/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/token-map/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Por favor, asigna los tokens de color y tipografía de mi diseño al sistema de diseño activo.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El programa analiza los estilos visuales (tokens) de tu diseño, extraídos de Figma o del código. Intenta deducir la función de cada estilo (por ejemplo, si es un color principal o un título) según cómo se usa en el diseño. Después, crea un archivo que muestra cómo cada estilo de tu diseño corresponde a un estilo del sistema de diseño.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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

…

Preguntas frecuentes

¿Qué son los 'tokens'?

Los tokens son los bloques básicos de los estilos visuales de un diseño, como un color concreto (por ejemplo, azul #0000FF), un tamaño de fuente (por ejemplo, 16px) o un valor de espaciado (por ejemplo, 8px).

¿Qué pasa si un estilo de mi diseño no tiene equivalente en el sistema de diseño?

El programa enumera estos estilos en un archivo llamado 'unmatched.json', explicando por qué no se pudieron asignar. Así puedes revisarlos y decidir tú qué hacer con ellos, en lugar de que el programa invente algo.

¿Cómo sabe el programa qué estilo de mi diseño coincide con cuál del sistema de diseño?

Usa pistas del diseño, como los nombres de los componentes, el contexto en el que se usa cada estilo (por ejemplo, el texto de un botón) y las relaciones entre colores, para deducir la función del estilo y encontrar la mejor coincidencia en el sistema de diseño.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
101 mil
Posición en el ranking
#990
Licencia
Apache-2.0
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas