Noureddine RAMDI / Building AI-assisted parametric 3D modeling with cad-skill: a self-correcting Claude Code extension

Created Sat, 23 May 2026 20:41:14 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

flowful-ai/cad-skill

AI-assisted 3D modeling is often stuck between manual CAD tools and brittle script generation. cad-skill flips this by embedding Claude Code into a parametric 3D modeling pipeline using CadQuery, where the AI doesn’t just generate code once — it tests, catches errors, and iterates until the model passes validation. This feedback loop tightly couples the language model with a real 3D kernel, automating what usually demands human expertise.

How cad-skill enables AI-driven parametric 3D modeling

At its core, cad-skill is a Claude Code skill designed to automate parametric 3D model creation using Python scripts powered by CadQuery. CadQuery is a Python-based CAD scripting framework that lets you build complex 3D models with concise, parametric code.

cad-skill wraps this capability in a structured workflow:

  • Claude generates CadQuery Python scripts based on user prompts, often triggered by keywords like “STL” or “enclosure”.
  • These scripts are executed in a subprocess, isolated from the main agent process.
  • The subprocess captures any runtime errors or exceptions and returns structured JSON results, including geometry outputs or error messages.
  • Claude then reviews this feedback and self-corrects the script in an iterative loop until the model is valid.

The repo also includes tooling for converting STL files (the standard 3D printing mesh format) to PNG images via headless rendering, STL validation checks, and conversion from STL to 3MF for slicer compatibility. This end-to-end chain makes it practical for 3D printing workflows where model correctness and file compatibility are critical.

Under the hood, the architecture relies on bridging an advanced LLM (Claude Code) with an external CAD kernel (CadQuery) through a subprocess interface. This design isolates the potentially unsafe or long-running Python CAD execution while enabling detailed feedback to the language model.

The project is implemented in Python and licensed under PolyForm Noncommercial, authored by Nicolas Chourrout at Flowful.ai.

The self-correcting AI feedback loop: what sets cad-skill apart

Most AI code generation tools stop at producing a script, leaving users to debug or manually validate outputs. cad-skill’s standout feature is the self-correction loop:

  • By running the generated Python script in a controlled subprocess, it captures any exceptions or errors precisely.
  • Instead of just passing raw text errors back, it emits structured JSON responses that include error type, message, and any partial outputs.
  • Claude Code ingests this structured feedback and revises the script accordingly.
  • This loop repeats until the script produces a valid 3D model that passes validation checks.

This approach turns Claude into an autonomous parametric CAD engineer that learns from its mistakes without human intervention. The tradeoff is the added complexity of managing subprocess communication and ensuring the prompt engineering for reliable self-correction.

Code quality in the repo reflects this focus: the subprocess wrapper is carefully designed to isolate execution, parse errors, and format results consistently. The use of JSON for structured feedback is a practical choice that enhances robustness over plain text error logs.

The toolchain also thoughtfully addresses real-world 3D printing needs with STL validation and format conversion, showing attention to production use cases beyond mere code generation.

One limitation is that this workflow depends heavily on Claude Code’s ability to interpret and rewrite Python scripts effectively, which means the quality of iteration hinges on prompt engineering and LLM performance. Additionally, the subprocess approach, while safe, introduces latency and complexity that may not scale for very rapid or high-volume modeling tasks.

Quick start with cad-skill

To get started with cad-skill, the installation is straightforward if you already have Claude Code configured:

mkdir -p ~/.claude/skills
git clone https://github.com/flowful-ai/cad-skill ~/.claude/skills/parametric-3d-printing

This clones the skill into your Claude environment, activating the parametric 3D printing capability.

From there, you interact with Claude as usual, triggering the skill either via explicit slash commands or keywords like “STL” or “enclosure”. The skill takes over, generating and iterating CadQuery scripts, running them, and returning 3D model files and previews.

The repo README and source code provide further details on workflow nuances, error handling, and supported file formats.

Verdict: who should consider cad-skill

cad-skill is a niche but valuable tool for 3D printing enthusiasts, engineers, and developers looking to experiment with AI-driven parametric modeling. Its unique self-correcting loop addresses a real pain point: bridging AI code generation with reliable CAD output.

The repo is well-suited for practitioners comfortable with Python, CadQuery, and AI workflows, especially those already using Claude Code or interested in LLM-based automation.

That said, it’s not a turnkey commercial CAD solution. The PolyForm Noncommercial license restricts usage to noncommercial projects. The dependency on Claude Code and the subprocess communication layer introduces complexity that might be overkill for simpler tasks.

If you’re exploring AI-assisted CAD scripting or want to build on a solid feedback-loop architecture for code generation and execution, cad-skill is worth a close look. The project’s design balances robustness with practical 3D printing needs, making it a thoughtful example of how to integrate LLMs with parametric modeling frameworks.


→ GitHub Repo: flowful-ai/cad-skill ⭐ 141 · Python