Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
fandhe-ai avatar

Figma

  • 2 installs
  • 2 repo stars
  • Updated August 3, 2026
  • fandhe-ai/agent-reference-skills

Reference Figma Code Connect batch files for mapping many Figma components to code with a single shared template, ideal for icon sets and large libraries.

About

A reference for Figma Code Connect batch files that connect many components to code via one shared template with enum-driven props. A developer loads it when wiring large Figma component libraries to code.

  • Shared template file plus JSON component mapping
  • Enum-based prop mapping for consistent patterns like icon sets

Figma by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #1,564 of 1,880 Design & UI/UX skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/fandhe-ai/agent-reference-skills --skill figma

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
repo stars2
Last updatedAugust 3, 2026
Repositoryfandhe-ai/agent-reference-skills

What it does

Reference Figma Code Connect batch files for mapping many Figma components to code with a single shared template, ideal for icon sets and large libraries.

Files

references/code-connect/batch-files.mdMarkdownGitHub ↗

Batch Files

Connect many Figma components to code using a single shared template, ideal for large libraries with consistent patterns (e.g., icon sets).

Signature / Usage

Template file (icons.figma.batch.ts):

import figma from 'figma'

const size = instance.getEnum('Size', {
  Small: '16px',
  Medium: '24px',
  Large: '32px',
})

export default {
  example: figma.code`<${figma.batch.name} size={${size}} />`,
  imports: [`import ${figma.batch.name} from "${figma.batch.importPath}"`],
  id: figma.batch.id,
}

JSON file (icons.figma.batch.json):

{
  "templateFile": "./icons.figma.batch.ts",
  "components": [
    {
      "url": "https://www.figma.com/design/ABC/File?node-id=1-1",
      "name": "Icon24Arrow",
      "id": "icon-arrow",
      "importPath": "@company/icons/arrow"
    }
  ]
}

Options / Props

figma.batch object fields

FieldSourceDescription
urlJSON url (required)Replaces the // url= metadata comment
sourceJSON source (optional)Replaces the // source= metadata comment
componentJSON component (optional)Replaces the // component= metadata comment
Custom fieldsAny JSON fieldAccessible as figma.batch.<fieldName>

JSON file structure

Single template (shorthand):

{
  "templateFile": "./template.figma.batch.ts",
  "components": [ { "url": "...", ... } ]
}

Multiple templates:

[
  { "templateFile": "./icons.figma.batch.ts", "components": [...] },
  { "templateFile": "./buttons.figma.batch.ts", "components": [...] }
]

Notes

  • Batch template files do not include metadata comments (// url=, // source=, // component=) at the top — this data comes from the JSON file instead
  • .figma.batch.json files are discovered automatically via existing include/exclude globs (default globs already cover **/*.figma.batch.json)
  • Each component entry in the JSON publishes as an independent Code Connect document
  • Publish with the standard npx figma connect publish command

Related

  • Template Files
  • Template API
  • CLI Reference

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.