branch-and-checkpoint
하는 일
실행 중인 smolvm 가상 머신의 디스크와 메모리를 일정에 따라 보관하고, 이전 시점으로 되돌아가고, 같은 순간에서 복사본을 시작하는 방법을 보여 줍니다. 이런 머신에서 긴 작업이나 에이전트를 돌리는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓에이전트나 긴 작업이 이전 시점으로 되돌아가야 할 때.
- ✓머신이 멈추거나 삭제되어도 머신의 상태가 남아 있어야 할 때.
- ✓같은 시점에서 시작하는, 이미 준비된 머신 복사본이 여러 개 필요할 때.
스킬 링크
https://github.com/smol-machines/smolvm/blob/main/docs/branch-and-checkpoint/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 smolvm 머신을 한 시간마다 저장해 두고, 에이전트가 무언가를 망가뜨리면 되돌릴 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
체크포인트는 실행 중인 머신의 디스크와 메모리를 함께 저장합니다. 스크립트가 타이머에 따라 체크포인트를 만들고, 요청한 개수의 저장 지점만 남깁니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
복원하면 실행 중이던 프로그램도 돌아오나요?
네. 스킬은 복원이 남겨 둔 디스크와 메모리를 모두 되돌리므로, 실행 중이던 상태도 돌아온다고 설명합니다.
분기 복사본을 다른 컴퓨터로 옮길 수 있나요?
아니요. 분기의 저장된 상태는 같은 컴퓨터에 남으며 내보낼 수 없습니다.
머신에 특별한 설정이 필요한가요?
네. 머신은 branchable 옵션으로 시작해야 하며, macOS에서는 저장된 캡처에도 이 옵션이 필요합니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 6.9k
- 순위
- #13714
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
coding-agent
6.9k에이전트가 Claude Code 같은 코딩 에이전트를 안전한 smolvm 가상 머신 안에서, 프로젝트 폴더를 연결한 채로 실행하도록 돕습니다.
credentials
6.9k에이전트가 내 키로 API를 호출하게 하되, 키는 가상 머신 안에 들어가지 않아 신뢰할 수 없는 코드가 읽지 못하게 합니다.
dev-env
6.9k에이전트가 필요한 도구를 설치해 둔 smolvm 개발 머신을 유지하도록 가르칩니다. 그래서 빠르게 다시 시작하고 세션이 바뀌어도 패키지가 남습니다.
docker-in-machine
6.9k에이전트가 smolvm 가상 머신 안에서 Docker 데몬을 실행하도록 돕습니다. 그래서 테스트, 빌드, 컨테이너를 시작하는 에이전트가 그곳에서 작동할 수 있습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.