generating-code-connect

A workflow for connecting Figma designs to React or Angular components through Code Connect files. Figma is a collaborative design tool, while React and Angular are tools for building web interfaces.

In plain words
What is it for?
Use it to create or validate Code Connect files, configure the Figma project, map selected components, and optionally publish the mappings.
Why use it?
It helps map design components to their code equivalents and checks the mappings before they are published. This reduces ambiguity between the design file and the component repository.

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/bitovi/superconnect/generating-code-connect
Any agent
npx skills add bitovi/superconnect --skill generating-code-connect
Clone the repo
git clone --depth 1 https://github.com/bitovi/superconnect

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,326 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00067 $0.02326
Opus 5 $0.00034 $0.01163
Sonnet 5 $0.00013 $0.00465
Haiku 4.5 $0.00007 $0.00233

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

Security

Grade A, and why

generating-code-connect scanned grade A with 1 finding 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.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/check_figma_cli.sh, scripts/colors.js, scripts/figma-scan.js, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `curl -s -o /dev/null -w "%{http_code}\n" -H "X-Figma-Token: $FIGMA_ACCESS_TOKEN" https://api.figma.com/v1/files/<fileKey>`
skill/generating-code-connect/SKILL.md · 238 lines

How it starts

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

Generating Code Connect

Scope

Create Code Connect files, write figma.config.json, validate mappings, and optionally publish

Command line first

  • Prefer rg, jq, and ast-grep over manual inspection
  • Use CLI tools or tiny scripts to validate and inspect outputs before editing by hand
  • When extracting or transforming JSON, use jq instead of ad-hoc parsing

Inputs to collect

  • Repo path, default current working directory
  • Figma file URL
  • Framework, auto-detect or ask React vs Angular
  • Component scope, comma-separated list or Enter for all
  • Output directory, default codeConnect
  • Permission to install @figma/code-connect locally if missing

Default behaviors

  • Generate all components when the user hits Enter on scope
  • Prefer local @figma/code-connect over global installs
  • Do not overwrite existing Code Connect files unless the user agrees

Workflow

  1. Pre-flight checks
  • Parse the file key from the Figma URL
  • Validate the token against the target file without printing it:
    • curl -s -o /dev/null -w "%{http_code}\n" -H "X-Figma-Token: $FIGMA_ACCESS_TOKEN" https://api.figma.com/v1/files/<fileKey>
  • Check for @figma/code-connect with scripts/check_figma_cli.sh
  • If the token check returns 403 but the user says it is valid:
    • Locate the token source without printing it: rg -l -g '.env*' -g 'superconnect.toml' "FIGMA_ACCESS_TOKEN|figma_access_token"
    • Ask the user to set the token in the current shell and re-run the check
    • Confirm the token is non-empty without printing it: echo ${#FIGMA_ACCESS_TOKEN}
    • Do not echo or paste the token value in any command or response
  1. Detect framework
  • Read package.json and look for react or @angular/core
  • If ambiguous, ask the user to choose
  1. Extract Figma data with figma-scan.js
  • Use the bundled script for reliable extraction:
    node scripts/figma-scan.js <figmaFileUrl> \
      --token $FIGMA_ACCESS_TOKEN \
      --output codeConnect/.figma-evidence \
      --index codeConnect/.figma-evidence/figma-components-index.json
    
  • The script handles all Figma API complexity including:
    • Fetching componentPropertyDefinitions via /v1/files/:key/nodes endpoint
    • Parsing variant properties from component names
    • Extracting text layers for figma.textContent()
    • Extracting slot layers for figma.children()
    • Normalizing property names to camelCase
  • Do NOT use raw curl + jq for extraction - the API has edge cases the script handles
  • See references/figma-extraction-spec.md for output format details

Read the full file on GitHub · 238 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 · 238 lines · 67 tokens per session scan A ca21101529a7

Subscribe to this mod's changes

generating-code-connect is a skill published in the GitHub repository bitovi/superconnect (24 stars, last pushed 7mo ago), licensed MIT. It adds 67 tokens to every session and 2,326 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens