文件夹必须命名为 bambu-studio-ai,否则 agent 可能加载不到;v2 起需自行 pip install -r requirements.txt 装 Python 依赖;从 v1.x 升级时设置和输出目录已迁移,旧配置需运行 configure.py migrate。
bambu-studio-ai
heyixuan2MIT活跃维护给 AI 编程助手加上的拓竹 3D 打印技能:自动找模型、用 CAD 生成设计、检查可打印性,并交给 Bambu Studio 切片、读取打印机和 AMS 状态。
Bambu Lab AI (Bambu Studio AI): agent skill for 3D printing on Bambu Lab. Finds models on MakerWorld & Printables, generates or designs them in CAD, checks printability, hands them to Bambu Studio and reads printer/AMS status. For Claude Code, Codex, Cursor, Gemini CLI and any SKILL.md agent. Featured in 我的拓竹 Skill 大赏.
git clone https://github.com/heyixuan2/bambu-studio-ai.git ~/.claude/skills/bambu-studio-ai
pip install -r requirements.txtREADME 未说明显存或 GPU 要求;需 Python 3.10+,打印机状态功能需本机与打印机在同一网络。
给 AI 编程助手加 3D 打印技能,从找模型、建模到切片打印一条龙
给 AI 编程助手加上的拓竹 3D 打印技能:自动找模型、用 CAD 生成设计、检查可打印性,并交给 Bambu Studio 切片、读取打印机和 AMS 状态。
核心能力
- 先搜 MakerWorld 和 Printables 找现成模型
- 用参数化 CAD 按真实毫米尺寸建模功能件
- 调用 Meshy、Tripo、Rodin 做文生 3D 和图生 3D
- 打印前检查可打印性并修复模型
- 把模型交给 Bambu Studio 并读取打印机与 AMS 状态
容易踩的坑
- v2.0.0v2.0.0 · Works With Any Agent最新正式版2026-09-19 · 2026-09-19 12:54 UTC
🏆 Featured by Bambu Lab
Selected for the first batch of featured works in Bambu Lab's official 我的拓竹 Skill 大赏 (2026), under the name Bambu Lab AI. Thank you! 🙏
What's new
Works with any agent.
SKILL.mdnow follows the open Agent Skills spec, so the skill loads in Claude Code, OpenAI Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, Windsurf, Cline, Goose, Amp, OpenClaw and more. Install with one line:npx skills add heyixuan2/bambu-studio-aiThen install the Python dependencies once:
pip install -r requirements.txt.Your settings survive updates. Config and secrets moved from the skill folder to
~/.bambu-studio-ai/. Old files are still read;python3 scripts/configure.py migratemoves them. Generated files go to./bambu-output/in your working directory.New tools
configure.py— settings and secrets without hand-editing JSON (secrets read from stdin, saved chmod 600)bambu.py open— opens a model in Bambu Studio on macOS, Windows and Linuxmonitor.py --wait-start N— waits for you to start the print in Bambu Studio, then monitors itanalyze.pyends with the exact file to use for the next step
Fixed
- Printer IP / serial / access code in
config.jsonwere ignored (only env vars worked) - Cloud login with a cached token skipped device selection, so every cloud command failed
parametric.py bracketproduced a flat plate with the holes outside the part;enclosure --lidfloated 2 mm above the body- The overhang check counted the face resting on the bed, so every flat part reported "supports needed"
- CSG specs applied translate before rotate (the Wall Hook example built as two floating bodies)
preview.py --views allsilently produced a single viewsearch.py --jsonwasn't valid JSON when a site query faileddoctor.pychecked the wrong module name for the cloud API- Unreachable printer now fails in ~12 s instead of hanging ~80 s
Also
- Python 3.10+ (required by
bambulabs-api2.x) - 117 tests (was 68), including SKILL.md spec compliance, docs link checks and real geometry assertions
- CI validates the skill with the official
skills-reftool - Chinese README: README.zh-CN.md
Breaking changes
- Config location (auto-fallback +
configure.py migrate) and output location (./bambu-output/) - OpenClaw-specific frontmatter removed; OpenClaw still loads the skill but Python deps must be installed with pip
Full Changelog: https://github.com/heyixuan2/bambu-studio-ai/compare/v1.0.1...v2.0.0
- v1.0.1v1.0.1 · Test Stability Fixes2026-03-10 · 2026-03-10 17:36 UTC
查看更新说明
- Skip parametric tests when manifold3d is unavailable
- Fix oversized model scoring cap in analyze.py
- Test suite now passes cleanly: 53 passed, 1 skipped
- v1.0.0v1.0.0 · First Major Release2026-03-10 · 2026-03-10 17:27 UTC
查看更新说明
🖨️ Bambu Studio AI v1.0.0
The most complete open-source AI agent skill for Bambu Lab 3D printers.
What's New in v1.0.0
🔧 Parametric Modeling (
parametric.py)- manifold3d CSG: box, cylinder, sphere, extrude, bracket, plate-with-holes, enclosure (+lid)
- JSON spec files for complex assemblies (union/subtract/intersect/hull)
- FDM tolerance tables (M2-M8 screw holes, heat-set inserts, clearance fits)
- Guaranteed watertight output — zero non-manifold edges
📷 Image-to-3D Pipeline
- Auto image validation (format, size, resolution)
- Background removal via rembg
- URL image download
- Post-generation texture detection (auto-route to colorize)
🎨 Multi-Color AMS Pipeline
- HSV family classification (shadow-immune)
- Dual method: hybrid (preserves rare colors) + k-means (sub-color detail)
- Bambu filament CIELAB matching with ΔE scores
- Boundary smoothing, island cleanup, vertex snap
📊 Full Pipeline
- Model search (MakerWorld, Printables, Thingiverse, Thangs)
- 5 AI providers (Rodin, Meshy, Tripo3D, Printpal, 3D AI Studio)
- 11-point printability analysis + auto-repair
- Blender Cycles preview (turntable GIF)
- CLI slicing (OrcaSlicer)
- Print monitoring + notifications
- All 9 Bambu Lab printers
🧪 Test Suite: 57 tests across 8 test files 📖 README: Complete rewrite with narrative structure
Supported Printers
A1 Mini · A1 · P1S · P2S · X1C · X1E · H2C · H2S · H2D
- v0.23.0v0.23.0 · Colorize Refactor & Test Suite2026-03-08 · 2026-03-08 16:16 UTC
查看更新说明
What's New
🎨 Colorize Module Refactor
colorize.py→colorize/package (7 submodules)- Dual method:
--method hybrid(default, hue-preserving) +--method kmeans(sub-color detail) - All CLI args (
--no-merge,--island-size,--smooth) now properly passed through
🧪 Test Suite
- 5 test files: color_science, selection, scoring, snap_colors, conftest
- Run:
pytest tests/
🔧 Infrastructure
common.py: shared config, cross-platform paths (macOS/Linux/Windows), threading timeout_BaseBackend: unified download with retry + backoffpyproject.tomlfor project metadata- GPU multi-backend preview (METAL/CUDA/OPTIX/HIP)
🚀 Generation
- Auto-retry with prompt refinement on failure
- Hyper3D Rodin provider support
🐛 40+ Bug Fixes (v0.20.0 → v0.23.0)
- auto_scale skips 3MF, download retry, HSV threshold alignment
- hybrid max_colors cap (AMS 8-slot safe), URL-encode RTSP
- Doctor checks scikit-learn, preview rendering mandatory in workflow
- v0.20.0v0.20.0 · CLI Slicing & Smart Monitor2026-03-03 · 2026-03-03 22:33 UTC
查看更新说明
🆕 New Features
CLI Slicer (
slice.py)- Full OrcaSlicer CLI integration with auto profile merging
- Auto-resolves Bambu Studio profile inheritance chains (machine → process → filament)
- Auto-detects printer model, nozzle size, AMS filaments from live printer
- Quality presets:
draft(0.24mm) /standard(0.20mm) /fine(0.12mm) /extra(0.08mm) --orientand--arrangeflags for auto-orientation and plate arrangement- 3MF post-processing for Bambu Studio 2.5.0 compatibility (no more warning dialogs)
- All 9 Bambu Lab printer models supported
Smart Print Monitor (
monitor.pyrewrite)- Anomaly detection: progress stall (>10min), temperature spikes, print failures
- Notification policy: immediate alerts on anomalies, 30-min progress summaries
--auto-pauseflag for critical anomaly auto-response- Persistent state tracking across monitor cycles
New Commands (
bambu.py)info— printer hardware info (model, nozzle, AMS filaments), works offline with config fallbacknotify— send notifications to user's channelstatus --json— machine-readable printer status for automation
🐛 Bug Fixes (8 audit rounds, 20+ fixes)
generate.py:--format 3mfnow correctly produces .3mf outputcolorize.py: auto-adds.objextension to outputbambu.py: fixed dispatch for info/notify/status --json commandsslice.py: relative output paths now work correctlydoctor.py: now checks OrcaSlicer installationmonitor.py: all notifications in English (consistency)- All scripts: path hints use
scripts/prefix - 3MF values patched for Bambu Studio compatibility
📊 Stats
- 10 scripts, 5,818 lines of Python
- 50-model stress test: 90% success rate (45/50)
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Repository name: Bambu Studio AI (bambu-studio-ai) · 中文说明
Works with the Agent You Already Use
Featured by Bambu Lab
Selected for the first batch of featured works in Bambu Lab's official 我的拓竹 Skill 大赏 (Bambu Lab Player Skill Showcase, 2026), under the name Bambu Lab AI.
"From an idea to a finished print, what's the fewest number of steps? This Bambu player's answer: one." — Bambu Lab, announcing the featured works
The yellow figure on the poster is a real print, produced end-to-end by this skill.
Read the announcement on Xiaohongshu →
Poster © Bambu Lab, from the official announcement.
What a Session Looks Like
You I need a wall bracket for a 32 mm pipe
with two M4 screw holes. PETG, on my A1.
Agent That's a precision part, so I'll model it
to exact dimensions instead of using AI.
→ 32.4 mm clamp bore (0.2 mm clearance/side)
→ 4 mm strap · two 4.2 mm M4 teardrop holes
→ one solid body · fits the A1 plate
→ suggested: 0.2 mm layers · 40% infill
It's open in Bambu Studio. Slice it and
tell me if it looks right.
You Looks good. Starting the print now.
Agent Print detected. I'll report progress every
30 minutes and warn you if it stalls.
The actual output of that session: modelled by parametric.py, rendered by preview.py --views turntable, recoloured from the default blue to Bambu green.
Why It's Different
The Right Method for Each Object
Everyday objects: search MakerWorld and Printables first (in about a second, with download counts), because tested designs beat generated ones. Functional parts: parametric CAD with real millimetres and real screw clearances. Figurines, characters and photos: AI text-to-3D and image-to-3D with Meshy, Tripo or Rodin.
Checked Before It's Printed
Every model, downloaded or generated, goes through seven measured checks before you see it: mesh integrity, build volume, floating parts, overhangs, wall thickness, bed contact, and whether the material suits your printer. Small defects are repaired automatically, and you get a score with the rubric behind it. Textured models become AMS-ready multi-color files with matched Bambu filaments.
You're Always in the Loop
You see a render first, then review, slice and press Print yourself in Bambu Studio. The agent can watch a print and tell you how it's going, but it can't start, pause or change one.
Your Agent, Your Printer, Your Keys
Works with the agent you already use and reads your printer's status over your own network, with the printer in its normal mode: Bambu Handy and cloud printing keep working. API keys live in a local file only you can read. No accounts, no relay servers, no telemetry.
Get Started
1 · Add the Skill. It detects the agents you have installed and puts the skill where each one
looks. Add -g for all projects, or see the manual install.
npx skills add heyixuan2/bambu-studio-ai
2 · Install the Python Dependencies. Skill installers copy files but don't install packages.
doctor.py then shows what's installed and what's optional.
cd <skill folder> # e.g. ~/.claude/skills/bambu-studio-ai
python3 -m pip install -r requirements.txt
python3 scripts/doctor.py
3 · Ask for Something. Search, generation, CAD and analysis work right away. For printer status, say "set up my Bambu printer" and the agent walks you through it in about two minutes.
Things You Can Ask
| Make Something | Check or Fix a Model | Print and Watch |
|---|---|---|
| "Print me a cute cat figurine, about 6 cm tall" | "Why won't this STL slice properly?" | "What filament is loaded in my AMS?" |
| "Design a 60×40×30 mm electronics box with a lid" | "Scale this to 12 cm and check it fits my A1 Mini" | "Is my print done?" |
| "Turn this photo into a 3D print, in full color" | "Make this model 4 colors for my AMS Lite" | "Watch this print and tell me if anything goes wrong" |
| "Find me a good cable organizer on MakerWorld" | "Is this OK to print in ABS on a P1S?" | "How long is left? What's the nozzle temperature?" |
How It Works
The skill is a set of plain Python tools plus a SKILL.md playbook that tells the agent when to use
each one and where to stop and ask you. Agents load it only when a 3D-printing task comes up, and
read the detailed references (setup, multi-color, monitoring, troubleshooting) only when a step needs
them.
| Capability | Tool | Details |
|---|---|---|
| Model search | search.py | MakerWorld and Printables in parallel, with downloads, likes and licence |
| AI generation | generate.py | Meshy, Tripo, Hyper3D Rodin. Textured GLB for Bambu Studio 2.7+, stood upright and scaled to the height you ask for; resumable tasks |
| Parametric CAD | parametric.py | Brackets, plates with holes, enclosures, arbitrary CSG from JSON. Always watertight, exact to 0.01 mm |
| Printability | analyze.py | Seven checks with a published score, tiered repair, auto-orientation, reported unit assumptions |
| Multi-color | colorize | Texture → painted Bambu Studio project, up to 8 AMS colors, nearest Bambu filament by CIEDE2000 |
| Preview | preview.py | PNG and 360° turntable GIF via Blender, Bambu Studio or a built-in renderer; size check |
| Printer | bambu.py | Status, progress and AMS filaments (read-only), open in Bambu Studio |
| Monitoring | monitor.py | Waits for the print to start, progress reports, pause / error / HMS / stall alerts |
| Setup | configure.py, doctor.py | Settings and secrets without editing JSON, dependency diagnostics |
Printers and Requirements
All 13 Bambu Lab models in Bambu Studio's own printer profiles, from the A1 Mini to the H2D Pro, with build volumes, temperature limits and material compatibility built in (specs). Runs on macOS, Linux and Windows with Python 3.10+. Optional tools unlock more:
| Tool | Unlocks | Install |
|---|---|---|
| Bambu Studio | Reviewing, slicing and printing; print-time and filament estimates | macOS brew install --cask bambu-studio · Windows/Linux installer, AppImage or Flatpak |
| Blender 4+ | Nicer preview renders and turntable GIFs | macOS brew install --cask blender · Linux snap install blender --classic · Windows installer |
| An AI provider key | Text-to-3D and image-to-3D | Meshy, Tripo or Rodin (setup) |
pymeshlab | Heavier mesh repair | pip install pymeshlab |
Privacy and Safety
- Local first. Printer status is read over your own network. Nothing goes through a relay.
- Your secrets stay put. Access codes and API keys are stored in
~/.bambu-studio-ai/.secrets.json(chmod 600) and are sent only to the service they belong to. - Nothing prints by surprise. The skill has no code that can start, pause or change a print. You press Print in Bambu Studio; the printer stays in its normal mode, so Bambu Handy keeps working.
- Every network endpoint is listed in references/security.md.
Install Details
Clone into your agent's skills folder. The folder must be named bambu-studio-ai.
git clone https://github.com/heyixuan2/bambu-studio-ai.git ~/.claude/skills/bambu-studio-ai
| Agent | For all projects | For one project |
|---|---|---|
| Claude Code | ~/.claude/skills/ | .claude/skills/ |
| OpenAI Codex | ~/.codex/skills/ | .agents/skills/ |
| Cursor | ~/.cursor/skills/ | .agents/skills/ |
| Gemini CLI | ~/.gemini/skills/ | .agents/skills/ |
| GitHub Copilot | ~/.copilot/skills/ | .agents/skills/ |
| OpenCode | ~/.config/opencode/skills/ | .agents/skills/ |
| Windsurf | ~/.codeium/windsurf/skills/ | .windsurf/skills/ |
| Cline | ~/.agents/skills/ | .agents/skills/ |
| Goose | ~/.config/goose/skills/ | .goose/skills/ |
| OpenClaw | ~/.openclaw/skills/ | skills/ |
.agents/skills/ is shared by most agents, so one project-level clone there covers Codex, Cursor,
Gemini CLI, Copilot, OpenCode, Cline and Amp at once. Update with npx skills update bambu-studio-ai
or git pull. Your settings live outside the skill folder, so updates never touch them.
Zip the folder and upload it under Settings → Capabilities → Skills. Search, generation, CAD and analysis work there. Printer status needs a machine on the same network as the printer, so use a local agent (Claude Code, Codex, …) for that.
| What | Where | Override |
|---|---|---|
| Settings, secrets, monitor state | ~/.bambu-studio-ai/ | BAMBU_STUDIO_AI_HOME |
| Generated models, previews, monitor logs | ./bambu-output/ in your working directory | BAMBU_OUTPUT_DIR |
Every tool is a normal CLI with --help:
python3 scripts/search.py "vase" --limit 3
python3 scripts/parametric.py enclosure --width 60 --depth 40 --height 30 --wall 2 --lid -o box.stl
python3 scripts/analyze.py box.stl --repair --material PETG # prints the file to use next
python3 scripts/preview.py box.stl --views turntable
python3 scripts/bambu.py open box.stl
python3 scripts/monitor.py --wait-start 30 --interval 300
- v2 is a standard Agent Skill. The OpenClaw-only install metadata is gone, so install Python
dependencies with
pip install -r requirements.txt. OpenClaw still loads the skill. - Settings moved from the skill folder to
~/.bambu-studio-ai/. Old files are still read, andpython3 scripts/configure.py migratemoves them. - Outputs moved from
<skill>/output/to./bambu-output/. - Python 3.10+ is required.
License
MIT, see LICENSE. Profiles and settings files copied from Bambu Studio keep its AGPL-3.0 licence: see THIRD_PARTY_NOTICES.md.
Bambu Studio AI (Bambu Lab AI) is an independent community project by TieGaier, featured by Bambu Lab but not developed or officially supported by them. "Bambu Lab" and "Bambu Studio" are trademarks of their respective owner.