AI SummaryGenerate build123d Python code from a description (and optionally a reference image), execute it, and display the result in the browser viewer at http://localhost:3123.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to install the "render" skill in my project. Please run this command in my terminal: # Install skill into your project mkdir -p .claude/skills/render && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/render/SKILL.md "https://raw.githubusercontent.com/mfranzon/render/main/SKILL.md" Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.
Description
Generate a 3D model from a text description or reference image using build123d and render it in the browser viewer. Use when asked to "render", "make a 3D model", "create a part", "design a", "model a", "model from image", "recreate this", or any 3D modeling request. Supports reference photos, sketches, and drawings. Also handles "apply pending edit" — when the user selects an area in the viewer and submits a change request, Claude reads viewer/edits/latest.{png,json} and modifies the current model's script.
/render — Generate & View 3D Models
Generate build123d Python code from a description (and optionally a reference image), execute it, and display the result in the browser viewer at http://localhost:3123.
Preamble (run first)
`bash bash ${CLAUDE_SKILL_DIR}/setup.sh ` If this prints READY, continue. If not, the setup will install build123d into the skill's own venv (one-time, ~30s).
Detect mode
Look at $ARGUMENTS: • Edit mode: the arguments contain the phrase apply pending edit (singular or plural) or start with edit. The user has submitted one or more ✎ edits from the viewer and they are queued in viewer/edits/pending/. Skip to the Edit mode steps below — process every pending edit, not just one. Example: /render apply pending edits • Image mode: the arguments contain a file path to an image (.png, .jpg, .jpeg, .webp, .gif, .bmp, .svg). The path may be followed by an optional text description. Example: /render ~/photos/bracket.jpg a mounting bracket • Text mode: no image path — just a text description. Example: /render a gear with 20 teeth
Steps — Text mode (no image)
• Start the viewer (if not already running): `bash lsof -i :3123 -t >/dev/null 2>&1 && echo "VIEWER_RUNNING" || (${CLAUDE_SKILL_DIR}/.venv/bin/python3 ${CLAUDE_SKILL_DIR}/viewer/serve.py &>/tmp/build123d-viewer.log & sleep 1 && echo "VIEWER_STARTED" && open http://localhost:3123) ` • Write the script: Create ${CLAUDE_SKILL_DIR}/viewer/models/script.py that: • Imports from build123d import * • Imports from viewer.render import render • Builds the requested 3D model using build123d algebra or builder API • Calls render("model", result) at the end to export the exact CAD geometry. Use render("model", result, printable=True) only when the user asks for a shell/infill printable preview. • Run it: `bash PYTHONPATH=${CLAUDE_SKILL_DIR} ${CLAUDE_SKILL_DIR}/.venv/bin/python3 ${CLAUDE_SKILL_DIR}/viewer/models/script.py ` • Confirm the model was rendered and tell the user to check http://localhost:3123. The viewer auto-reloads — the model appears within 1 second. The user can open the code panel (</> button) in the browser to tweak parameters and re-render with Ctrl+Enter. The slice (✂) button enables a cross-section clipping plane with X/Y/Z axis, position slider, and flip. The edit (✎) button lets the user drag a box over an area, type an instruction, and queue it for this Claude session to modify that part of the model. • Auto-arm the edit-apply loop (do this on every text/image render; it's idempotent — calling it again just resets the timer). Call ScheduleWakeup with delaySeconds: 60, prompt: "/loop /render apply pending edits", and a short reason like "auto-apply ✎ edits from viewer". Tell the user one line: "auto-apply loop armed — ✎ edits will be picked up within ~60s".
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster