Skill library

Agent skill Frontend

Cc Figma Component

Connect design references and design tools to frontend implementation.

  • Design to code
  • Design systems

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add nvillapiano/component-contracts-figma --skill cc-figma-component --agent claude-code --yes

Check this file in your project.claude/skills/cc-figma-component/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add nvillapiano/component-contracts-figma --skill cc-figma-component

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. An editable approved Figma file, local .component-contracts configuration, a real button.contract.json, companion Skills, and verified Primitives and Semantic collections from cc-figma-tokens.

View operation manual

What this skill helps with

  • Connect design references and design tools to frontend implementation.

Good for

  • Design handoff
Task
Build one contract-backed Button family in Figma
Requirements
An editable approved Figma file, local .component-contracts configuration, a real button.contract.json, companion Skills, and verified Primitives and Semantic collections from cc-figma-tokens.
Deliverable
Component sets derived from the Button contract, with semantic bindings and a matrix that can be checked against the source.
Skill name
cc-figma-component

Make the design workflow verifiable

An underspecified brief

Build a Button by eye and apply some colors from the file.

The contract supplies the actual states and axes. Every component-level binding needs an existing semantic variable.

A result you can check

  1. Check the local source and Figma collections before writing.
  2. Use the primary variant to decide sets and the remaining axes for properties.
  3. Compare actual variant, property and variable results with the contract.

CC Figma Component operation manual

Component sets derived from the Button contract, with semantic bindings and a matrix that can be checked against the source.

An editable approved Figma file, local .component-contracts configuration, a real button.contract.json, companion Skills, and verified Primitives and Semantic collections from cc-figma-tokens.

  1. Read the contract and preflight its bindings

    Check the local source and Figma collections before writing.

    Prompt · Step 1
    Use Component Contracts’s installed cc-figma-component Skill and read its SKILL.md first.
    
    Read [button.contract.json] and the repo’s .component-contracts settings without displaying credentials. Load figma-use and figma-generate-library and verify the intended editable Figma file has the completed Primitives and Semantic collections. Map each contract token to the real Semantic variable, report gaps, and show the proposed variant and binding plan for approval.
  2. Build the approved contract matrix

    Use the primary variant to decide sets and the remaining axes for properties.

    Prompt · Step 2
    Use Component Contracts’s installed cc-figma-component Skill and read its SKILL.md first.
    
    Apply [approved Button plan] in the authorized component page. Use one set per in-scope primary variant value, the remaining prop axes and the contract’s actual state list. Bind the component to its verified Semantic variables. Use the documented HUG defaults for the auto-layout frames and honor a contract slot’s explicit fixed sizing. Return created or updated IDs.
  3. Read back one set and test representative instances

    Compare actual variant, property and variable results with the contract.

    • Sets and variant counts match the contract and approved scope.
    • Representative instances use the intended semantic variable bindings and contract properties.
    Prompt · Step 3
    Use Component Contracts’s installed cc-figma-component Skill and read its SKILL.md first.
    
    Inspect [returned Button set] and compute the actual expected matrix from its selected size and state lists. Verify the variant count, exact properties, representative label and icon behavior where in scope, and the semantic color and spacing bindings. Review the Figma visual preview if available and report any contract case still blocked.

Look up this workflow decision

Read the relevant section in the installed Skill.

A contract refers to brand.500 but no matching variable is foundSKILL.md
Command or reference
Component Set Architecture
Examples
Check the Semantic collection for brand/500. Report the missing reference before creating the component. The pinned example also uses transparent for Secondary and Ghost, so verify how that value is represented in your file.

Troubleshooting

Are the Tier 3 bindings a third global Figma collection?

This Skill derives component-scoped bindings from the contract and binds actual component properties to the Semantic variables prepared by the token Skill.