Agent skill

Connect Component To Figma

by dequelabs in dequelabs/cauldron

Add a Figma Code Connect (.figma.tsx) file for a Cauldron React component.

MPL-2.0Auto-check passedFrontend & Design

Install Connect Component To Figma

skills CLI
$ npx skills add dequelabs/cauldron --skill connect-component-to-figma -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dequelabs/cauldron connect-component-to-figma --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dequelabs/cauldron.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/connect-component-to-figma .claude/skills/connect-component-to-figma && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
connect-component-to-figma
GitHub stars
129
Token cost
~2k tokens
SKILL.md length
691 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MPL-2.0

At a glance

Add a Figma Code Connect (.figma.tsx) file for a Cauldron React component.

  • Works in 6 steps: Confirm the Figma node id. Ask the user… → Verify the React API. → Write the file at… → …
  • Connecting a component to Figma
  • SKILL.md covers Quick start, Workflow, Conventions and Mapping cheatsheet, plus 3 more sections
  • Calls pnpm and npx; reaches figma.com

What it does

Connect Component To Figma is an agent skill from dequelabs/cauldron. Add a Figma Code Connect (.figma.tsx) file for a Cauldron React component. Use when connecting a component to Figma, adding a code connect, or working on Figma Code Connect tasks in the cauldron repo.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering React components, Design systems and Accessibility. It works with Figma, React, TypeScript and JavaScript. The licence is MPL-2.0.

When your agent uses it

  • Connecting a component to Figma
  • Adding a code connect
  • Working on Figma Code Connect tasks in the cauldron repo

Example prompts

  • “/connect-component-to-figma”

Requirements

  • Node.js

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Confirm the Figma node id. Ask the user if not given. Convert 123:456 → 123-456 for the URL.
  2. Verify the React API.
  3. Write the file at packages/react/src/components//.figma.tsx. Use the Quick start template.
  4. Lint + validate
  5. Commit with chore: connect to Figma via Code Connect (or chore: connect Batch N components... for multi-file work).
  6. Open a draft PR against develop. If the work tracks a parent issue, include Related to # in the body.

What it can do on your machine

Read from SKILL.md and the folder at commit 74b85fb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • figma.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Connect Component To Figma loads about 2k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 691 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dequelabs/cauldron at commit 74b85fb, republished under its MPL-2.0 licence (© dequelabs). 691 words, ~1,951 tokens.

Download SKILL.mdSave it as .claude/skills/connect-component-to-figma/SKILL.md (or your agent's skills folder).
name
connect-component-to-figma
description
Add a Figma Code Connect (.figma.tsx) file for a Cauldron React component. Use when connecting a component to Figma, adding a code connect, or working on Figma Code Connect tasks in the cauldron repo.
model
sonnet

Connect a Cauldron component to Figma

Adds one .figma.tsx file next to a packages/react/src/components/<Component>/ source file so the Figma Dev Mode snippet shows the real Cauldron API. Reference implementations: IconButton.figma.tsx (nested props), Tooltip.figma.tsx (anchored target+ref), Checkbox.figma.tsx (multiple enums + boolean + textContent).

Quick start

tsx
import React from 'react';
import figma from '@figma/code-connect';
import { MyComponent } from '../../index';

const FIGMA_URL =
  'https://www.figma.com/design/CEFVdiecqDjLSjhorjHUzI/Product-Foundations--Cauldron--Library?node-id=NODE-ID&m=dev';

figma.connect(MyComponent, FIGMA_URL, {
  props: {
    // VARIANTs (including pseudo-booleans like "True"/"False"):
    variant: figma.enum('Variant', { Secondary: 'secondary' }),
    // Real BOOLEANs:
    disabled: figma.boolean('Disabled', { true: true, false: undefined }),
    // Text layers:
    children: figma.textContent('Label')
  },
  example: ({ variant, disabled, children }) => (
    <MyComponent variant={variant} disabled={disabled}>
      {children}
    </MyComponent>
  )
});

Replace NODE-ID with the Figma node id in the form 123-456 (dash, not colon).

Workflow

  1. Confirm the Figma node id. Ask the user if not given. Convert 123:456 → 123-456 for the URL.
  2. Verify the React API.
    • Read packages/react/src/index.ts to confirm the named export(s). Many components have compound children (e.g. AccordionTrigger, BreadcrumbLink, PanelTrigger) — import them from the barrel.
    • Read the component's index.tsx / main .tsx to find required props and the real shape of any child components.
  3. Write the file at packages/react/src/components/<Component>/<Component>.figma.tsx. Use the Quick start template.
  4. Lint + validate:
    bash
    npx eslint packages/react/src/components/<Component>/<Component>.figma.tsx
    pnpm --filter @deque/cauldron-react figma:publish:dry-run
    .figma.tsx is excluded from tsconfig.json, so tsc won't see it — the dry-run publish is the real validator. To debug what the parser sees for one file, run pnpm figma:parse <path> from packages/react/.
  5. Commit with chore: connect <Component> to Figma via Code Connect (or chore: connect Batch N components... for multi-file work).
  6. Open a draft PR against develop. If the work tracks a parent issue, include Related to #<issue> in the body.

Conventions

  • Import the component from '../../index' (the barrel). Not from the component file, not from @deque/cauldron-react. This matches packages/react/figma.config.json.
  • Use bare display names: 'Show Copy', not 'Show Copy#938:498'. The trailing #NNN:NNN is Figma's internal property id and breaks the mapping.
  • Omit default-value mappings so the prop renders undefined and is dropped from the snippet (e.g. Button's default Variant=Primary is not in its mapping; only Secondary and Tertiary are).
  • Keep example clean: no default-valued props in the rendered JSX.
  • Ignore Figma-only props with no React equivalent: State, Device, Hover, Focus, Active, Disabled (when purely visual), Wrapped.

Mapping cheatsheet

Figma typeCode Connect callNotes
VARIANT (enum, incl. "True"/"False")figma.enum('Name', { True: true })"True"/"False" can be either type — check the icon (see gotchas).
BOOLEAN (real toggle)figma.boolean('Name', { true: X, false: undefined })Use undefined for "off" so the prop drops.
Text layerfigma.textContent('Label')Layer name, not property name.
Nested instance prop (e.g. _Icon Type)figma.nestedProps('_Icon Type', { name: figma.string('Icon') })See IconButton/Icon for the pattern.
Multiple Figma variants → one componentMultiple figma.connect(C, URL, { variant: { Type: 'X' }, ... }) callsE.g. ActionMenu with Button vs Icon Button triggers.
Show full SKILL.md (321 more words)Show less

Common gotchas

  • BOOLEAN vs VARIANT — check the icon in Figma, not the value. A property whose values look like True/False could be either. In the Figma properties panel: a round toggle icon = BOOLEAN, a diamond icon = VARIANT. Use figma.boolean('Name', { true: X, false: undefined }) for the former and figma.enum('Name', { True: X }) only for the latter (true VARIANTs with "True"/"False" string values, like Button's Thin). Picking wrong still renders, but reads as a workaround.
  • Empty arrow handlers fail lint. onClose={() => {}} triggers @typescript-eslint/no-empty-function. Use onClose={() => undefined} instead.
  • Required React props that have no Figma source need literal stubs. Checkbox needs id="checkbox" and label="Label"; ProgressBar needs aria-label="Progress"; Modal needs show and onClose.
  • Anchored components need a complete ref pattern. Tooltip's example creates a React.createRef and renders both the trigger and the Tooltip so the snippet is valid usage:
    tsx
    example: ({ placement }) => {
      const targetRef = React.createRef<HTMLButtonElement>();
      return (
        <>
          <button ref={targetRef}>Trigger</button>
          <Tooltip target={targetRef} placement={placement}>
            Tooltip text
          </Tooltip>
        </>
      );
    };
  • Some booleans are inverted. ExpandCollapsePanel maps Collapsed=False to open=true (the React prop is the opposite of the Figma variant). Read the React prop semantics before mapping.
  • Tooltip's placement defaults to 'auto', which matches no design direction. Map every Figma Direction value explicitly, Right included — omit one and the snippet drops placement and lets the floating engine choose.
  • 'Combo Box' (with space) is a known string-with-space key if you connect to the shared Forms set. Quote it exactly.
  • Compound components: verify each child name in packages/react/src/index.ts before importing. Tabs exports Tab + TabPanel; Stepper exports Step; NavBar exports NavItem; etc.

Skip list (per #2373)

Some components have no Figma counterpart and should not be connected (utility/wrapper components, nav primitives, components covered by another). The canonical list lives in the checkboxes at dequelabs/cauldron#2373 — check there before connecting a component you don't see in ls packages/react/src/components/*/*.figma.tsx.

Reference

  • Convention source: CONTRIBUTING.md → Figma Code Connect section, and the full plan + skip list at dequelabs/cauldron#2373.
  • Current set of connected components: ls packages/react/src/components/*/*.figma.tsx.
  • Figma file key: CEFVdiecqDjLSjhorjHUzI. URL template: https://www.figma.com/design/CEFVdiecqDjLSjhorjHUzI/Product-Foundations--Cauldron--Library?node-id={NODE-ID-WITH-DASH}&m=dev.

© dequelabs, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/connect-component-to-figma of dequelabs/cauldron.

Open the folder on GitHubat commit 74b85fb

Compare with similar skills

Connect Component To Figma next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Connect Component To Figma compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Connect Component To Figma this skilldequelabs/cauldron129—~2kAutomated safety check: PassMPL-2.0
Wonder BlocksKhan/wonder-blocks163—~3.2kAutomated safety check: PassMIT
Shift UI Componentsshift-editor/shift348—~2.5kAutomated safety check: PassApache-2.0
Animated React Component LibrariesHainrixz/editor-pro-max2641 repos~5.7kAutomated safety check: PassCustom licence
Extract DesignManavarya09/design-extract4.2k—~786Automated safety check: NotesMIT
Fast Typescript Checkinternet-development/www-sacred1.6k—~4.3kAutomated safety check: PassMIT

Similar skills

  • Wonder Blocks

    Khan/wonder-blocks

    Implements user interfaces using the Wonder Blocks (WB) design system — Khan Academy's React component library.

    163 GitHub stars~3.2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Shift UI Components

    shift-editor/shift

    Guides design, implementation and review of Shift interface work: shared Base UI wrappers, Tailwind v4 theme tokens, Figma matching and accessible interaction states.

    348 GitHub stars~2.5k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Animated React Component Libraries

    Hainrixz/editor-pro-max

    Helps choose and drop in animated React components from Magic UI and React Bits for landing pages, marketing sites and dashboards, instead of hand-coding animations.

    264 GitHub starsUsed in 1 repo~5.7k tokens
    Frontend & DesignAuto-check passed
  • Extract Design

    Manavarya09/design-extract

    Extract the full design language from any website URL. An agent skill from Manavarya09/design-extract.

    4.2k GitHub stars~786 tokensUpdated yesterday
    Frontend & DesignAuto-check: notes
  • Fast Typescript Check

    internet-development/www-sacred

    Keep www-sacred's TypeScript fast to type-check and fast to run.

    1.6k GitHub stars~4.3k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • React Render Types Composition

    HorusGoul/eslint-plugin-react-render-types

    Composition patterns for building React components with @renders type annotations from eslint-plugin-react-render-types.

    111 GitHub stars~1.1k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed

Questions about Connect Component To Figma

What does Connect Component To Figma do?

Add a Figma Code Connect (.figma.tsx) file for a Cauldron React component. Connect Component To Figma is an agent skill from dequelabs/cauldron.tsx) file for a Cauldron React component.

When should I use Connect Component To Figma?

Connect Component To Figma fits situations like: connecting a component to Figma; adding a code connect; working on Figma Code Connect tasks in the cauldron repo.

How do I install Connect Component To Figma in Claude Code?

Run `npx skills add dequelabs/cauldron --skill connect-component-to-figma -a claude-code`. Or copy the skill folder (.claude/skills/connect-component-to-figma in dequelabs/cauldron) into .claude/skills/connect-component-to-figma in your project. Claude Code loads it when a task matches its description.

How do I install Connect Component To Figma in Codex?

Run `npx skills add dequelabs/cauldron --skill connect-component-to-figma -a codex`. Or copy the skill folder (.claude/skills/connect-component-to-figma in dequelabs/cauldron) into .agents/skills/connect-component-to-figma in your project. Codex loads it when a task matches its description.

Can I use Connect Component To Figma in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dequelabs/cauldron --skill connect-component-to-figma -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/connect-component-to-figma, .gemini/skills/connect-component-to-figma, .github/skills/connect-component-to-figma and .opencode/skills/connect-component-to-figma in your project.

What does Connect Component To Figma need to run?

Going by SKILL.md and its folder, Connect Component To Figma needs the command-line tools its instructions call (pnpm and npx). Our summary lists: Node.js.

Does Connect Component To Figma access the network?

SKILL.md names 1 domain. In commands or code: figma.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Connect Component To Figma safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Connect Component To Figma use?

Connect Component To Figma is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Connect Component To Figma use?

About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Connect Component To Figma?

Skills that share tags, products or a category with Connect Component To Figma: Wonder Blocks (Khan/wonder-blocks, 163 stars), Shift UI Components (shift-editor/shift, 348 stars), Animated React Component Libraries (Hainrixz/editor-pro-max, 264 stars) and Extract Design (Manavarya09/design-extract, 4.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Connect Component To Figma?

dequelabs (a GitHub organization) maintains it in dequelabs/cauldron, which has 129 GitHub stars. The repository was last updated on October 8, 2026.

Source: dequelabs/cauldron on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.