Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
earthtojake avatar

Gcode

  • 3.9k installs
  • 11k repo stars
  • Updated July 11, 2026
  • earthtojake/text-to-cad

gcode is an agent skill that generates and statically validates plain FDM G-code from mesh files by orchestrating OrcaSlicer, PrusaSlicer, or CuraEngine CLI backends.

About

gcode orchestrates plain FDM .gcode generation from 3D mesh files through real slicer CLI backends without uploading or starting print jobs. Supported inputs include .stl, .obj, unsliced .3mf, .ply, .glb, and .gltf, with .ply and glTF converted to temporary STL via optional trimesh at execution time. Every slice requires an explicit wrapper profile JSON pointing to absolute native slicer profiles plus machine and filament validation bounds. The workflow runs discover to pick orcaslicer, prusa-slicer, or curaengine backends, inspect for mesh readiness, dry-run slice commands, execute slice, then validate generated G-code for temperatures, movement, extrusion, and XYZ bounds. OrcaSlicer split profiles use native_settings and native_filaments arrays alongside native_config. After G-code work the skill mandates handing file paths to $cad-viewer when installed. Bambu-specific upload workflows are explicitly out of scope; validated plain .gcode hands off to $bambu-labs instead.

  • Slices STL OBJ 3MF PLY GLB GLTF meshes via OrcaSlicer PrusaSlicer or CuraEngine CLIs.
  • Requires explicit wrapper profile JSON with absolute native slicer config paths.
  • Workflow covers discover, inspect, dry-run slice, execute, and validate steps.
  • Validates temperatures movement extrusion and XYZ bounds before printer handoff.
  • Hands completed G-code paths to $cad-viewer and Bambu workflows to $bambu-labs.

Gcode by the numbers

  • 3,869 all-time installs (skills.sh)
  • +650 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #99 of 2,742 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

gcode capabilities & compatibility

Capabilities
slicer backend discovery and mesh inspect · profile wrapped slice with dry run and execute · static g code validation for temps and bounds · cad viewer and bambu workflow handoff boundaries
Use cases
orchestration
From the docs

What gcode says it does

Always validate generated G-code before handing it to printer-specific workflows.
SKILL.md
npx skills add https://github.com/earthtojake/text-to-cad --skill gcode

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3.9k
repo stars11k
Last updatedJuly 11, 2026
Repositoryearthtojake/text-to-cad

How do I slice a mesh into printer-profiled G-code with dry-run safety checks and validation before any printer upload?

Slice mesh files into printer-profiled plain FDM G-code using OrcaSlicer, PrusaSlicer, or CuraEngine with dry-run and static validation.

Who is it for?

Developers converting 3D meshes to FDM G-code who need local slicer CLI orchestration and static validation.

Skip if: Skip for Bambu upload or print-start jobs; hand validated G-code to $bambu-labs instead.

When should I use this skill?

User needs to slice STL OBJ 3MF PLY GLB or GLTF into G-code, discover slicer backends, or validate generated G-code.

What you get

A validated plain .gcode file produced from an explicit profile wrapper with inspect and dry-run confirmation steps.

  • Validated plain .gcode file

Files

SKILL.mdMarkdownGitHub ↗

G-code

Provenance: maintained in earthtojake/text-to-cad. Use the installed local skill files as the runtime source of truth; the repository link is only for provenance and release review.

Use this skill for plain .gcode generation from mesh files. It is printer-agnostic and never uploads, starts, or packages print jobs.

Workflow

1. Confirm the input is a supported mesh: .stl, .obj, unsliced .3mf, .ply, .glb, or .gltf. 2. Require an explicit printer/profile wrapper JSON. Do not invent real-printer profiles. 3. Discover slicer backends when the backend is unknown:

python scripts/gcode_tool.py discover

4. Inspect the input:

python scripts/gcode_tool.py inspect --input path/to/model.stl --json

5. Dry-run the slicer command before executing:

python scripts/gcode_tool.py slice \
  --input path/to/model.stl \
  --output /tmp/model.gcode \
  --profile path/to/profile.json \
  --backend auto \
  --dry-run

6. Execute only after the dry-run command and profile are appropriate:

