Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Automate Figma design token sync and asset export in CI/CD pipelines. Use when setting up GitHub Actions for Figma, automating icon exports, or validating design token changes in pull requests. Trigger with phrases like "figma CI", "figma GitHub Actions", "automate figma export", "figma CI pipeline".
.claude/skills/jeremylongshore-figma-ci-integration/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 5% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 43% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 35% | 0% |
Automate Figma API workflows in CI/CD: sync design tokens on schedule, export assets on PR, and validate design system consistency.
FIGMA_PAT stored as GitHub secretfigma-core-workflow-a)yaml# .github/workflows/figma-token-sync.yml name: Sync Figma Design Tokens on: schedule: - cron: '0 9 * * 1-5' # Weekdays at 9am UTC workflow_dispatch: # Manual trigger jobs: sync-tokens: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - run: npm ci - name: Extract tokens from Figma env: FIGMA_PAT: ${{ secrets.FIGMA_PAT }} FIGMA_FILE_KEY: ${{ vars.FIGMA_FILE_KEY }} run: node scripts/extract-figma-tokens.mjs - name: Check for changes id: diff run: | git diff --quiet src/styles/tokens.css || echo "changed=true" >> $GITHUB_OUTPUT - name: Create PR with token updates if: steps.diff.outputs.changed == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | BRANCH="figma/token-sync-$(date +%Y%m%d)" git checkout -b "$BRANCH" git add src/styles/tokens.css git commit -m "chore: sync design tokens from Figma" git push origin "$BRANCH" gh pr create \ --title "Sync design tokens from Figma" \ --body "Automated token sync from Figma file. Review the CSS changes." \ --label "design-tokens,automated"
yaml# .github/workflows/figma-asset-export.yml name: Export Figma Assets on: pull_request: paths: - 'figma-config.json' # Trigger when asset config changes jobs: export-assets: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: { node-version: '20' } - run: npm ci - name: Export icons from Figma env: FIGMA_PAT: ${{ secrets.FIGMA_PAT }} FIGMA_FILE_KEY: ${{ vars.FIGMA_ICON_FILE_KEY }} FIGMA_ICON_FRAME: ${{ vars.FIGMA_ICON_FRAME_ID }} run: node scripts/export-figma-icons.mjs - name: Commit exported assets run: | git add assets/icons/ if ! git diff --cached --quiet; then git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git commit -m "chore: export icons from Figma" git push fi
yaml- name: Validate design tokens run: | # Check that all CSS custom properties are valid node -e " const fs = require('fs'); const css = fs.readFileSync('src/styles/tokens.css', 'utf-8'); const vars = css.match(/--[\w-]+:/g) || []; console.log('Token count:', vars.length); if (vars.length < 10) { console.error('Too few tokens extracted -- possible Figma API error'); process.exit(1); } // Check for duplicate variable names const dupes = vars.filter((v, i) => vars.indexOf(v) !== i); if (dupes.length > 0) { console.error('Duplicate tokens:', dupes); process.exit(1); } "
bash# Add PAT as repository secret gh secret set FIGMA_PAT --body "figd_your-token-here" # Add file key as repository variable (not secret -- it's not sensitive) gh variable set FIGMA_FILE_KEY --body "abc123XYZdefaultFileKey" gh variable set FIGMA_ICON_FILE_KEY --body "def456IconFileKey" gh variable set FIGMA_ICON_FRAME_ID --body "123:456"
| Issue | Cause | Solution | |-------|-------|----------| | 403 in CI | PAT expired | Rotate secret: gh secret set FIGMA_PAT | | Empty token output | File key wrong | Verify FIGMA_FILE_KEY variable | | Rate limited in CI | Concurrent workflows | Add concurrency group to workflow | | Stale cache | Node modules cached | Clear with actions/cache invalidation |
Trigger the Step 1 token-sync workflow manually and verify it opens a PR only when tokens changed:
bashgh workflow run figma-token-sync.yml gh run watch && gh pr list --label design-tokens
text#142 chore(tokens): sync design tokens from Figma design-tokens open
The diff shows exactly what changed in the design file:
diff- "color-brand-primary": "#4338ca", + "color-brand-primary": "#4f46e5",
No-change runs exit green without a PR (idempotent by design). Asset export on PR and the validation gate: references/asset-export-on-pr.md, references/design-system-validation.md.
For deployment patterns, see figma-deploy-integration.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 19,293 | 21,398 | +11% | 1 | 1 | 0% | 3,682 | 3,858 | +5% | 0 | 0 | — |
case-02 | fail→pass | 14,962 | 9,178 | -39% | 1 | 1 | 0% | 2,424 | 3,466 | +43% | 0 | 0 | — |
case-03 | fail→pass | 16,034 | 15,714 | -2% | 1 | 1 | 0% | 3,086 | 4,189 | +36% | 0 | 0 | — |
case-04 | pass→pass | 11,214 | 6,422 | -43% | 1 | 1 | 0% | 1,690 | 2,680 | +59% | 0 | 0 | — |
case-05 | pass→pass | 6,362 | 3,017 | -53% | 1 | 1 | 0% | 1,173 | 2,126 | +81% | 0 | 0 | — |
case-06 | fail→pass | 8,244 | 2,792 | -66% | 1 | 1 | 0% | 1,500 | 2,079 | +39% | 0 | 0 | — |
case-07 | fail→pass | 12,010 | 7,538 | -37% | 1 | 1 | 0% | 2,282 | 3,078 | +35% | 0 | 0 | — |
case-08 | fail→pass | 11,154 | 2,788 | -75% | 1 | 1 | 0% | 1,845 | 2,053 | +11% | 0 | 0 | — |
case-09 | fail→pass | 7,001 | 2,874 | -59% | 1 | 1 | 0% | 1,273 | 2,029 | +59% | 0 | 0 | — |
case-10 | fail→fail | 7,563 | 3,670 | -51% | 1 | 1 | 0% | 1,310 | 2,136 | +63% | 0 | 0 | — |
case-11 | fail→pass | 9,630 | 2,591 | -73% | 1 | 1 | 0% | 1,608 | 2,045 | +27% | 0 | 0 | — |
case-12 | pass→pass | 11,763 | 5,100 | -57% | 1 | 1 | 0% | 1,896 | 2,485 | +31% | 0 | 0 | — |
case-13 | pass→pass | 9,891 | 2,493 | -75% | 1 | 1 | 0% | 1,503 | 2,047 | +36% | 0 | 0 | — |
case-14 | fail→pass | 15,995 | 5,071 | -68% | 1 | 1 | 0% | 2,355 | 2,516 | +7% | 0 | 0 | — |
case-15 | pass→pass | 13,939 | 3,143 | -77% | 1 | 1 | 0% | 2,222 | 2,138 | -4% | 0 | 0 | — |
case-16 | pass→pass | 6,414 | 5,626 | -12% | 1 | 1 | 0% | 1,040 | 2,539 | +144% | 0 | 0 | — |
case-17 | fail→pass | 10,178 | 5,466 | -46% | 1 | 1 | 0% | 1,726 | 2,312 | +34% | 0 | 0 | — |
case-18 | fail→pass | 12,231 | 2,022 | -83% | 1 | 1 | 0% | 1,630 | 1,947 | +19% | 0 | 0 | — |
case-19 | pass→pass | 7,787 | 2,312 | -70% | 1 | 1 | 0% | 1,163 | 1,978 | +70% | 0 | 0 | — |
case-20 | pass→pass | 9,256 | 8,733 | -6% | 1 | 1 | 0% | 1,753 | 3,354 | +91% | 0 | 0 | — |
case-21 | pass→pass | 13,874 | 9,045 | -35% | 1 | 1 | 0% | 2,214 | 3,374 | +52% | 0 | 0 | — |
case-22 | pass→pass | 25,565 | 3,734 | -85% | 1 | 1 | 0% | 699 | 2,258 | +223% | 0 | 0 | — |
case-23 | fail→pass | 8,992 | 5,151 | -43% | 1 | 1 | 0% | 1,678 | 2,351 | +40% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +52 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.