figma-component-builder

figma-component-builder is a command for Claude Code, Cursor from vanessamarely/ai-playbook-reposito. It costs 0 tokens per session (843 once invoked), scanned A, original, MIT.

A command that turns selected Figma designs into React and TypeScript components, which are reusable pieces of a web interface. It can use Figma data or a screenshot and can check the result in a running development site.

In plain words
What is it for?
It is for generating component files in a chosen project folder, following that project's coding and UI-library rules, and previewing or applying the changes.
Why use it?
It reduces the manual work of copying a design into code and checking whether the coded result matches the design.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

Good fit It is for generating component files in a chosen project folder, following that project's coding and UI-library rules, and previewing or applying the changes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/vanessamarely/ai-playbook-reposito/figma-component-builder
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/vanessamarely/ai-playbook-reposito

Made for: Claude Code, Cursor.

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-component-builder

README.md
[![agentmods](https://agentmods.dev/badge/commands/vanessamarely/ai-playbook-reposito/figma-component-builder/github.svg)](https://agentmods.dev/commands/vanessamarely/ai-playbook-reposito/figma-component-builder)
Your own site
<a href="https://agentmods.dev/commands/vanessamarely/ai-playbook-reposito/figma-component-builder"><img src="https://agentmods.dev/badge/commands/vanessamarely/ai-playbook-reposito/figma-component-builder/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 figma-component-builder

Your own site · 80×15
<a href="https://agentmods.dev/commands/vanessamarely/ai-playbook-reposito/figma-component-builder"><img src="https://agentmods.dev/badge/commands/vanessamarely/ai-playbook-reposito/figma-component-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 843 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.00000 $0.00843
Opus 5 $0.00000 $0.00421
Sonnet 5 $0.00000 $0.00169
Haiku 4.5 $0.00000 $0.00084

Measured 10d ago against content hash 89f692d48ef6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

figma-component-builder 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 10d 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.

ai-playbook/.cursor/commands/figma-component-builder.md · 43 lines

How it starts

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

Figma Component Builder

Automate conversion of Figma designs into React/TypeScript components and supporting artifacts for a selected project scope. Uses a Figma MCP server (or connector) to fetch design context and a browser automation tool to verify produced components against a running dev server. Follows the conventions described in the figma-component rule.

Required Input

The request must include:

  • scope (required): target project folder under the workspace root.
  • destination_folder (required): exact destination folder for generated component files.
  • component_library (required): preferred reusable UI/component library for this scope (none if there isn't one).
  • client_context (required): project-specific coding conventions (naming, tokens, styling approach, export rules).
  • figma_url or {fileKey, nodeId} (required), OR screenshot_image (fallback) if Figma access is unavailable.
  • Optional: dev_url (local dev server for testing), create_mode (preview | apply), preferences.

Operational Rules

  1. Scope isolation — treat each top-level folder as an independent project; confirm scope before editing. Detect project type from package.json, tsconfig.json, index.html, or nest-cli.json.
  2. Safety & exclusions — never edit node_modules/, dist/, build/, .next/, target/, .venv/, venv/, __pycache__/, coverage/, .nyc_output/, .git/, .github/workflows/. Ask for explicit confirmation before cross-project changes or edits to public APIs consumed elsewhere.
  3. Minimal diffs — prefer 1-3 focused files per change; group related file changes together.
  4. Reuse first — search the target repo for existing components in component_library and prefer adapters/composition over new UI primitives. Never hardcode client or library names — use only values supplied in the request.
  5. Tests & stories — only create .test.tsx if a test runner (Jest/Vitest) is in package.json devDependencies; only create .stories.tsx if @storybook/* packages are present. Skip both if neither is configured.
  6. Accessibility checks (mandatory) — after creating/modifying a component, run browser-based accessibility checks (axe-core) against a dev server or Storybook instance. Report violations by impact level (critical/serious/moderate/minor), affected element count, CSS selectors/HTML snippets, and links to WCAG guidance. Produce a JSON report { violations: [], passes: number, incomplete: number }. Do not mark the component complete until violations are fixed or explicitly deferred with the user's agreement.
  7. Verification — provide typecheck, lint, test, and Storybook commands for the target scope using its package.json scripts.
  8. Figma fallback handling — if Figma access is unavailable, unauthorized, or incomplete, use the provided screenshot_image; if none is attached, ask for one (full component/frame plus key states) before proceeding. State clearly in the output whether the implementation came from Figma context or a screenshot fallback.

Read the full file on GitHub · 43 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. 10d ago First seen · 43 lines · 0 tokens per session scan A 89f692d48ef6

Subscribe to this mod's changes

figma-component-builder is a command published in the GitHub repository vanessamarely/ai-playbook-reposito (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 843 tokens. 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.