export-tokens-figma

export-tokens-figma is a skill for Claude Code from southleft/skills-for-figma. It costs 146 tokens per session (1,242 once invoked), scanned A, a copy of figma-export-tokens, MIT.

A tool for exporting Figma variables, reusable design values such as colors and spacing, into files used by code.

In plain words
What is it for?
It exports variables as design tokens or as CSS, Tailwind, SCSS, TypeScript, JSON, Style Dictionary, and Tokens Studio files.
Why use it?
It keeps design values available in formats developers can consume instead of requiring them to copy values manually from Figma.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions Claude Code; mentions Codex; mentions Gemini CLI.

Part of the skills-for-figma plugin — 18 skills shipped together

Good fit It exports variables as design tokens or as CSS, Tailwind, SCSS, TypeScript, JSON, Style Dictionary, and Tokens Studio files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/southleft/skills-for-figma/export-tokens-figma
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add southleft/skills-for-figma --skill export-tokens-figma
Clone the repo
git clone --depth 1 https://github.com/southleft/skills-for-figma

Made for: Claude Code.

Or install skills-for-figma, the plugin that ships this one along with the rest of its 18 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for export-tokens-figma

README.md
[![agentmods](https://agentmods.dev/badge/skills/southleft/skills-for-figma/export-tokens-figma/github.svg)](https://agentmods.dev/skills/southleft/skills-for-figma/export-tokens-figma)
Your own site
<a href="https://agentmods.dev/skills/southleft/skills-for-figma/export-tokens-figma"><img src="https://agentmods.dev/badge/skills/southleft/skills-for-figma/export-tokens-figma/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for export-tokens-figma

Your own site · 80×15
<a href="https://agentmods.dev/skills/southleft/skills-for-figma/export-tokens-figma"><img src="https://agentmods.dev/badge/skills/southleft/skills-for-figma/export-tokens-figma.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,242 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00146 $0.01242
Opus 5.5 $0.00058 $0.00497
Sonnet 5.5 $0.00029 $0.00248
Haiku 4.5 $0.00015 $0.00124

Measured 2mo ago against content hash 6b7d7238dd63, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

export-tokens-figma scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/convert-tokens.mjs, scripts/read-variables.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

89% identical to figma-export-tokens — 10 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/export-tokens-figma/SKILL.md · 62 lines

How it starts

The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.

export-tokens-figma — Figma variables → design tokens

Read every local variable in a Figma file and emit design-token files. The canonical output is DTCG (W3C Design Tokens Community Group JSON); CSS, Tailwind, SCSS, TS, and JSON derive from it.

Why this beats a raw REST export: Figma's Variables REST API is Enterprise-only (403 on Starter/Pro/Org). This skill reads through the Plugin API via use_figma, so it works on every plan and resolves aliases + multi-mode values that get_variable_defs (default mode only) drops.

Skill boundaries

  • use_figma rules — load the official figma-use skill first; it is the full Figma Plugin API reference. Essentials these scripts rely on: plain JS with top-level await + return (no IIFE, no figma.closePlugin(); console.log is not returned), inputs inlined as const at the top of each script, colors in 0–1 range, load fonts before any text op, await figma.getNodeByIdAsync(...), and atomic errors (a failed script applies nothing — read the error, fix, retry).
  • Reverse direction (code → Figma variables) → use the import-tokens-figma skill.

Workflow

  1. Confirm scope & format. Ask (or infer) the target format (dtcg is the safe default), whether to split by mode/collection, and the output path. Get the file key from the active Figma file or a URL the user provides.
  2. Read the variables. Run scripts/read-variables.js via use_figma (skillNames: "export-tokens-figma"). It returns the normalized collections/modes/variables tree with hex colors, resolved alias references, scopes, and code syntax.
  3. Save the read output to a file, e.g. variables.json.
  4. Convert — deterministically. Run the bundled converter (Node 18+, zero dependencies). Do not hand-write the conversion — this script is the source of truth and produces identical output every run:
    node scripts/convert-tokens.mjs variables.json --format dtcg --out tokens/
    # --format: dtcg (default) | css-vars | tailwind-v4 | tailwind-v3 | scss | ts-module
    #           | json-flat | json-nested | style-dictionary-v3 | tokens-studio
    #           (aliases: css, tailwind, ts)
    # --out <dir>  write file(s) — tokens-studio writes several; omit to print to stdout
    # --prefix <p>            prefix CSS/SCSS var names
    # --modes Light,Dark      include only these modes (default: all)
    # --collection <substr>   include only collections whose name contains <substr>
    
    This matches the Console figma_export_tokens formatters. It handles exactly what freehand conversion gets wrong: per-type units (opacity/line-height unitless, spacing/radius px); multi-mode output (CSS & Tailwind v4 emit :root + .dark/[data-theme]; TS/JSON emit {mode: value}; SCSS suffixes modes; DTCG keeps them in $extensions); aliases → var()/{ref}; font-weight names → numbers; DTCG round-trip metadata; and it warns on slug collisions and non-numeric weights. (style-dictionary-v3 and tailwind-v3 use the primary mode, matching the Console — those formats have no native multi-mode encoding.)
  5. Report. Surface the written path(s) and any warnings the converter printed (collisions / weight issues are real findings about the Figma file, worth flagging to the user).

Read the full file on GitHub · 62 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 62 lines · 146 tokens per session scan A 6b7d7238dd63

Subscribe to this mod's changes

export-tokens-figma is a skill published in the GitHub repository southleft/skills-for-figma (20 stars, last pushed 5mo ago), licensed MIT. It adds 146 tokens to every session and 1,242 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to figma-export-tokens, differing in 10 lines, and is treated as a copy.

Related

export-tokens-figma compared with skills from other repositories

export-tokens-figma next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
export-tokens-figmasouthleft/skills-for-figmaSkill205mo agoMITA146Claude Code
token-auditmurphytrueman/design-system-opsSkill2151mo agoMITA72Claude Code
accessibility-per-componentmurphytrueman/design-system-opsSkill2151mo agoMITA68Claude Code
component-decision-treemurphytrueman/design-system-opsSkill2151mo agoMITA65Claude Code
figma-variable-auditmurphytrueman/design-system-opsSkill2151mo agoMITA63Claude Code
metadata-schema-generatormurphytrueman/design-system-opsSkill2151mo agoMITA62Claude Code
theme-auditmurphytrueman/design-system-opsSkill2151mo agoMITA57Claude Code