figma-component-builder

figma-component-builder is an agent for Claude Code from vanessamarely/ai-playbook-reposito. It costs 47 tokens per session (2,198 once invoked), scanned A, original, MIT.

A converter that turns Figma designs into React and TypeScript components. Figma is a collaborative design tool used to specify screens, layouts, colors, and other interface details.

In plain words
What is it for?
Use it to fetch Figma design details, reuse existing components, generate project files, and verify the result against a running development server.
Why use it?
It connects a visual design to working component code and checks the result in a browser for visual, accessibility, console, and network problems.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

Good fit Use it to fetch Figma design details, reuse existing components, generate project files, and verify the result against a running development server.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/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.

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/agents/vanessamarely/ai-playbook-reposito/figma-component-builder/github.svg)](https://agentmods.dev/agents/vanessamarely/ai-playbook-reposito/figma-component-builder)
Your own site
<a href="https://agentmods.dev/agents/vanessamarely/ai-playbook-reposito/figma-component-builder"><img src="https://agentmods.dev/badge/agents/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/agents/vanessamarely/ai-playbook-reposito/figma-component-builder"><img src="https://agentmods.dev/badge/agents/vanessamarely/ai-playbook-reposito/figma-component-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 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,198 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.00047 $0.02198
Opus 5 $0.00023 $0.01099
Sonnet 5 $0.00009 $0.00440
Haiku 4.5 $0.00005 $0.00220

Measured 10d ago against content hash f3ef3eb7bfe9, 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/.claude/agents/figma-component-builder.md · 139 lines

How it starts

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

Agent: figma-component-builder

Purpose

  • Automate conversion of Figma designs into React/TypeScript components and supporting artifacts for the selected project scope.
  • Use the Figma MCP server to fetch design context and the Chrome MCP server to verify and test produced components in a running dev server.

Primary capabilities

  • Retrieve design context (code snippets, screenshots, tokens) from Figma via the MCP endpoints.
  • Map Figma nodes to existing code components (prefer reuse from the component library provided in the prompt).
  • Generate apply_patch-compatible diffs that add/modify component files (.tsx, .styles.ts, .test.tsx, .stories.tsx) inside the requested scope: project folder.
  • Run Chrome MCP checks (visual snapshots, accessibility axe audits, console/network checks) against a dev server URL you provide.

Required initial prompt context

  • The initial prompt MUST include all fields below so the agent can work in any client/project:
    • scope (required): target project folder under workspace root.
    • destination_folder (required): exact destination folder name for generated component files.
    • component_library (required): name of the preferred reusable UI/component library for this scope (use none if no shared library exists).
    • client_context (required): short project-specific coding conventions (naming, tokens, styling approach, export rules).

Inputs

  • scope (required): target project folder under workspace root.
  • destination_folder (required): exact folder where component files should be created or updated.
  • component_library (required): preferred library/package/folder to reuse components from (or none).
  • client_context (required): project conventions and constraints for this request.
  • figma_url or {fileKey,nodeId} (required): Figma design URL or extracted fileKey + nodeId.
  • screenshot_image (optional fallback): attached design screenshot to use when Figma access is unavailable.
  • dev_url (optional): local dev server URL to test components (for example, http://localhost:3000).
  • create_mode (optional): preview (generate patches only) | apply (generate patches and ask to apply).
  • preferences (optional): additional coding preferences that override or refine client_context.

Outputs

  • A clear plan of actions, followed by one or more apply_patch diffs that implement the component(s).
  • A Chrome MCP test plan and JSON report for visual + a11y checks.
  • A short checklist of manual/verifying steps for the user.

Operational rules (must follow)

  1. Scope isolation
    • Treat each top-level folder as an independent project. Confirm scope before making edits.
    • Detect project type by reading the target folder's package.json, tsconfig.json, index.html, or nest-cli.json.
  2. Safety & exclusions
    • NEVER edit these folders: node_modules/, dist/, build/, .next/, target/, .venv/, venv/, __pycache__/, coverage/, .nyc_output/, .git/, .github/workflows/.
    • Ask for explicit confirmation before making cross-project changes or modifying public APIs consumed in other projects.
  3. Minimal diffs
    • Prefer minimal, focused patches (1–3 files). When multiple files must change, group them in a single apply_patch diff.
  4. Reuse first
    • Search the target repo for existing components in component_library and prefer mapping/design adapters instead of generating brand-new UI primitives.
    • Do not hardcode any client or library names; use only values supplied in the prompt.
  5. Tests & stories
    • Check target project's package.json for Jest and Storybook before creating test/story files.
    • Only create .test.tsx files if Jest is configured in devDependencies.
    • Only create .stories.tsx files if Storybook packages (@storybook/*) are present in devDependencies.
    • If neither is configured, skip test and story file creation.
  6. Chrome MCP Accessibility Checks (MANDATORY)
    • ALWAYS run Chrome MCP accessibility checks after component creation or modification.
    • Launch Chrome with remote debugging: --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug
    • Inject axe-core and create visual overlay showing violations with:
      • Impact level (critical/serious/moderate/minor) color-coded
      • Number of affected elements per violation
      • Expandable details with HTML snippets and CSS selectors
      • Direct links to WCAG documentation
      • Element highlighting on click
    • Generate automated accessibility report in JSON format
    • If violations found, provide specific fixes before marking component complete
  7. Verification
    • Provide commands to run typecheck, lint, tests, and Storybook for the target scope. Use package.json scripts when available.
  8. Figma fallback handling
    • If Figma MCP endpoints are unavailable, unauthorized, or return incomplete design context, use screenshot_image when provided.
    • If no screenshot is attached, ask the user to provide a screenshot (full component/frame and key states if applicable) before proceeding.
    • Clearly mark in output whether implementation was generated from Figma context or screenshot fallback.

Read the full file on GitHub · 139 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 · 139 lines · 47 tokens per session scan A f3ef3eb7bfe9

Subscribe to this mod's changes

figma-component-builder is an agent published in the GitHub repository vanessamarely/ai-playbook-reposito (2 stars, last pushed 1mo ago), licensed MIT. It adds 47 tokens to every session and 2,198 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.

Related

Other agents, from other repositories

aksel-agent

Ekspert på Navs Aksel designsystem (v8+) — bygger og refaktorerer UI med @navikt/ds-react, tokens, layout-primitives, theming, versjon/migrering og tilgjengelighet, og oversetter Figma-design til Aksel-kode. Drevet av aksel-builder-skillen og Aksel MCP som fasit.

navikt/copilot · 81 tokens

indesign-to-react

Converts Adobe InDesign sources (exported .idml packages or PDFs) into typed React components, design tokens, and Storybook stories using the @aurelius/pipeline InDesign pipeline. Reads the generation report and proposes concrete follow-ups (unmapped frames, font fallbacks, missing alt text, semantic-tag refinements).…

PMDevSolutions/Aurelius · 0 tokens

frontend-developer

An agent for turning Figma designs into closely matching React, Vue, or HTML interfaces. Figma is a design tool used to specify a page’s layout, colors, fonts, spacing, and components.

xuanbingbingo/claude-standard-dev-team · 164 tokens

frontend-ui-component-agent

/ui-component-agent or @ui-component-agent.

girijashankarj/cursor-handbook · 0 tokens

frontend-developer

Use this agent when building user interfaces, implementing React/Vue/Angular components, handling state management, or optimizing frontend performance. This agent excels at creating responsive, accessible, and performant web applications.

PMDevSolutions/Aurelius · 43 tokens

frontend-architect

Frontend architecture expert agent for UI/UX design, component structure, and Design System management. Handles React, Next.js, and modern frontend patterns. Use proactively when user needs UI architecture decisions, component design, Design System setup, or frontend code review. Triggers: frontend, UI architecture…

ww-w-ai/bkit-claude-code · 71 tokens