figma-init-spec

figma-init-spec is a command for Claude Code from skyfox675/agents-skills. It costs 70 tokens per session (617 once invoked), scanned A, original, MIT.

A command that records a Figma design file as maintainable specifications linked to stable design and code identities. Figma is a collaborative design tool; these identities keep references intact when the file is reorganized.

In plain words
What is it for?
Use it to document a whole Figma file or a selected page, screen flow, or component set, including design variables, styles, and optional Code Connect mappings.
Why use it?
It reduces design drift, where the implemented interface gradually stops matching the approved design, by keeping design details and their code mappings together.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

Good fit Use it to document a whole Figma file or a selected page, screen flow, or component set, including design variables, styles, and optional Code Connect mappings.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/skyfox675/agents-skills/figma-init-spec
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.

Clone the repo
git clone --depth 1 https://github.com/skyfox675/agents-skills

Made for: Claude Code.

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-init-spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/skyfox675/agents-skills/figma-init-spec.svg)](https://agentmods.dev/commands/skyfox675/agents-skills/figma-init-spec)
Your own site
<a href="https://agentmods.dev/commands/skyfox675/agents-skills/figma-init-spec"><img src="https://agentmods.dev/badge/commands/skyfox675/agents-skills/figma-init-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 617 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 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.1 $0.00070 $0.00617
Opus 5 $0.00035 $0.00309
Sonnet 5 $0.00014 $0.00123
Haiku 4.5 $0.00007 $0.00062

Measured 8d ago against content hash 4c07ae54a06d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

figma-init-spec 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 8d 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.

.claude/commands/figma-init-spec.md · 22 lines

What it actually says

/figma-init-spec — snapshot the design system into living specs

Operate in caveman mode (load the caveman skill). Keep ids, keys, token values, and mapped code paths byte-exact; spec prose through humanizer.

Arguments: $ARGUMENTS — an optional scope (a page, screen flow, or component set; none = the whole file). A model: token pins the tier (default sonnet).

The figma-specs skill is the protocol — stable-identity anchoring, the spec layout, the Figma MCP tools, and the repo-owned design→code map (Code Connect optional). Consult it first. Figma reads go through the Figma MCP — register the Dev Mode MCP under server key figma so the pre-approved mcp__figma__* tools resolve (plugin installs use mcp__plugin_figma_figma__*; allowlist that prefix if so). If it isn't connected, say so and ask the operator to export the variables/screens instead.

Steps

  1. Discover the domains (component groups, screen flows) from the file via the Figma MCP — not a fixed list.
  2. Fan out one design-mapper agent per domain (parallel, per dispatching-subagents). Each pulls get_variable_defs (and get_code_connect_map only if Code Connect is already set up) and writes its specs anchored to the node id / component key. To map each component to code, it dispatches scout to grep the codebase for the matching component and records the file:line + confidence; ambiguous matches are confirmed with the operator.
  3. Write design-specs/_index.md, set each spec's last_synced to the current Figma version / commit, and report: the domain map, plus how many components are mapped to code vs unmapped. Unmapped components make later re-touch lists imprecise — scout proposes a mapping for each and the operator confirms once.

Run spec prose through the humanizer skill; ids/keys/tokens stay byte-exact.

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. 8d ago First seen · 22 lines · 70 tokens per session scan A 4c07ae54a06d

Subscribe to this mod's changes

figma-init-spec is a command published in the GitHub repository skyfox675/agents-skills (10 stars, last pushed 8d ago), licensed MIT. It adds 70 tokens to every session and 617 once invoked, about $0.0003 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-31.