Agent skill
figma
Tool for fetching Figma design data and downloading images.
Install this agent skill to your Project
npx add-skill https://github.com/rakibdev/dotfiles/tree/main/home/.config/ai/skills/figma
SKILL.md
Environment
FIGMA_ACCESS_TOKEN- Personal access token from Figma settings
Usage
Get Node Data
bun scripts/get-node.ts "<figmaUrl>" [depth]
bun scripts/get-node.ts "<fileKey>" [nodeId] [depth]
Examples
# Get node from URL (preferred)
bun scripts/get-node.ts "https://www.figma.com/design/abc123/MyFile?node-id=825-17286"
# Limit depth for overview
bun scripts/get-node.ts "https://www.figma.com/design/abc123/MyFile?node-id=825-17286" 2
# Get entire file (no node-id in URL)
bun scripts/get-node.ts "https://www.figma.com/design/abc123/MyFile" 2
# Raw args (fileKey + nodeId)
bun scripts/get-node.ts "abc123" "825-17286" 3
Download Image
bun scripts/download-image.ts "<figmaUrl>" "<outputPath>" [format] [scale]
bun scripts/download-image.ts "<fileKey>" "<nodeId>" "<outputPath>" [format] [scale]
Examples
# Download from URL (preferred)
bun scripts/download-image.ts "https://www.figma.com/design/abc123/MyFile?node-id=825-17286" "./assets/card.png"
# Download as SVG
bun scripts/download-image.ts "https://www.figma.com/design/abc123/MyFile?node-id=100-200" "./assets/icon.svg" svg
# PNG at 3x scale
bun scripts/download-image.ts "https://www.figma.com/design/abc123/MyFile?node-id=100-200" "./assets/hero.png" png 3
Tips
- Use depth 1-2 for initial exploration to understand file structure
- Default depth: unlimited (fetches all nested children)
- File data cached in
~/.cache/figma/for 3 days to avoid rate limits - Use
IMAGE-SVGtype nodes for icons/vectors, download as SVG - For photos/complex images, download as PNG at 2x scale (default)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
valibot
Valibot schema validation for backend and frontend forms.
vue
Vue coding style and best practices.
tailwind
Tailwind CSS styling conventions.
websearch
Search Google
github
Fetch GitHub URLs, repos, issues, pull requests, code search
shadcn
shadcn/ui component library conventions.
Didn't find tool you were looking for?