vanessamarely/ai-playbook-reposito/figma-component
Claude Code and agent skill by vanessamarely/ai-playbook-reposito
- community
Checking that the SKILL.md file is still in the repository.
Converts Figma nodes into production-ready React/TypeScript components using project-provided conventions and reusable component libraries. Use when implementing or updating UI from Figma in any project scope.
Install
npx vskill@latest install vanessamarely/ai-playbook-reposito/figma-componentSKILL.md
The same SKILL.md was published earlier as vanessamarely/ai-playbook-reposito/figma-component.
Skill: figma-component
Purpose
Provide reusable, project-agnostic rules and templates for converting Figma designs into code.
The skill must not assume any fixed client name, repository name, or component-library name.
Required Input Contract
The caller must provide these values in the initial prompt:
scope: target top-level project folder.destination_folder: exact folder where generated files should be created/updated.component_library: preferred reusable component library ornone.client_context: concise project conventions (tokens, styling model, naming, export rules, test expectations).figma_urlor{fileKey,nodeId}.
If Figma is not accessible, the caller must provide:
screenshot_image: attached screenshot(s) of the target component/frame.
Optional:
dev_url: URL for browser-based validation.create_mode:previeworapply.preferences: request-level overrides.
If required input is missing, stop and request clarification before generating code.
If Figma access fails and no screenshot is provided, request screenshot input before generating code.
Core Rules
1) Reuse Existing Components First
- Search
scopefor existing components and wrappers before creating new primitives. - Prioritize composition/adapters around
component_librarywhen available. - If
component_libraryisnone, follow local component patterns inscope.
2) Scope Isolation
- Edit only files under
scope. - Do not modify sibling projects or root-level shared exports without explicit confirmation.
3) Minimal Patch Strategy
- Prefer focused diffs (usually 1-3 files).
- Only include
.test.tsxand.stories.tsxwhen tooling is present inscope/package.json.
4) File Layout
Default layout for a new component Xyz (adjust to project conventions in client_context):
<destination_folder>/Xyz.tsx<destination_folder>/Xyz.styles.ts(or project style equivalent)<destination_folder>/Xyz.test.tsx(only if Jest/Vitest is configured)<destination_folder>/Xyz.stories.tsx(only if Storybook is configured)
5) TypeScript and React Standards
- Prefer functional components.
- Use strict typing and avoid
anyunless unavoidable. - Keep naming consistent with local conventions from
client_context.
6) Accessibility Baseline
- Meet WCAG 2.2 AA requirements for generated UI.
- Ensure semantic markup, keyboard support, and appropriate ARIA usage.
7) Figma Fallback Workflow
- Attempt to load design context from the Figma MCP server first.
- If unavailable or incomplete, switch to screenshot-driven implementation.
- Use attached screenshot(s) to infer structure, spacing, typography, states, and interactions.
- If screenshots are insufficient (missing states or responsive behavior), ask the user for additional screenshots.
- Clearly state in output whether implementation source was Figma context or screenshot fallback.
Verification and Quality Gates
Before completion, provide project-specific commands based on available scripts in scope/package.json:
- type check
- lint
- unit tests
- Storybook (if available)
If dev_url is provided, run browser validation via the Chrome MCP server:
- capture visual state screenshots
- run automated
axe-coreaccessibility checks - gather console and network issues
- return JSON report in the shape:
If violations are found, include concrete remediation guidance and do not mark work complete until fixes are proposed.
Apply Patch Output Requirement
When generating code changes, output minimal, reviewable diffs (using Copilot's native edit tools directly, not a manual patch format).
Generic Prompt Examples
1) Create component from Figma
"scope:web-client destination_folder:src/components/account component_library:acme-ui client_context:TypeScript strict, CSS modules, named exports figma_url:https://figma.com/design/FILEKEY/NAME?node-id=1-2 dev_url:http://localhost:6006 create_mode:preview"
2) Build adapter around an existing library component
"scope:portal-app destination_folder:src/ui component_library:design-system-react client_context:Tailwind, barrel exports by feature fileKey:ABC nodeId:1:2 dev_url:http://localhost:3000 create_mode:apply"
3) Local-only generation without shared library
"scope:admin-console destination_folder:src/components component_library:none client_context:SCSS modules, PascalCase components figma_url:https://figma.com/design/FILEKEY/FRAME?node-id=2-8 create_mode:preview"
4) Screenshot fallback when Figma is unavailable
"scope:admin-console destination_folder:src/components component_library:none client_context:SCSS modules, PascalCase components screenshot_image:<attached image> create_mode:preview"
Deliverables
- Applied edits (or a preview plan, depending on
create_mode) - Concise human-readable change summary
- Chrome MCP a11y/visual JSON report when
dev_urlis supplied - Verification checklist
Maintenance
Keep this skill generic and free of client-specific names. Put client-specific details only in runtime prompt inputs (scope, destination_folder, component_library, client_context).
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingai-playbook/.github/skills/figma-component/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vanessamarely/ai-playbook-reposito/figma-component)