/creative-media-tooling:freecad-scriptsfrom creative-media-tooling
Translates natural language CAD tasks into production-quality FreeCAD Python code covering Part, Mesh, Sketcher, FEM, Path, TechDraw, Coin3D, PySide GUI, and parametric FeaturePython objects.
Ships in creative-media-tooling. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Translate natural language CAD tasks into production-quality FreeCAD Python code that handles documents, geometry, GUI availability, recompute, selection, and macro execution safely.
if FreeCAD.GuiUp: so macros can fail gracefully in headless execution.Key modules and aliases:
import FreeCAD # core module, often aliased as App
import FreeCADGui # GUI module, often aliased as Gui; GUI mode only
import Part # BRep/OpenCASCADE shapes
import Mesh # triangulated meshes
import Sketcher # 2D constrained sketches
import Draft # 2D drawing tools
import Arch # Arch/BIM workbench
import Path # Path/CAM workbench
import FEM # FEM workbench
import TechDraw # replaces Drawing
import BOPTools # boolean operations
import CompoundTools # compound shape utilities
Document model essentials:
doc = FreeCAD.newDocument("MyDoc")
doc = FreeCAD.ActiveDocument
box = doc.addObject("Part::Box", "MyBox")
box.Length = 10.0
box.Width = 10.0
box.Height = 10.0
doc.recompute()
obj = doc.getObject("MyBox")
obj = doc.MyBox
doc.removeObject("MyBox")
# -*- coding: utf-8 -*-
# FreeCAD Macro: MyMacro
# Description: Brief description of what the macro does
# Author: YourName
# Version: 1.0
# Date: 2026-04-07
import FreeCAD
import Part
from FreeCAD import Base
if FreeCAD.GuiUp:
import FreeCADGui
from PySide2 import QtWidgets, QtCore
def main():
doc = FreeCAD.ActiveDocument
if doc is None:
FreeCAD.Console.PrintError("No active document
")
return
if FreeCAD.GuiUp:
sel = FreeCADGui.Selection.getSelection()
if not sel:
FreeCAD.Console.PrintWarning("No objects selected
")
doc.recompute()
FreeCAD.Console.PrintMessage("Macro completed
")
if __name__ == "__main__":
main()
Selection and console APIs to preserve:
sel = FreeCADGui.Selection.getSelection()
sel_ex = FreeCADGui.Selection.getSelectionEx()
for selobj in sel_ex:
obj = selobj.Object
for sub in selobj.SubElementNames:
shape = obj.getSubObject(sub)
FreeCADGui.Selection.addSelection(doc.MyBox)
FreeCADGui.Selection.addSelection(doc.MyBox, "Face1")
FreeCADGui.Selection.clearSelection()
FreeCAD.Console.PrintMessage("Info message
")
FreeCAD.Console.PrintWarning("Warning message
")
FreeCAD.Console.PrintError("Error message
")
FreeCAD.Console.PrintLog("Debug/log message
")
| User shorthand | FreeCAD API action |
|---|---|
| box | Part.makeBox() |
| cylinder | Part.makeCylinder() |
| sphere | Part.makeSphere() |
| merge, combine, join | .fuse() |
| subtract, cut, remove | .cut() |
| intersect | .common() |
| round edges, fillet | .makeFillet() |
| bevel, chamfer | .makeChamfer() |
| no document specified | doc = FreeCAD.ActiveDocument or FreeCAD.newDocument() |
| no units specified | assume millimeters |
| quick display | Part.show(shape, "Name") |
| persistent named object | doc.addObject("Part::Feature", "Name") |
Always call doc.recompute() after modifications.
references/freecad-implementation-patterns.md: detailed FreeCAD API concepts, FeaturePython, GUI, Coin3D, workbench, and reusable patterns.references/scripting-fundamentals.md: document model, console, and core scripting.references/geometry-and-shapes.md: Part, Mesh, Sketcher, and topology.references/parametric-objects.md: FeaturePython, properties, and scripted objects.references/gui-and-interface.md: PySide, dialogs, task panels, and Coin3D.references/workbenches-and-advanced.md: workbenches, macros, FEM, Path, and recipes.Preserve these legacy terms, API names, command placeholders, and literal phrases when applying or migrating this skill:
PySide/Qtbevel/chamferbuilt-inedges/filletmerge/combine/joinquasi-codesub-elementssub-shapesubtract/cut/removetopic-organized## FreeCAD script result
**Status:** script-created | guidance-only | blocked
**Runtime:** FreeCAD Python macro | console snippet | workbench command
### Files or code
- `<path or snippet>`: <purpose>
### API coverage
| Area | APIs used | Notes |
| --- | --- | --- |
| Document | `FreeCAD.ActiveDocument`, `doc.recompute()` | <notes> |
| Geometry | `Part.makeBox()` / other APIs | <notes> |
| GUI | `FreeCAD.GuiUp` / PySide / selection | <notes> |
### Validation
- <how to run in FreeCAD and expected result>
if FreeCAD.GuiUp:.doc.recompute() are handled.FreeCAD.Console.PrintMessage, PrintWarning, PrintError, or PrintLog.references/freecad-implementation-patterns.md (opens in a new tab)references/geometry-and-shapes.md (opens in a new tab)references/gui-and-interface.md (opens in a new tab)references/parametric-objects.md (opens in a new tab)references/scripting-fundamentals.md (opens in a new tab)references/workbenches-and-advanced.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin creative-media-tooling11 skills in this plugin
/adobe-illustrator-scriptingWrite, debug, and optimize Adobe Illustrator automation scripts using ExtendScript (JavaScript/JSX). Use when creating or modifying scripts that manipulate documents, layers, paths, text frames, colors, symbols, artboards, or any Illustrator DOM objects. Covers the complete JavaScript object model, coordinate system, measurement units, export workflows, and scripting best practices./game-engineBuild web-based game engines and games with HTML5 Canvas, WebGL, SVG, CSS, and JavaScript. Use when creating 2D or 3D games, implementing game loops, physics, collision detection, sprites, tilemaps, controls, audio, multiplayer with WebRTC or WebSockets, optimization, or publishing workflows./image-manipulation-image-magickProcess and manipulate images using ImageMagick. Supports resizing, format conversion, batch processing, and retrieving image metadata. Use when working with images, creating thumbnails, resizing wallpapers, or performing batch image operations.Other plugins' skills for the same job