WHAT: Download screen screenshots from Figma files via bash script. WHEN: extracting visual assets, creating screenshot references, archiving designs...
Download screen screenshots from Figma design files using a bash script.
Use this skill when:
Required:
Environment Variable:
export FIGMA_API_KEY="your-figma-personal-access-token"
Obtaining Figma Access Token:
Quick link: https://www.figma.com/settings#access-tokens
The script:
.devorch/artifacts/figma-screenshots/{fileKey}/# Navigate to your project directory
cd /path/to/your/project
# Run the script with a Figma URL
.claude/skills/figma-dev-mode/figma-image-downloader/scripts/download-figma-images.sh "https://figma.com/design/FILE_KEY/Design-Name?node-id=123-456"
The script accepts Figma URLs in these formats:
https://figma.com/file/FILE_KEY/Design-Name
https://figma.com/design/FILE_KEY/Design-Name
https://figma.com/design/FILE_KEY/Design-Name?node-id=123-456
node-id parameter (optional):
# Download all screens from a Figma file
.claude/skills/figma-dev-mode/figma-image-downloader/scripts/download-figma-images.sh \
"https://figma.com/design/abc123xyz/Mobile-App-Screens?node-id=100-200"
Output:
Found 12 screens
ā home_screen
ā profile_screen
ā settings_screen
...
ā
Downloaded 12 screens to .devorch/artifacts/figma-screenshots/abc123xyz
Images are saved to:
.devorch/artifacts/figma-screenshots/
āāā {fileKey}/
āāā home_screen.png
āāā profile_screen.png
āāā settings_screen.png
āāā ...
File Naming:
The script processes all frames:
FRAME type nodesResolution:
Format:
ERROR: Missing FIGMA_API_KEY or URL_ARG argument
Fix: Set the FIGMA_API_KEY environment variable:
export FIGMA_API_KEY="your-token-here"
ERROR: Invalid Figma URL
Fix: Ensure URL contains valid file key:
/file/ or /design/ URLERROR: API Error: 403
Possible causes:
Fix:
ERROR: Node not found
Fix:
ERROR: No screens found
Possible causes:
Fix:
When Claude Code needs to download Figma images:
To download screens from the Figma file, I'll use the figma-image-downloader skill.
First, let me extract the file key from the URL you provided: `abc123xyz`
Now I'll run the download script:
Then execute:
.claude/skills/figma-dev-mode/figma-image-downloader/scripts/download-figma-images.sh \
"https://figma.com/design/abc123xyz/App-Screens"
figma-screenshots/{fileKey}/Set environment variable persistently: Add to your shell profile (~/.zshrc, ~/.bashrc):
export FIGMA_API_KEY="your-token-here"
Organize downloads by spec:
# Images are automatically saved to .devorch/artifacts/figma-screenshots/{fileKey}/
# Copy them to spec visuals if needed:
SPEC_NAME="2025-01-10-onboarding-flow"
mkdir -p devorch/specs/$SPEC_NAME/planning/visuals
cp .devorch/artifacts/figma-screenshots/*/*.png devorch/specs/$SPEC_NAME/planning/visuals/
Use in CI/CD pipelines:
# Example GitHub Actions step
- name: Download Figma screenshots
env:
FIGMA_API_KEY: ${{ secrets.FIGMA_API_KEY }}
run: |
.claude/skills/figma-dev-mode/figma-image-downloader/scripts/download-figma-images.sh \
"${{ env.FIGMA_DESIGN_URL }}"
Gitignore is already configured:
The .devorch/artifacts/ directory is typically already gitignored.
Or commit for version tracking:
# Commit screenshots for visual regression
git add .devorch/artifacts/figma-screenshots/
git commit -m "docs: add Figma screenshots for feature X"
Figma MCP (figma-researcher skill):
Figma Image Downloader (this skill):
Use both:
Location:
.claude/skills/figma-dev-mode/figma-image-downloader/scripts/download-figma-images.sh
Dependencies:
API Endpoints Used:
GET https://api.figma.com/v1/files/{fileKey} - Get file structureGET https://api.figma.com/v1/images/{fileKey} - Get image export URLsFigma API Documentation: https://www.figma.com/developers/api
Script not found:
# Verify script location
ls -la .claude/skills/figma-dev-mode/figma-image-downloader/scripts/
# If missing, skill may not be installed
devorch install
Permission denied:
# Make script executable
chmod +x .claude/skills/figma-dev-mode/figma-image-downloader/scripts/download-figma-images.sh
# Or run with bash explicitly
bash .claude/skills/figma-dev-mode/figma-image-downloader/scripts/download-figma-images.sh "$URL"
Network timeouts:
Rate limiting: