Skip to content
Back to skills

Keep Project Settings

ASecurity

Make a 3MF exported by Bambu Studio's command-line slicer keep its tuned settings when the app opens it, instead of silently going back to stock presets. Use after `--export-3mf`, or when someone says "Bambu Studio dropped my settings", "the brim is back to Auto", "the temperatures reset", or "the app's time doesn't match the CLI's".

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentspythongo

Works with

  • cli

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add alexnodeland/fabrication --skill keep-project-settings --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Keep Project Settings?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Keep Project Settings
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alexnodeland-keep-project-settings/badge)](https://www.skillsdirectory.com/skills/alexnodeland-keep-project-settings)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: keep-project-settings
description: Make a 3MF exported by Bambu Studio's command-line slicer keep its tuned settings when the app opens it, instead of silently going back to stock presets. Use after `--export-3mf`, or when someone says "Bambu Studio dropped my settings", "the brim is back to Auto", "the temperatures reset", or "the app's time doesn't match the CLI's".
---

# Keep a CLI project's settings in the app

## Why the app drops them

The CLI writes every setting it was given into the project (`Metadata/project_settings.config`), but under
the stock preset names, with `different_settings_to_system` empty. When the app opens the file, it reads that
list to learn what the project changed. An empty list means "nothing changed", so it loads the stock presets
and quietly drops the rest. Found 2026-12-01 on the PCIe box test plate: the brim went back to Auto and the
nozzle and bed temperatures back to stock.

## The fix

The project must say, for each preset, which stock preset it comes from and which keys it changed:

- `print_settings_id` and `filament_settings_id`: names for the project's presets.
- `inherits_group`: the stock preset each one inherits from.
- `different_settings_to_system`: one `;`-joined string of changed keys per preset, in the order
  `[print, filament 1, ..., filament N, printer]`.
- Changed keys include keys the stock preset leaves unset. The X2D's stock process has no `brim_type` at all,
  so a brim set by the CLI is lost unless `brim_type` is listed.
- The plate type (`curr_bed_type`) and the filament colours (`filament_colour`) are the project's own. They
  are never listed as preset changes.

## Steps

1. Flatten the presets twice with `bambu_presets.py`: once plain into `presets/stock`, once with your `--set`
   overrides into `presets/tuned` (`bambu-cli-slicing`).
2. Slice with the tuned files and `--export-3mf`, with an absolute `--outputdir`.
3. Name the project presets and list the changes:

   ```sh
   python3 -I "${CLAUDE_PLUGIN_ROOT}/scripts/project_presets.py" out/plate.3mf \
     --print presets/stock/process.json presets/tuned/process.json \
     --filament presets/stock/filament.json presets/tuned/filament.json \
     --print-name "Box 0.24mm (Textured PEI)" --filament-name "Box PLA Basic (tuned)"
   ```

   - Give `--filament STOCK TUNED` once per filament in the project, in order. It refuses on a count
     mismatch, or when a filament's type differs from its tuned preset's (wrong order).
   - `--machine STOCK TUNED` only if the printer preset was changed too.
   - Without names, a changed preset becomes "<stock name> (project)". An unchanged one keeps its stock name.
   - `--dry-run` shows the change lists without writing. `--out other.3mf` writes a copy.
4. Read its output. Each preset's change list should be exactly what you set. Two warnings matter:
   - "no preset differs from stock": the tuned files weren't given as TUNED.
   - "the project's values differ from the tuned presets for: ...": the 3MF wasn't sliced with these files.
5. Run it again after every re-slice: each `--export-3mf` writes a fresh, empty list.

The rewrite is safe to repeat. It replaces only the project block, keeps every other entry byte for byte and
in order, checks the new file, and then moves it over the old one in one step. Same arguments, same file.

## Verify in the app

Only when the person is at the Mac, nothing is printing that you could disturb, and they're happy for you to
open the file (`print-a-plate` step 2):

1. The print and filament preset menus show the project names, marked as modified ("*").
2. Open the changed settings: brim type, nozzle and bed temperatures, retraction, first-layer speed. Each
   should be the tuned value.
3. Slice in the app (⌘R) and compare with the CLI's `result.json`. The Send dialog's time is
   `total_predication`: on the PCIe test plate the two agreed to the second, and the grams to the hundredth.
   Allow a minute or two and a few tenths of a gram.
4. If the numbers disagree by more, the CLI was given different presets from the app's (often a flattener
   that ignored `include`), or the project still opens on stock. Compare a key you set.

## Real case: the PCIe box test plate

`slice.sh` set a 5 mm outer brim, a 30 mm/s first layer, a 210/215 °C nozzle, a 60/65 °C Textured PEI bed and
0.8 mm retraction. After `project_presets.py`:

- print "PCIe box 0.24mm (Textured PEI)" <- "0.24mm Standard @BBL X2D": `brim_type`,
  `initial_layer_infill_speed`, `initial_layer_speed`
- filament "PCIe box PLA Basic (tuned)" <- "Bambu PLA Basic @BBL X2D 0.4 nozzle":
  `filament_retraction_length`, `nozzle_temperature`, `nozzle_temperature_initial_layer`,
  `textured_plate_temp`, `textured_plate_temp_initial_layer`

`brim_width` isn't listed: 5 mm is already the stock value.

## Another shape the app writes

A project saved by the app itself, with a system preset edited but not saved as a user preset, keeps the
system name in `print_settings_id`, lists the changed keys in `different_settings_to_system`, and has no
`inherits_group`. `project_presets.py` writes the named-project-preset shape above, the one the PCIe box fix
used on 2026-12-01.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.