Examines a Figma Code Connect mapping file and provides a report on the mapping's accuracy and completeness
Audit the specificed Figma Code Connect mapping file.
ALWAYS refresh your memory of the React Code Connect documentation here: https://developers.figma.com/docs/code-connect/react/
You will be provided with a name or path to a Figma Code Connect mapping file.
Code Connect files (.figma.tsx) are colocated with their corresponding components in this repo, typically within the component's local __figma__ directory.
Search for the mapping file and end your task if you cannot find it.
Within the current mapping file:
props: { ... } of the code connect mapping file.variant: { ... })
figma.connect calls with the same component.Retrieve Figma component data
get_metadata to understand the actual component structure:
get_design_context with the code connect disabled option enabled to get even more metadataIdentify Property Types Correctly Before analyzing mappings, study the Figma metadata you found:
figma.connect-best-practices SKILLfigma.textContent()figma.instance() or figma.children()For every figma.textContent() usage in the mapping file, call get_metadata on the referenced layer's node ID and confirm the metadata reports it as a <text> node. If it is an <instance>, <frame>, <symbol>, or any other non-text type, figma.textContent() will fail at runtime. Use a hardcoded placeholder string instead.
For every figma.children() usage, check whether all variants of the component have a child layer with that exact name. If different variants use different layer names for the same logical prop, the mapping needs to be split into variant-specific figma.connect() calls.
Read the React component source
Analyze Property Coverage
Create a mapping analysis table, where each row is a property from the Figma get_metadata structure:
| Figma Property | Related React Prop(s) | Mapped? | Mapping Method | Notes |
|---|
For each Figma property, indicate:
Generate Report Provide a summary with:
f79a780
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.