python scripts/gcode_tool.py slice \
  --input path/to/model.stl \
  --output /tmp/model.gcode \
  --profile path/to/profile.json \
  --backend auto \
  --execute

7. Validate the generated G-code:

python scripts/gcode_tool.py validate \
  --gcode /tmp/model.gcode \
  --profile path/to/profile.json \
  --json

CAD Viewer Handoff

After completing G-code work that creates or modifies a plain .gcode, you must ALWAYS hand the explicit file path to $cad-viewer when that skill is installed. $cad-viewer must start CAD Viewer if it is not already running and return link(s) to the relevant created or updated file(s); the preview is diagnostic only and does not replace this skill's static validation. If $cad-viewer is unavailable or startup fails, report that instead of silently omitting the handoff.

Profile Contract

Every slice requires a wrapper profile JSON with an absolute native slicer profile path:

{
  "backend": "orcaslicer",
  "native_config": "/absolute/path/to/native-slicer-profile",
  "machine": {
    "name": "Example Printer",
    "bed_size_mm": [180, 180],
    "z_height_mm": 180,
    "motion_bounds_mm": {
      "x": [0, 180],
      "y": [0, 180],
      "z": [0, 180]
    }
  },
  "filament": {
    "type": "PLA",
    "nozzle_temp_c": 220,
    "bed_temp_c": 65
  }
}

The wrapper supplies validation bounds and backend selection. machine.motion_bounds_mm is optional; omit it for the default 0..bed_size and 0..z_height bounds, or set it from a native printer profile when start/end G-code intentionally uses safe wipe/purge positions outside the printable area. The native slicer profile remains the source of detailed process, printer, and filament behavior.

For OrcaSlicer, use native_settings and native_filaments when the real profile is split across machine, process, and filament JSON files. Keep native_config as an absolute path to the primary native profile for compatibility:

{
  "backend": "orcaslicer",
  "native_config": "/absolute/path/to/machine-or-process.json",
  "native_settings": [
    "/absolute/path/to/machine.json",
    "/absolute/path/to/process.json"
  ],
  "native_filaments": [
    "/absolute/path/to/filament.json"
  ],
  "machine": {
    "name": "Example Printer",
    "bed_size_mm": [180, 180],
    "z_height_mm": 180
  },
  "filament": {
    "type": "PLA",
    "nozzle_temp_c": 220,
    "bed_temp_c": 65
  }
}

Backends And Inputs

Preferred slicer backend order is orcaslicer, prusa-slicer, then curaengine. Prefer installing OrcaSlicer when no preferred backend is available; on macOS use brew install --cask orcaslicer and then rerun discover. The helper checks both PATH and the usual /Applications/OrcaSlicer.app cask location. Bambu Studio may be reported by discovery as available but is not preferred because its CLI export path has shown macOS instability.

Pass .stl, .obj, and unsliced .3mf directly to the slicer. Convert .ply, .glb, and .gltf to temporary STL at execution time with optional trimesh; if trimesh is unavailable, ask the user to install it or provide .stl, .obj, or unsliced .3mf.

Reject .step, .stp, .dxf, .svg, .urdf, and .sdf in v1. Use the existing CAD/render workflows to convert those to a supported mesh format before using this skill.

Read references/slicer-backends.md when backend behavior, profile expectations, or source links matter.

Validation

Always validate generated G-code before handing it to printer-specific workflows. The validator checks for non-empty content, temperature commands, movement commands, extrusion moves, XYZ bounds, and unknown command warnings.

Read references/gcode-validation.md when interpreting validation output or deciding whether a warning is acceptable.

Bambu Boundary

This skill generates plain .gcode only. It does not create Bambu .gcode.3mf archives and does not contact printers. For Bambu upload/start workflows, hand off the validated plain .gcode to $bambu-labs. Let $bambu-labs choose the printer-specific LAN handoff, such as an A1 Mini template project or an explicitly enabled bambox project package.

Related skills

How it compares

Mesh-to-G-code slicer orchestrator, not Bambu upload or CAD modeling generation.

FAQ

Which slicer backends are supported?

Preferred order is orcaslicer, prusa-slicer, then curaengine, discovered via gcode_tool.py discover.

Does this skill upload to a printer?

No. It generates plain .gcode only and does not create Bambu archives or contact printers.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.