Skip to content

FreeCAD Python Scripting

Writes FreeCAD Python scripts, macros and parametric objects for CAD modeling tasks

Stars
40,703
Licence
MIT
Files
6 files

What it does

Once installed, the agent knows the FreeCAD Python API well enough to turn plain-language or rough descriptions of 3D parts into working scripts. It can create primitive shapes, booleans, fillets, lofts and sweeps, manage documents and placements, build parametric FeaturePython objects, and draft macros or PySide GUI dialogs. The skill is a set of reference notes and examples the agent reads; it does not itself open FreeCAD.

Great for

  • CAD users who want to automate repetitive FreeCAD modeling steps with macros
  • Python developers building custom FreeCAD workbenches or parametric objects
  • Engineers who describe a part in words and need a starting script

Skip it if

  • Users without FreeCAD installed, since the generated scripts cannot run without it (they need FreeCAD's bundled Python modules)
  • Running generated scripts blindly on important models without reviewing them first, because they can modify or delete document objects

Try asking

  • “Write a FreeCAD macro that makes a 50 mm box with a 5 mm cylinder cut through its centre”
  • “Create a parametric FeaturePython object with Length and Width properties that recomputes when they change”
  • “Build a PySide dialog inside FreeCAD that asks for a radius and creates a cylinder”
  • “Convert a Part solid to a mesh and export it as STL”
Step-by-step guide: how to use FreeCAD Python ScriptingInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 6 original files, the MIT licence and an attribution note.

    freecad-scripts.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip freecad-scripts.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip freecad-scripts.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • State the FreeCAD version you use, since API details differ between 0.21 and 1.0
  • Ask the agent to show the script first, then run it yourself in FreeCAD's Python console or macro editor after checking it
  • Save your document before running macros that delete or replace objects

What's inside

  • references/geometry-and-shapes.md
  • references/gui-and-interface.md
  • references/parametric-objects.md
  • references/scripting-fundamentals.md
  • references/workbenches-and-advanced.md
  • SKILL.md

Redistributed unmodified from github/awesome-copilot under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.