init-figma-compose

A setup wizard for a Figma-to-code workflow, where designs from Figma are turned into application code. It creates project configuration, checks the required Figma connection, and can register an optional command.

In plain words
What is it for?
Use it to configure the Figma pipeline in a project, check its Figma connection, or enable the optional Graphify command.
Why use it?
It removes the need to configure the pipeline and verify its prerequisites manually. The wizard asks questions interactively so later setup choices can depend on earlier answers.

Command for Claude Code

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/punkadillo/figma-code-composer/init-figma-compose
Clone the repo
git clone --depth 1 https://github.com/punkadillo/figma-code-composer

Made for: Claude Code.

Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,270 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.00045 $0.01270
Opus 5 $0.00023 $0.00635
Sonnet 5 $0.00009 $0.00254
Haiku 4.5 $0.00005 $0.00127

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

Security

Grade A, and why

init-figma-compose 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 2d 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/init-figma-compose.md · 40 lines

How it starts

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

/init-figma-compose — figma-pipeline setup wizard

(Renamed from /init so it doesn't shadow Claude Code's built-in /init. Trigger phrases: /init-figma-compose, "set up figma-pipeline", "configure the pipeline", "run the figma wizard".)

Before running this: complete README § Prerequisites for your tool — at minimum the required Figma MCP setup, optionally Graphify. The wizard verifies these; it does not install them.

Run the wizard INLINE in this (main) thread — do NOT spawn it as a subagent. Follow .claude/agents/wizard.md as your step-by-step recipe and own every AskUserQuestion prompt yourself, here in the main conversation. Honour $ARGUMENTS (e.g. --re-detect). Rationale: the wizard is interactive and answer-dependent (each answer can change the next question). A spawned subagent that calls AskUserQuestion returns control to ask, and cannot be resumed for the follow-up answers (SendMessage to a returned subagent isn't available) — so a spawned wizard stalls after the first question. The main thread has no such limit. The only delegation is the read-only, non-interactive stack scan: spawn project-detector (it runs once and returns; nothing to resume).

The wizard recipe:

  1. Project identity — asks for project name + one-line description.
  2. Figma MCP verify (hard gate) — probes both namespaces (mcp__figma__* and mcp__plugin_figma_figma__*), records the working prefix in config.figma.mcpToolNamespace. If MCP isn't reachable, the wizard aborts and points at README § Prerequisites § Required — Figma MCP — no config.json is written. Result: every subsequent /figma-build starts with a known-good MCP.
  3. Stack detection — spawns project-detector to identify framework + CSS system + relevant paths. User confirms or overrides.
  4. Design system OR methodology — design system first; if none, then design methodology (atomic / feature-sliced / component-based / flat).
  5. CSS choice — Tailwind v4/v3 / UnoCSS / vanilla CSS vars / CSS Modules / Sass / vanilla-extract / Panda / styled-components — with examples and a guided migration plan when the detected system differs.
  6. Paths + stories + tests + output-structure — derived per stack, with confirmation prompts.
  7. Tools — Claude Code / Cursor multi-select.
  8. Skills install/strip — prunes canonical .figma-pipeline/skills/ to the resolved install set and refreshes per-tool surfaces. 8.5. Brevit install (project dependency) — detects the project's package manager from the lockfile (package-lock.json→npm, pnpm-lock.yaml→pnpm, yarn.lock→yarn, bun.lockb→bun) and runs e.g. npm install brevit. Records config.brevit = { installed, version, enabled, mode, abbreviation }. On failure, records installed: false and surfaces a one-liner; the wizard continues — a missing Brevit degrades gracefully (raw JSON fallback). Unlike the user-level detect-only tools (Figma MCP, Graphify), Brevit is a project npm dependency and thus in-scope for the wizard to install.
  9. Graphify detection (optional)command -v graphify; records status in config.graphify. Detect-only: never installs the binary, never runs graphify install, never builds the graph. If absent, surfaces a one-line pointer to README § Prerequisites § Optional — Graphify. Registration (graphify install --platform <tool>) and the build (/graphify .) are yours to run.
  10. Patch target .gitignore — appends the scaffold-generated paths (.figma-pipeline/config.json, graphify-out/, /tmp/figma-*/) so consumers never accidentally commit local-only state. Idempotent. 10.5. Optional design-system token build (greenfield, opt-in) — on greenfield projects (no existing tokens on disk), asks two questions: (1) Figma design-system URL (blank = skip step entirely; records config.figma.dsUrl), (2) "Build the token system now?" Yes → invokes figma-coordinator with { url: dsUrl, intent: "create", scope: "tokens-only" } and surfaces the token-builder report. No → records the URL only; the final report ends with Next: /figma-tokens <dsUrl>. Skipped on non-greenfield projects. Declining preserves the verify-don't-build posture.

Read the full file on GitHub · 40 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. 2d ago First seen · 40 lines · 45 tokens per session scan A 59fa78f43abc

Subscribe to this mod's changes

init-figma-compose is a command published in the GitHub repository punkadillo/figma-code-composer (3 stars, last pushed 14d ago), licensed MIT. It adds 45 tokens to every session and 1,270 once invoked, about $0.0002 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.