figma-sync

figma-sync is a command for coding agents from Adityaraj0421/naksha-studio. It costs 23 tokens per session (2,105 once invoked), scanned A, original, MIT.

A comparison command for checking whether a Figma design still matches its code implementation. It examines design tokens, which are shared values such as colors, spacing, and typography settings.

In plain words
What is it for?
Use it to compare Figma colors, spacing, typography, tokens, and components with projects using CSS, Tailwind, React, Vue, Svelte, or Next.js.
Why use it?
It helps find design drift—the gradual difference between what was designed and what the code currently displays. It checks visual values and component structure across the design and codebase.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the naksha-studio plugin — 47 commands, 7 agents shipped together

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.

agentmods
npx agentmods add commands/adityaraj0421/naksha-studio/figma-sync
Clone the repo
git clone --depth 1 https://github.com/Adityaraj0421/naksha-studio

Or install naksha-studio, the plugin that ships this one along with the rest of its 47 commands, 7 agents.

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 figma-sync

README.md
[![agentmods](https://agentmods.dev/badge/commands/adityaraj0421/naksha-studio/figma-sync.svg)](https://agentmods.dev/commands/adityaraj0421/naksha-studio/figma-sync)
Your own site
<a href="https://agentmods.dev/commands/adityaraj0421/naksha-studio/figma-sync"><img src="https://agentmods.dev/badge/commands/adityaraj0421/naksha-studio/figma-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00023 $0.02105
Opus 5 $0.00012 $0.01052
Sonnet 5 $0.00005 $0.00421
Haiku 4.5 $0.00002 $0.00211

Measured 5d ago against content hash 1ae39c8e58bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

figma-sync 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 5d ago.

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.

commands/figma-sync.md · 271 lines

How it starts

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

/figma-sync

You are performing a design-code sync check — comparing a Figma file's design tokens, components, and visual properties against the codebase to detect drift.

Input: $ARGUMENTS

Read ${CLAUDE_PLUGIN_ROOT}/skills/design/references/figma-creation.md for Figma API patterns and ${CLAUDE_PLUGIN_ROOT}/skills/design/references/design-system-lead.md for token architecture.

Process

1. Connect & Detect Context

figma_get_status → verify Desktop Bridge connection

Detect the code stack:

  • Look for tailwind.config.*, postcss.config.* → Tailwind
  • Look for *.css with --custom-properties → CSS custom properties
  • Look for tokens.json, *.tokens.* → Design token files
  • Look for package.json → framework detection (React, Vue, Svelte, Next.js)

2. Extract Figma Design Tokens

Colors
figma_execute: `
  const styles = await figma.getLocalPaintStylesAsync();
  return styles.map(s => {
    const fill = s.paints[0];
    let hex = null;
    if (fill?.type === 'SOLID') {
      const c = fill.color;
      hex = '#' + [c.r, c.g, c.b].map(v => Math.round(v * 255).toString(16).padStart(2, '0')).join('');
    }
    return { name: s.name, hex, opacity: fill?.opacity };
  });
`
Typography
figma_execute: `
  const styles = await figma.getLocalTextStylesAsync();
  return styles.map(s => ({
    name: s.name,
    fontFamily: s.fontName?.family,
    fontWeight: s.fontName?.style,
    fontSize: s.fontSize,
    lineHeight: s.lineHeight,
    letterSpacing: s.letterSpacing
  }));
`
Variables / Tokens
figma_execute: `
  const collections = await figma.variables.getLocalVariableCollectionsAsync();
  const result = [];
  for (const col of collections) {
    const vars = [];
    for (const id of col.variableIds) {
      const v = await figma.variables.getVariableByIdAsync(id);
      vars.push({
        name: v.name,
        type: v.resolvedType,
        values: v.valuesByMode
      });
    }
    result.push({ collection: col.name, modes: col.modes, variables: vars });
  }
  return result;
`

Read the full file on GitHub · 271 lines

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. 5d ago First seen · 271 lines · 23 tokens per session scan A 1ae39c8e58bd

Subscribe to this mod's changes

figma-sync is a command published in the GitHub repository Adityaraj0421/naksha-studio (316 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 2,105 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.