Agent skill Frontend
Figma Codegen
Connect design references and design tools to frontend implementation.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add awdr74100/figwright --skill figma-codegen --agent claude-code --yesCheck this file in your project.claude/skills/figma-codegen/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add awdr74100/figwright --skill figma-codegenSelect 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 approved connected Figwright file and selection, local project checkout and reusable UI and tokens, plus permission to reuse any required design assets.
View operation manualWhat this skill helps with
- Connect design references and design tools to frontend implementation.
Good for
- Design handoff
- Task
- Implement a Figma filter toolbar by reusing existing app components
- Requirements
- An approved connected Figwright file and selection, local project checkout and reusable UI and tokens, plus permission to reuse any required design assets.
- Deliverable
- A working toolbar in the existing framework, with confirmed component and token mapping evidence.
- Skill name
figma-codegen- Repository
awdr74100/figwright
Make the design workflow verifiable
An underspecified brief
Treat every fuzzy component or token mapping as authoritative.
Names or equal values can match several candidates. A wrong mapping may look similar until components or themes change.
A result you can check
- Read the connected selection, existing stack and mapping candidates.
- Use semantic evidence when resolving uncertain map results.
- The documented override files affect future runs.
Figma Codegen operation manual
A working toolbar in the existing framework, with confirmed component and token mapping evidence.
An approved connected Figwright file and selection, local project checkout and reusable UI and tokens, plus permission to reuse any required design assets.
Ground the frame and project mapping
Read the connected selection, existing stack and mapping candidates.
Prompt · Step 1Use Figwright’s installed figma-codegen Skill and read its SKILL.md first. Claim [authorized Figwright file/session] and read [filter toolbar frame] with Figwright’s get_design_context. Run the available component_map and token_map in [actual front-end workspace]. Show the resolved instance props, candidate code paths and token references, and flag any ambiguous equal-value token pair or unmatched prop.Implement it using the verified existing code
Use semantic evidence when resolving uncertain map results.
Prompt · Step 2Use Figwright’s installed figma-codegen Skill and read its SKILL.md first. Build [approved filter toolbar] in the existing stack. Reuse confirmed components with the returned instance props and reference semantic project tokens. Select between ambiguous candidates by actual meaning and rendered context. Preserve the real filtering behavior, keyboard states and responsive flow, and use only approved assets.Render and record only proven mappings
The documented override files affect future runs.
- The actual app entry point renders reused, correctly wired components and semantic tokens.
- Only confirmed mappings are eligible for persistent overrides, with any uncertain match called out.
Prompt · Step 3Use Figwright’s installed figma-codegen Skill and read its SKILL.md first. Render the toolbar at [target mobile and desktop widths]. Check the filter action, focus, components and token choices against authorized Figma context. For a previously ambiguous mapping that you proved, record it in the documented project map file if approved. Report any unverified mapping or viewport.
Look up this workflow decision
Read the relevant section in the installed Skill.
Two project color tokens have the same hex valueSKILL.md
- Command or reference
Record verified mappings (so the next run reuses, not re-guesses)- Examples
- Check the intended semantic role and any Figma binding first. Equal values alone are a hypothesis.
Troubleshooting
Is a Figma URL alone enough with this Skill?
Figwright works from a connected and identified plugin session. Its provider-specific mapping tools also need your project context.