coding Growing

Design File Automations

Python scripts that automate repetitive design file management — batch renaming, asset export, Figma token syncing, and project scaffolding.

Planted
Last tended
Tags
CodingAutomationPython

Key Takeaway

The best automation isn't the most complex — it's the one that removes a daily 2-minute task you've been doing manually for years.

The Problem

Design teams generate thousands of files. Exports pile up with inconsistent names, token updates require manual copy-paste across repos, and scaffolding a new project means copying the last one and deleting half the files.

These are small frictions — 2 minutes here, 5 minutes there — but they compound into hours of lost focus every week.

What I Built

A collection of Python scripts (and one GitHub Action) that handle the tasks I was doing manually:

  • Batch rename — Standardize filenames across export folders using a naming convention config file
  • Asset export pipeline — Watch a Figma file for changes, auto-export updated components to the repo
  • Token sync — Pull design tokens from Figma and generate CSS custom properties and TypeScript types
  • Project scaffolder — Interactive CLI that sets up a new design project with the right folder structure, README template, and git hooks

Process & Iterations

Started with shell scripts — quick but brittle. Moved to Python for better error handling and cross-platform support.

The Figma API integration was the trickiest part. Rate limits, webhook reliability, and handling partial exports required retry logic and idempotent file writes.

The scaffolder started as a simple mkdir chain and evolved into a full CLI with click — adding prompts for project type, design system version, and CI configuration.

What’s Next

Currently adding an AI-assisted layer to the token sync — using LLM calls to suggest semantic token names when new raw values are detected. Early experiments show promise but need guardrails to avoid naming drift.

Tools Used

PythonVS CodeGitHub ActionsFigma API