branch-and-checkpoint
Was er macht
Zeigt, wie du Festplatte und Arbeitsspeicher einer laufenden smolvm-virtuellen-Maschine nach Zeitplan sicherst, zu einem früheren Stand zurückkehrst und Kopien aus demselben Moment startest. Sie ist für Entwickler gedacht, die lange Aufgaben oder Agenten in diesen Maschinen laufen lassen.
Wann du ihn nutzt
- ✓Wenn ein Agent oder eine lange Aufgabe auf einen früheren Stand zurückgesetzt werden muss.
- ✓Wenn der Zustand einer Maschine überdauern muss, auch wenn die Maschine selbst gestoppt oder entfernt wird.
- ✓Wenn du mehrere Kopien einer laufenden Maschine willst, die alle vom selben Punkt starten.
Link zum Skill
https://github.com/smol-machines/smolvm/blob/main/docs/branch-and-checkpoint/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Sichere diese smolvm-Maschine stündlich und lass mich sie zurücksetzen, falls der Agent etwas kaputt macht.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Ein Checkpoint sichert sowohl Festplatte als auch Arbeitsspeicher einer laufenden Maschine. Ein Skript erstellt Checkpoints per Timer und behält nur die Anzahl gespeicherter Punkte, die du angibst.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Checkpoints, restores, pauses and branches
Verified on smolvm v1.29.0 on macOS arm64, 2026-10-15, and on v1.18.2 on Linux aarch64, 2026-09-24. Done means a restore brings back both the disk and the memory you left, the schedule keeps exactly the checkpoints you asked for and no fewer, and every child of a branch starts from a state you still hold as a checkpoint after the children are gone. The Linux runs used the scripts of their date; this version's preflight and cleanup scripts ran on Linux aarch64 on v1.22.2 on 2026-10-03.
README.md says what each of these operations is. This file is how to run them, and the traps.
Three facts shape everything here.
- smolvm has no scheduler and no retention.
scripts/checkpoint.shis the one capture a timer runs, with the rules the engine asks a scheduler to follow built in;references/scheduling.mdputs it under cron, systemd or launchd. - A branch's captured state stays on this host and cannot be exported. So a branch point is paired with a checkpoint taken at the same moment, which is the copy you keep.
--branchableatstartdecides what a machine can do later. A branch source needs it on every host, and on macOS so does a stored capture, which is what the scripts here take; Linux checkpoints and pauses without it.README.mdhas the errors when it is missing. The scripts always start with it.
Procedure
- [ ] 1. preflight.sh read result= and store_space_ok=
- [ ] 2. create-source.sh a machine with state in RAM and on disk
- [ ] 3. checkpoint.sh / schedule.sh captures, with retention
- [ ] 4. restore.sh any generation, into a new machine
- [ ] 5. pause and resume the restored machine, or any branchable one
- [ ] 6. branch-point.sh children plus a checkpoint of where they started
- [ ] 7. cleanup.sh machines, checkpoints, and smolvm's restore cache
1. Preflight. Read-only.
scripts/preflight.sh --store ./store
It checks that this binary has --store, --history, checkpoint-log, pause and restore
--at, says whether this host needs --branchable, and reports scheduler=builtin_none and
retention=builtin_none so nobody goes looking for them. store_space_ok=no blocks: a capture
into a full disk publishes nothing, and a machine restored while the disk was full was left with
guest I/O errors that stopped it being deleted normally.
2. A source with state you can check.
scripts/create-source.sh smolskill-src # for checkpoints and restores
scripts/create-source.sh smolskill-bp --branch-ready # for a batch branch
The workload writes a counter into /dev/shm every second, which is tmpfs and so RAM, and a marker to
/root/setup.txt on disk. A restore that brings the counter back proves memory came back, not only
the disk. --branch-ready makes the workload park in smolvm-branch-ready after its setup, which a
batch branch waits for.
Or the user's own machine. Name it with --name in the steps below. On macOS, if it was
started without --branchable, the first capture fails with deferred durable save requires file-backed guest RAM on v1.22.2 or guest RAM has no file-backed regions before v1.20.0, and the
only fix is a restart with the flag:
smolvm machine stop --name worker
smolvm machine start --name worker --branchable
That restart is a normal stop and start: disk state survives, and anything in RAM or /tmp is
lost, once. Say so to the user before doing it. Every start of that machine needs the flag from
then on for it to stay checkpointable.
A capture also refuses a machine with resources bound to this host: a host mount (-v), a
published socket, a remote volume, a host secret reference, custom DNS, a named network, a GPU,
CUDA, Rosetta, --ssh-agent or a Docker socket. The error, the initial portable checkpoint profile does not support ...; stop or detach these resources before capture, names which. From
v1.29.0 machine checkpoint --host-mounts captures a machine with host mounts, and the checkpoint
restores only on a host where the same paths exist.
3. Capture, once or on a schedule.
scripts/checkpoint.sh --name smolskill-src --store ./store --keep 6 --history 2
scripts/schedule.sh --name smolskill-src --store ./store --every 10 --times 4 --keep 2 --history 2
Each capture goes to a new directory named `<machine>-<l
Häufige Fragen
Bringt eine Wiederherstellung laufende Programme zurück?
Laut der Fähigkeit bringt eine Wiederherstellung Festplatte und Arbeitsspeicher zurück, sodass auch der laufende Zustand zurückkommt.
Kann ich Verzweigungskopien auf einen anderen Computer verschieben?
Nein. Der erfasste Zustand einer Verzweigung bleibt auf demselben Computer und kann nicht exportiert werden.
Braucht die Maschine eine besondere Einstellung?
Ja. Sie muss mit der Option für Verzweigungen gestartet werden, und unter macOS brauchen gespeicherte Erfassungen diese Option ebenfalls.
Details
Originalbeschreibung des Autors
Saves a running smolvm machine as checkpoints on a schedule, keeps a bounded history, restores any generation in it, pauses and resumes machines without losing running processes, and branches a warm machine into children with a checkpoint of the exact point they started from. Use when a machine's state has to survive the machine; when an agent or a job needs to roll back; when checkpoints must be taken periodically, since smolvm has no scheduler or retention of its own; when fanning a prepared machine out into workers; or when a checkpoint, a pause or a branch fails with an error that names no
repo: smol-machines/smolvm
Beliebtheit
- GitHub-Sterne
- 6.9k
- Platz im Ranking
- #13714
- Lizenz
- Apache-2.0
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
coding-agent
6.9kHilft deinem Agenten, einen Programmieragenten wie Claude Code in einer sicheren smolvm-virtuellen-Maschine mit eingebundenem Projektordner laufen zu lassen.
credentials
6.9kLässt deinen Agenten eine API mit deinem Schlüssel aufrufen, während der Schlüssel selbst nie in seine virtuelle Maschine gelangt und dort nicht gelesen werden kann.
dev-env
6.9kBringt deinem Agenten bei, eine smolvm-Entwicklungsmaschine mit installierten Werkzeugen zu erhalten, damit sie schnell neu startet und Pakete über Sitzungen hinweg behält.
docker-in-machine
6.9kHilft deinem Agenten, einen Docker-Daemon in einer smolvm-virtuellen-Maschine laufen zu lassen, damit Tests, Builds und Agenten, die Container starten, dort arbeiten können.
Ähnliche Skills
openclaw-update
394kHilft deinem Agenten, ein bestehendes OpenClaw-Gateway zu aktualisieren, mit der Methode, die zu deiner Installation passt, während deine Sitzung weiterläuft.
diagnose-gateway
394kHilft deinem Agenten herauszufinden, warum dein OpenClaw-Gateway fehlschlägt, indem er Einstellungen, Kanäle und Ports prüft, ohne etwas zu ändern.
crabbox-apps
394kHilft deinem Agenten, eine App auf einer temporären Cloud-Maschine zu öffnen und auszuführen und ihre Ansicht in deinem Chat-Seitenpanel zu zeigen.