Loading theme preference
Ilia Bukin
← Back to blog

text-to-cad: the agent-skills library that turns prompts into STEP files, robots, and G-code

Sep 10, 2026

The text-to-CAD demos that let you type a description and get a model tend to live in a browser tab and hand you a mesh. text-to-cad does something different. It's a library of agent skills that installs into a coding agent and produces real CAD artifacts from local files: STEP, STL, robot descriptions, even sliced G-code for a printer. It's MIT-licensed, runs entirely locally, and sits at roughly 15,000 stars on GitHub.12

A real CAD engine behind the prompts

A lot of "text-to-CAD" is an image-generation model outputting a mesh. This project deliberately avoids that. The agent writes and runs plain Python scripts against build123d, the parametric BREP modeling framework. Commenters on the Hacker News thread point out that means the Open Cascade geometric kernel is doing the actual geometry work.3 The skills wrap a command-line runtime called cadgen, so the agent is not guessing about a render. It builds, validates, and inspects an actual solid.

The core CAD skill installs with python -m pip install -r requirements.txt; the only extra for rendering preview images is a headless browser via python -m playwright install chromium.4 STEP is the default output, and a model can declare STL, 3MF, and GLB meshes alongside it.4

Everything is a Python script with a decorator

A CAD model is one decorated function in a plain .py file:

from cadgen import build123d as bd
from cadgen import step

WIDTH = 10.0

@step
def bracket():
    return bd.Box(WIDTH, 10, 10)

if __name__ == "__main__":
    bracket()

A few rules make it agent-friendly. The decorator only declares; calling the function builds. Outputs are exactly what the decorators declare, so a part can be mesh-only (@stl with no @step) when it's meant for printing. Geometry is the return value and nothing else. Models take no parameters; a variant is a separate file calling a shared factory.4

That discipline exists because the model file is the source of truth. Every artifact, from STEP to the sidecar, is a derived output the agent re-runs rather than hand-edits. The skill is explicit: "edit and rerun the script, never the outputs."4

It checks its own work

This is where the tool stops being a toy. Validation is baked into the workflow:

  • cadgen step inspect pulls references, measurements, alignment, and differences out of a STEP file.
  • Every part or assembly change is followed by cadgen step snapshot, which renders a PNG the agent is expected to look at and fold into the next geometry checks. The skill calls this mandatory.4
  • A build store under ~/.cache/cadgen tracks freshness with a warm-worker daemon, so an unchanged model rebuilds as a fast no-op and only dirty geometry gets recomputed.4

The author's own framing: the point is to hand models "more direct tools to generate and inspect STEP files," including a topology sidecar that lets an agent read faces, edges, and vertices without loading the whole file.5

It covers more than geometry

The library ships eleven skills covering CAD, fabrication, robotics, simulation, and local review:1

  • CAD Viewer shows local browser previews of CAD and robot files.
  • step.parts finds off-the-shelf parts such as screws, bearings, motors, and connectors.
  • DXF produces 2D drawings for profiles, gaskets, and cut layouts.
  • URDF, SRDF, and SDF write robot structure files, MoveIt planning groups, and simulator worlds.
  • SendCutSend checks DXF and STEP files before upload.
  • DfAM Check measures mesh printability per process, covering wall thickness, overhangs, and support volume.
  • G-code slices meshes into validated FDM .gcode using real slicer CLIs.
  • Bambu Labs dry-runs and starts local printer jobs from validated .gcode.

One agent session can go from a one-line request to a robot description, or from a part down to something a printer can start.

Installing it

Installation goes through the Skills CLI:2

npx skills add earthtojake/text-to-cad

The same command updates. add re-fetches the package and picks up new skills, while npx skills update only walks the lockfile and "silently misses new ones." Provider-native plugin installs exist too: codex plugin marketplace add earthtojake/text-to-cad (Codex 0.142.0 or newer), claude plugin marketplace add, and grok plugin install.2

The parts that are still rough

The useful pushback shows up in the discussion thread. Runs rely heavily on an agent's spatial reasoning, which people who have actually pushed on this say is still weak.3 One reviewer flagged that the benchmark prompt on the cover leaves hole positions unspecified, and a resulting part had gussets overlapping the holes, output unusable.5 Others make the sharper point that the real bottleneck is language: describing an airtight part in text takes a vocabulary and precision most people do not have, which is why a drafting sheet still wins for unambiguous detail.5

The author is straightforward that this started as a harness to design a 7-DOF robot arm and is "really just a fun open source tool," not a company. The benchmarks are early, and reviewers have already found measurements the prompts leave open.5

Worth a spin

text-to-cad takes the unglamorous engineering seriously: real geometry through Open Cascade, mandatory visual snapshots, a freshness-correct build store, and skills that reach all the way to fabrication. The spatial-reasoning ceiling is real, and nobody should read the excitement as "CAD is solved." But as a local, open-source harness that turns an agent into something that can design, inspect, and slice a machine part, it's a concrete step forward.


  1. https://github.com/earthtojake/text-to-cad
  2. https://www.texttocad.dev
  3. https://news.ycombinator.com/item?id=47970497
  4. https://github.com/earthtojake/text-to-cad/blob/main/skills/cad/SKILL.md
  5. https://news.ycombinator.com/item?id=47970497