agentleFS
southleftsouthleft/figma-console-mcp-skills/skills/figma-setup-design-tokens/SKILL.md

figma-setup-design-tokens

Skill83 starsChanged 6 months agoMITView on GitHub

Bootstrap a complete design-token system in Figma in one atomic step — create a variable collection, its modes (e.g. Light/Dark), and every variable with per-mode values together. Use when starting a token system from scratch: triggers 'set up design tokens in Figma', 'create a token collection with light and dark modes', 'scaffold variables', 'bootstrap a Figma theme'. Works on ANY Figma plan. For incremental edits to an existing system use figma-manage-variables; for syncing from a code tokens file use figma-import-tokens.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create a variable collection + modes + all variables in a single use_figma call.

    line 9
  2. Very specific:

    Two-tier systems: create *primitives* (raw values) with this skill, then create *semantic* tokens that alias them using figma-import-tokens …

    line 31
  3. Distinctive:

    Keep one bootstrap per collection.

    line 37

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

figma-setup-design-tokens — atomic token-system bootstrap

Create a variable collection + modes + all variables in a single use_figma call. This is the fastest way to stand up a new token system (or a new collection within one). Because it runs as one atomic script, either everything is created or nothing is (failed scripts apply no changes).

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).
  • Incremental CRUD / batch edits to an existing system → figma-manage-variables.
  • Sync from a code token file → figma-import-tokens.

Workflow

  1. Agree the v1 scope. List the collection name, the modes (first one is the default), and the full token set with per-mode values. Lock this before writing — it's much cheaper than editing afterward.
  2. Fill the constants in scripts/setup-tokens.js: COLLECTION_NAME, MODES, TOKENS (values keyed by mode name), and optional per-variable SCOPES.
  3. Run via use_figma (skillNames: "figma-setup-design-tokens"). It returns { collectionId, modes, created, errors }.
  4. Validate with get_variable_defs or the figma-export-tokens read script, then screenshot if you also created swatches.

Notes

  • Two-tier systems: create primitives (raw values) with this skill, then create semantic tokens that alias them using figma-import-tokens (which has the alias pass) or figma-manage-variables. Keep primitives single-mode and put theming on the semantic layer.
  • Set scopes: the default ALL_SCOPES clutters every property picker. Pass SCOPES for the surfaces each token belongs to (FRAME_FILL/SHAPE_FILL for backgrounds, TEXT_FILL for text, GAP for spacing, CORNER_RADIUS for radii, WIDTH_HEIGHT for sizing).
  • Keep one bootstrap per collection. Multiple collections = multiple runs.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.