Header Image

Using AI to Democratize Scripts

For designers who want the power of scripts without becoming developers.


AI can do everything… until you need the same result twice. That's where things start to break.

AI is what we call probabilistic. The same input can give you slightly different outputs every time. For exploration, that's powerful. For production work, it can be a problem.

Because in design systems you have repeatable tasks where you don't want variation. You want the same input to always produce the same output.

That's where scripts come in.

Scripts are deterministic. They do one thing, the same way, every time.

And until recently I often never got past the installation — but AI changed that.



Example: Cleaning Icons with SVGO

As part of the design system at TV 2, we maintain a set of icons.

Before they're ready to use, they need a bit of cleaning. Otherwise, they behave slightly differently, are harder to work with, and tend to cause small issues over time.

Nothing dramatic—but enough to be annoying.

A few years ago, using a script for this felt like more trouble than it was worth. There are plenty of good scripts out there, but getting them to run locally, figuring out dependencies, and fixing errors… it wasn't exactly easy. At least not for me.

Installation

This is where things have changed quite a bit.

What used to involve following tutorials and trying to make sense of error messages is now much simpler.

Now I can paste a GitHub URL into an the AI Chat and get guided through the setup step by step. When something breaks, I don't have to guess—I can just ask.

It doesn't remove all friction, but it lowers it enough that it's actually doable.

Configuration

Configuration used to mean digging through config files and hoping you didn't break something. (Disclaimer - something always broke)

Now I can just describe what I want.

In this case, I explained how I wanted the icons to be cleaned—and had the AI adjust the setup accordingly. I even had it spin up a small test page so I could validate the results before using them.

Small things like this helps a vsiual person like me to be certain

Usage

Even when a script is set up, you still need to remember how to run it.

That's usually where things fall apart.

So instead of expecting someone to remember something like
run svgo -- …
we chose to lower the technical barrier with a different approach. We made a small AI-powered workflow using skills.

Now, a design system maintainer can just drop an SVG into a chat and write:

"Add this blog icon"

That triggers a clean-icon skill.

Behind the scenes, the AI follows the process described in the skill

  • runs the SVGO script
  • cleans the SVG
  • places it in the right folder

No terminal. No commands to remember. No need to for technical understanding. Lowering the bar for who can help maintain the system.

Conclusion

By combining AI and scripts, we make it easier for more people to maintaining the design system.

We reduce the need for technical knowledge—without giving up consistency.

Because the important part is this:

The output is still controlled by a deterministic script. AI helps us use the system. The script makes sure the system behaves.

Final thought

AI is useful for a lot of things.

But when you need reliable, repeatable results, it's often better to let a script do the actual work—and useAI to set it up or run it.

That way, you get the best of both.