/storefront-next-figma:sfnext-create-figma-kitfrom storefront-next-figma
Build or sync a Storefront Next vertical's Figma design kit — duplicate the official kit, update Brand variable collections from brand.css, edit components at the correct layer, and publish Figma Code Connect mappings. Use when asked to set up, duplicate, or sync a Figma kit, update Figma brand variables, or keep design and code tokens aligned.
Ships in storefront-next-figma. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill is the entrypoint for setting up or syncing the Figma design kit for a Storefront Next vertical, so the kit stays aligned with the brand tokens defined in code.
It is the design-kit companion to sfnext-theming (in the storefront-next plugin): create or change the brand tokens in code first, then run this skill to mirror them in Figma.
This workflow uses the Figma MCP server. Before proceeding, confirm:
node-id parameter for the component or frame to work with.If the Figma MCP server is not connected, stop here. Configure it (see your IDE's MCP docs), then return to this skill.
Getting a node-id: in Figma, right-click any frame or component → Copy/Paste as → Copy link. The URL contains node-id=<value>.
Duplicate the official Storefront Next Design System community kit: https://www.figma.com/community/file/1646023293012114166
Open the community file in Figma and use Open in Figma → Duplicate to copy it into your own drafts, then move it into your team project. Record the new file key in your project's design-system notes (e.g. docs/design-system/FIGMA_FILE_KEYS.md) so the mapping is reproducible.
Do this in Figma (API duplication needs elevated OAuth scopes):
Storefront NEXT — [Vertical Name].figma.com/design/<FILE_KEY>/...) and record it.Update only the Brand collection values to match src/theme/tokens/brand.css. Do not edit Semantic/Core values directly — they alias the Brand values.
CSS variable (brand.css) | Figma variable |
|---|---|
--brand-black | Brand / black |
--brand-white | Brand / white |
--brand-gray-50 … --brand-gray-950 | Brand / gray-* |
--brand-primary | Brand / primary |
Non-negotiable color rule: all fills/strokes/effects bind to variables. No raw hex/RGB. If no existing variable fits, stop, document the node and reason, propose a name/value, and get approval before creating it. See Figma Component Editing Reference.
If the vertical uses custom fonts, update the text styles (text/body, text/label, text/heading) and make sure the fonts are available via the Figma Font Service or uploaded custom fonts.
When a component needs to change, edit at the right layer and respect the instance/component boundary — you cannot append children to an instance; edit the source component. See Figma Component Editing Reference for the layer table and the extend-before-create rule, and Vertical → Figma Kit Sync Reference for tracing code changes to the right Figma node.
Maintain .figma.ts mappings for components and publish them after changes.
// src/components/ui/<component>.figma.ts
import { figma } from '@figma/code-connect'
import { ComponentName } from './<component>'
figma.connect(ComponentName, 'FIGMA_FILE_URL', {
props: {
variant: figma.enum('Variant', {
default: 'default',
secondary: 'secondary',
}),
},
example: ({ variant }) => <ComponentName variant={variant} />,
})
Replace FIGMA_FILE_URL with the full Figma URL including node-id, then publish:
FIGMA_ACCESS_TOKEN=<your-token> npx figma connect publish
Ongoing: token change in brand.css → update Brand variables → republish. Component prop/variant change → update .figma.ts → republish Code Connect.
src/theme/tokens/brand.css; no detached hex/RGB.If you changed .figma.ts mappings or component code as part of the sync, run from the monorepo root:
pnpm typecheck
pnpm lint
pnpm test-storybook:snapshot:agent
All three must pass with zero errors and zero warnings.
storefront-next:sfnext-theming - Define the brand tokens in code (run this first)storefront-next:sfnext-components - Author the React component a Code Connect mapping points to.figma.ts mappings liveevals/trigger-evals.json (opens in a new tab)references/FIGMA-COMPONENT-EDITING.md (opens in a new tab)references/PROJECT-STRUCTURE.md (opens in a new tab)references/TOKEN-SYSTEM.md (opens in a new tab)references/TROUBLESHOOTING.md (opens in a new tab)references/VERTICAL-FIGMA-SYNC.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
figma-kit, design-tokens, brand-variables, code-connect, design-sync
npx claudepluginhub salesforcecommercecloud/b2c-developer-tooling --plugin storefront-next-figmaOther plugins' skills for the same job