figma-to-code — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited figma-to-code (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generate production-ready React/Next.js code from Figma designs. Provides systematic workflows for using Figma MCP tools, enforces component reuse, maps Figma variants to code props.
Use this skill when:
Do not use this skill when:
Required dependency: Figma MCP Server must be installed.
Before using Figma MCP tools, verify the server is available by attempting to use any Figma MCP tool (e.g., mcp__figma-desktop__get_metadata). If you receive an error indicating the tool is not available:
Prompt user with:
❌ Figma MCP Server Not Installed
To use Figma designs with Claude Code, you need to install the Figma MCP server.
Installation steps:
1. Open Figma Desktop app
2. Navigate to the MCP server installation guide:
https://developers.figma.com/docs/figma-mcp-server
3. Follow the installation instructions for your operating system
4. Restart Claude Code after installation
Also ensure:
- Figma Desktop app is running
- You're logged into Figma
- The design file is open or you have access to itOnly proceed with Figma MCP tools after confirming the server is installed.
When user provides a Figma link or node ID, YOU MUST follow this exact tool sequence. Do NOT skip steps or change the order.
#### Step 1: Get Metadata (REQUIRED FIRST)
Tool: mcp__figma-desktop__get_metadata
Extract:
- Component/frame names and hierarchy
- Layer types (COMPONENT, FRAME, INSTANCE)
- Variant property names
- Child element structureLook for: Component or frame? Variant properties? Children organization? Naming patterns?
#### Step 2: Get Design Context (REQUIRED SECOND)
Tool: mcp__figma-desktop__get_design_context
Extract:
- Colors (with variable references like "colors/iris/950")
- Spacing (padding, gaps, margins)
- Typography (font family, size, weight)
- Border radius, shadows, effects
- Component variant valuesLook for: Which Figma variables? Spacing values? Hard-coded values?
#### Step 3: Get Screenshot (REQUIRED THIRD)
Tool: mcp__figma-desktop__get_screenshot
Use for: Visual verification, understanding layout#### Step 4: Get Variables (REQUIRED FOURTH)
Tool: mcp__figma-desktop__get_variable_defs
When: Design uses Figma variables extensively or checking token consistencyAlways include for proper logging:
{ clientLanguages: "typescript,javascript", clientFrameworks: "react,nextjs" }Do: ✓ Start with metadata, ✓ Use context for details, ✓ Use parameters Don't: ✗ Skip metadata, ✗ Wrong order, ✗ Screenshot alone
Operate exclusively in the frontend layer by default. Figma designs represent UI/UX and should translate to frontend code only.
Frontend scope:
[FRONTEND_DIR]/app/ - Next.js pages and routes[FRONTEND_DIR]/components/ - React components[FRONTEND_DIR]/lib/ - Frontend utilities[FRONTEND_DIR]/hooks/ - Custom React hooks[FRONTEND_DIR]/public/ - Static assetsDo NOT touch without permission:
[BACKEND_DIR]/ - Backend directories and filesALWAYS ask user before:
Ask with this format:
⚠️ Backend Change Required
To implement this Figma design, the following backend changes are needed:
[Specific backend changes listed]
Frontend can be mocked with placeholder data until backend is ready.
Would you like me to:
1. Implement frontend with mocked data (recommended)
2. Implement both frontend and backend
3. Only implement frontend and document backend requirementsOnly proceed WITHOUT asking if:
Implement frontend with mock data first, document required API shape.
// TODO: Replace with actual API call to [BACKEND_DIR]/[API_MODULE]
const mockProducts = [{ id: 1, name: "Product 1", price: 99 }]
/**
* Backend API Required:
* GET /api/products
* Response: { products: Array<{id, name, price, imageUrl}> }
* Backend file: [BACKEND_DIR]/[API_MODULE]/routes.ts
*/
export function ProductList() {
const products = mockProducts
return // Render using mock data
}#### Check Existing Components First
Search locations:
[COMPONENTS_DIR]/ui/ - UI library base components[COMPONENTS_DIR]/ - Custom componentsSearch method:
[COMPONENTS_DIR]/ui/{name}.tsxKey components to check for:
#### Decision Matrix
| Figma Design | Action |
|---|---|
| Matches existing exactly | Use existing with props |
| Matches with minor tweaks | Use existing + className |
| Can be composed | Use composition pattern |
| Needs new variant | Ask user before extending |
| Completely new pattern | Create new component |
| Figma Property | Figma Value | Code Prop | Code Value |
|---|---|---|---|
| variant | Primary | variant | "primary" |
| variant | Secondary | variant | "secondary" |
| variant | Outlined | variant | "outline" |
| size | Small | size | "sm" |
| size | Large | size | "lg" |
| state | Disabled | disabled | true |
// Figma: Button/Primary/Large/Disabled
<Button variant="primary" size="lg" disabled={true}>Text</Button>// Example: Using your styling system for variants
const componentVariants = [VARIANT_SYSTEM_IMPLEMENTATION]
// Map Figma variant properties to your component's variant props
// e.g., Figma "Primary" -> variant="primary"
// e.g., Figma "Small" -> size="sm"import * as React from "react"
import { [STYLING_UTILITY] } from "[UTILITY_PATH]"
interface ComponentNameProps extends React.HTMLAttributes<HTMLDivElement> {
variant?: "primary" | "secondary" // Map from Figma variants
size?: "sm" | "lg" // Map from Figma size variants
}
export const ComponentName = React.forwardRef<HTMLDivElement, ComponentNameProps>(
({ className, variant = "primary", size = "lg", ...props }, ref) => {
return (
<div
ref={ref}
className={[APPLY_STYLES_BASED_ON_VARIANTS]}
{...props}
/>
)
}
)
ComponentName.displayName = "ComponentName"Map Figma colors to your design system:
colors/primary/600 → [YOUR_PRIMARY_COLOR_TOKEN]// Use your project's responsive breakpoint system
className={[RESPONSIVE_LAYOUT_CLASSES]}
// Use your project's theme/dark mode system
className={[THEME_AWARE_CLASSES]}Naming:
ProductCard.tsx)format-date.ts)page.tsx)Locations:
[COMPONENTS_DIR]/ui/component-name.tsx[COMPONENTS_DIR]/feature-name/component-name.tsx[PAGES_DIR]/route/component-name.tsxany types, proper interfacesconst and readonlynull over undefinedisLoading, hasErrorImport order:
// 1. React/frameworks
import * as React from "react"
// 2. External packages
import { [EXTERNAL_UTILITIES] } from "[PACKAGE]"
// 3. Internal components
import { Button } from "[COMPONENTS_DIR]/ui/button"
// 4. Types
import type { User } from "[TYPES_DIR]"Always include:
<button>, <nav>, <main><button aria-label="Close" aria-pressed={isActive} disabled={isDisabled}>
<X className="h-4 w-4" aria-hidden="true" />
</button>// [PAGES_DIR]/route-name/page.tsx
import { ComponentA } from "[COMPONENTS_DIR]/ui/component-a"
export default function PageName() {
return (
<div className={[CONTAINER_STYLES]}>
<header><h1 className={[HEADING_STYLES]}>Page Title</h1></header>
<main className={[LAYOUT_STYLES]}><ComponentA /></main>
</div>
)
}Before providing code, verify:
any types, proper TypeScriptFor detailed workflow examples, see the reference file: examples.md
Examples include:
When Figma data unclear: Ask for clarification, use screenshot as fallback, document assumptions
When no component matches: Document why existing don't work, ask user: extend or create new?
When backend requirements unclear: Document API shape in JSDoc, use TypeScript interfaces, provide mock data
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.