component-builder

A Figma building guide for making reusable components and groups of variants with consistent sizing, spacing, and auto layout. Components are reusable interface building blocks; variants are related versions of one block.

In plain words
What is it for?
Creating reusable Figma components, adding content and icons, applying auto layout, defining variants, setting component properties, and building elements such as buttons.
Why use it?
It helps keep repeated interface elements consistent and easier to update. It also provides a standard structure for properties such as button states or styles.

Skill for Claude CodeCodex

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 skills/madebypan/figcc/component-builder
Any agent
npx skills add madebypan/FigCC --skill component-builder
Clone the repo
git clone --depth 1 https://github.com/madebypan/FigCC

Made for: Claude Code, Codex.

Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 589 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.00017 $0.00589
Opus 5 $0.00009 $0.00295
Sonnet 5 $0.00003 $0.00118
Haiku 4.5 $0.00002 $0.00059

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

Security

Grade A, and why

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 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.

skills/component-builder/SKILL.md · 77 lines

How it starts

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

Skill: Component Builder

You are an expert at building production-ready Figma components with variants, auto-layout, and proper structure. Follow these patterns when creating components.

Standard component workflow

  1. Build the base frame with auto-layout
  2. Add content (text, icons, shapes)
  3. Convert to component with figma.createComponentFromNode(frame)
  4. Add variant properties via component.addComponentProperty()
  5. Create a component set if multiple variants are needed

Auto-layout defaults

Always apply auto-layout to component frames:

frame.layoutMode = 'HORIZONTAL';
frame.primaryAxisSizingMode = 'AUTO';
frame.counterAxisSizingMode = 'AUTO';
frame.counterAxisAlignItems = 'CENTER';
frame.paddingLeft = frame.paddingRight = 16;
frame.paddingTop = frame.paddingBottom = 10;
frame.itemSpacing = 8;
frame.cornerRadius = 8;

Button component example

await figma.loadFontAsync({ family: 'Inter', style: 'Medium' });

const frame = figma.createFrame();
frame.name = 'Button/Primary';
frame.layoutMode = 'HORIZONTAL';
frame.primaryAxisSizingMode = 'AUTO';
frame.counterAxisSizingMode = 'AUTO';
frame.counterAxisAlignItems = 'CENTER';
frame.paddingLeft = frame.paddingRight = 16;
frame.paddingTop = frame.paddingBottom = 10;
frame.itemSpacing = 8;
frame.cornerRadius = 8;
frame.fills = [{ type: 'SOLID', color: { r: 0.1, g: 0.1, b: 0.9 } }];

const label = figma.createText();
label.characters = 'Button';
label.fontSize = 14;
label.fills = [{ type: 'SOLID', color: { r: 1, g: 1, b: 1 } }];
frame.appendChild(label);

const component = figma.createComponentFromNode(frame);
figma.currentPage.appendChild(component);

Variant properties

component.addComponentProperty('State', 'VARIANT', 'Default');
// Values: 'Default' | 'Hover' | 'Pressed' | 'Disabled'

component.addComponentProperty('Size', 'VARIANT', 'Medium');
// Values: 'Small' | 'Medium' | 'Large'

Rules

  • Always load fonts before setting .characters.
  • Set layoutSizingHorizontal = 'FILL' on text nodes inside fixed-width frames.
  • Use figma.currentPage.appendChild() to place the component on the canvas.
  • After creating, select the component: figma.currentPage.selection = [component].
  • Name the component following the Category/Variant convention.

Read the full file on GitHub · 77 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 · 77 lines · 17 tokens per session scan A 8f7cee12404c

Subscribe to this mod's changes

component-builder is a skill published in the GitHub repository madebypan/FigCC (22 stars, last pushed 26d ago), licensed MIT. It adds 17 tokens to every session and 589 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.

Related

Other skills, from other repositories

mcp-sdk-audit

Upgrade @modelcontextprotocol/server (the MCP TypeScript SDK v2) and prove the wire contract survived. The SDK is a runtime dependency whose breakage lands on the wire, not in the type checker — so this sorts each release by which SDK source files it touched (Figwright uses only the server + stdio slice of a…

awdr74100/figwright · 159 tokens

figma-typings-audit

Upgrade @figma/plugin-typings and absorb what the new version exposes. Diffs the .d.ts between the installed and the target version (that package ships no changelog), sorts the changes into breakage / new API / silently-added fields, maps each onto the sandbox handlers, the hand-written Zod mirrors in shared, and the…

awdr74100/figwright · 133 tokens

figma-codegen

Generate framework-aware code from a Figma design. Reads the project's stack profile and emits code matching the existing framework (React/Vue/Svelte/Next/etc.) and styling (Tailwind/CSS/CSS-in-JS), reusing existing components and design tokens instead of regenerating from scratch. Triggers whenever the user wants a…

awdr74100/figwright · 145 tokens

figma-build

Build a Figma design from code or a description — the reverse of figma-codegen. Reuses the connected file's existing design system (components, variables, styles) instead of drawing primitives with hardcoded values. Triggers whenever the user wants something created or updated IN Figma from code or a spec — e.g.…

awdr74100/figwright · 180 tokens

figma-ui-restore

使用 Figma Agent Kit(figma-agent-mcp + Desktop 插件)将 Figma 画板/Frame 按 scope 做 1:1 UI 还原:锁 scope、TEXT 全量归类、切图打标、3× savescreenshots、 bounds 落码、分块对照与验收清单。适用于「按 Figma 还原页面 / 组件 / 弹窗」、 「1:1 还原」「切图落盘」「对照设计稿验收」等场景。默认 strict;用户明文 fast 时可压缩部分步骤。.

ChinaCarlos/figma-agent-kit · 135 tokens

claude-design-skill

Claude Code-based design skill for hi-fi prototyping and Figma MCP-driven precision design work. Built around three load-bearing rules — fact verification before assumptions, confidentiality gate before any external call, and a strip-then-scan import gate for AI-generated assets — wired into Codex CLI (GPT-5.5…

0xmhha/claude-design-skill · 184 tokens