[Tool] Claude / Antigravity / Cursor Skill that generates .spj project files to import and refine in SLS

Hi everyone,

I’ve built a open-source skill that generates complete, valid SquareLine Studio project files directly from Claude / Antigravity / Cursor based on the code you are writing and a description of the UI you want.

Instead of starting from scratch for every panel, label, arc, and button in the visual editor, you describe the interface in your AI code harness and the skill writes the `.spj`, `.sll`, and `Themes.slt` files directly. You open the folder in SLS, and it should just work — all screens, widgets, layouts, events, and styles are in place, ready to refine visually and export.

What it generates

  • Multi-screen projects with parent-child widget hierarchies

  • 20+ LVGL widget types (panels, labels, buttons, arcs, sliders, dropdowns, switches, charts, rollers, checkboxes, spinboxes, etc.)

  • Flex and Grid layout configurations with alignment, gap, wrap, and flow

  • Screen transition events with correct `Call`/`CallC` templates

  • Styles — backgrounds, gradients, borders, opacity, fonts (Montserrat 8–48)

  • Correct GUID generation, `nidcnt` tracking, and all required `Style_*` part nodes

  • Font generation from TTFs

The generated project files are structurally identical to what SLS would produce. Every widget includes its required property nodes, GUIDs are unique, and the `.sll` metadata is consistent with the `.spj` info block.

How it works

It’s an AI agent “skill” — a set of instructions and reference documents that teaches Claude Code, Google Antigravity or any other harness you might be using how the SLS project file format works. The skill includes:

  • A comprehensive format specification covering the `.spj` JSON schema

  • Widget property catalogues for every supported widget type

  • A Python widget builder API that handles GUID generation, nid tracking, and the tricky format details (like `Layout_type` always being `“No_layout”` in `strval` even when FLEX is active, or gradient colors using 3 values instead of 4)

  • A project validator that checks GUID uniqueness, nidcnt consistency, and free-tier limits before you open the project

Board support

The skill works with any board SLS supports. It indexes `.slb` board packs directly from your local SLS installation to get the exact board string, resolution, shape, and LVGL version — so the generated `.sll` always matches an installed board. Tested with CrowPanel, MaTouch, M5Stack, Arduino TFT_eSPI, and the SDL desktop simulator.

Free-tier aware

It validates against the Personal license limits (10 screens, 150 widgets, 1 component, 5 global colours, 2 themes) and includes widget budget planning guidance. If a design naturally needs more than 10 screens, it suggests consolidation strategies like tab views and show/hide panels.

Example workflow

Prompt:

“Create a 3-screen SLS project for a CrowPanel 7.0-inch: a dashboard with temperature and humidity arcs, a settings screen with brightness slider and WiFi SSID input, and a status screen showing connection state.”

Result: A complete project folder with all three screens, widgets positioned and styled, screen transition events wired up, ready to open in SLS.

Issues / Feedback

The skill knows how to raise issues on the skill repo so just tell the skill what you think the problem is and your agent should be able to file the issue directly for me to take a look at.

Links

This is a side project and I’d genuinely welcome feedback — especially if you spot any format quirks I’ve missed, or widgets that don’t generate correctly. Happy to take issues on GitHub.

Has anyone else tried programmatic approaches to `.spj` generation? I know there’s the CLI export flags for CI/CD, but I haven’t seen anything that generates the project files themselves.

1 Like

Hi, congratulations, this is a great initiative, and thank you for sharing it with the community!

AI can already handle simpler projects quite well. The real challenge will be larger, more complex projects that make extensive use of themes, components, and other advanced features. Still, considering how quickly AI is developing, it will probably overcome those challenges sooner than we expect. :slightly_smiling_face:

Thanks for your thoughts!

Yeah, completely agree about the complexity curve. As it stands, the skill handles the “get a solid first-cut layout in place quickly” use case well and I’ve got some fairly nice looking ~10-screen designs done, but themes, components, and the more advanced features are definitely where it could get harder. The format is pretty deep once you move beyond basic widget trees, and I had to use a fairly decent model to get good results which didn’t need too much tweaking.

But if you want to work on an existing SLS as part of a code-base, or build a starter for 10 to load into SLS and edit, it’s working well for me.

If there are specific areas where you think better tooling support would be most useful to the community, i’m interested to know - it’s always good to hear from the people who know the format inside out.

Components and .ecomp handling are probably the next area I’ll need to dig into.

M

Components and .ecomp support sound like a natural next step, especially for creating reusable UI building blocks.
A few other useful areas to explore could be:

  • ready-made templates for common embedded UI patterns;
  • clearer compatibility information for different SLS and LVGL versions;
  • validation with friendly error messages before opening the project in SLS;
  • more example projects showing both simple and complex use cases.

We’re interested to see how the project develops, and community feedback will hopefully help identify the most valuable directions.