A repo/Git savepoint artifact for coding-agent handoff after compaction, reset, or transfer.
Savepoint creates or verifies .savepoint/SAVEPOINT.md so a fresh agent can continue from current repo/Git state without prior chat context. It records the repo snapshot, validation posture, redaction status, and resume prompt that a plain summary can miss.
Savepoint is not a lightweight conversation summary. It is a recoverable repo/Git checkpoint; use /savepoint text or an ordinary summary when file recovery is unnecessary.
/savepoint Create or refresh .savepoint/SAVEPOINT.md.
/savepoint save Same as default.
/savepoint load Verify an existing savepoint and report whether continuation is safe.
/savepoint text Print a copy-paste handoff only; no file recovery guarantee.
If a client does not pass custom slash prompts through, use the natural-language equivalent: Use $savepoint to save, Use $savepoint to load, or Use $savepoint to create a text handoff.
From a clone of this repository, preview first:
# Claude user install
python3 scripts/install.py --target claude --scope user
# Codex repo install
python3 scripts/install.py --target codex --scope repo --repo-root /path/to/target-repo --add-gitignoreApply after reviewing the destination:
python3 scripts/install.py --target claude --scope user --apply
python3 scripts/install.py --target codex --scope repo --repo-root /path/to/target-repo --apply --add-gitignoreThe helper defaults to dry-run, refuses existing destinations, and writes files only with --apply. With repo-scope install, --add-gitignore appends .savepoint/.
Quick check from this repository:
python3 scripts/savepoint.py validate --allow-example-paths examples/file-bugfix/SAVEPOINT.mdOn Windows, prefer the install helper or a normal Git clone/worktree. Archive extraction tools can mishandle symlinks.
- The context window is full or likely to compact.
- You are about to reset or transfer a coding-agent session.
- A multi-file refactor needs a verifiable resume point.
- Codex, Claude, Gemini, or an external orchestrator must hand off repo state.
- Use an ordinary summary when no repo recovery is needed.
- Use
/savepoint textfor a copy-paste note without file recovery. - Use
/savepointwhen the next agent must verify disk/Git state before continuing.
- A short ordinary summary is enough.
- The user asks about SQL
SAVEPOINT. - The request is only
/status,/new, compaction policy, PTY control, or session rotation. - The user asks for direct code/docs edits without checkpoint intent, or an app feature named savepoint.
- Git commit, stash, or branch history is the right tool.
- File mode writes
.savepoint/SAVEPOINT.md. - The artifact includes a repo/Git snapshot,
## Resume Prompt, and one finalSAVEPOINT_V1marker block. - Generated artifacts receive pattern-based secret-like scans before
REDACTION_CHECKED: yes. - The bundled validator checks marker shape and safe-resume fields.
- On load, current disk state wins over savepoint text.
A typical /savepoint load report answers whether a fresh agent can continue safely:
Loaded: .savepoint/SAVEPOINT.md
Git root: matches
Branch: feature/auth matches
HEAD: matches
Working tree drift: none
Required files: present
Detail artifacts: none needed
Redaction: checked
Savepoint validation: passed
Project validation: passed
RESUME_READY: yes
Next action: run npm test -- tests/auth/session.test.ts
- Tests pass.
- The code is correct.
- The task is complete.
- Future conflicts are impossible.
- Repo recovery from text mode.
The portable skill entrypoint is skills/savepoint/scripts/savepoint.py; repository-local commands use scripts/savepoint.py.
inspect --json exits 0 when the file and marker are valid, 1 when a savepoint-like file is parsed but invalid, and 2 when the file cannot be read or is not a savepoint artifact.
Minimal file workflow:
python3 scripts/savepoint.py init-input --output .savepoint/input.json
$EDITOR .savepoint/input.json
python3 scripts/savepoint.py save --input .savepoint/input.json --output .savepoint/SAVEPOINT.md --assert-no-active-commands --scan-redaction --validate
python3 scripts/savepoint.py inspect .savepoint/SAVEPOINT.md --jsonUse validation.project.status values passed, failed-expected, failed-blocking, not-run-justified, or not-run-unknown. With --scan-redaction, the input JSON is scanned before rendering; do not put raw secrets in .savepoint/input.json.
Normal create/load should use only:
skills/savepoint/SKILL.mdskills/savepoint/scripts/savepoint.pyskills/savepoint/references/*.mdonly for advanced edge casesskills/savepoint/schemas/savepoint-v1.schema.jsononly when debugging marker schema
Examples, evals, maintainer docs, and repository validation scripts are not normal agent context.
examples/README.md: scenario index.examples/file-bugfix/: small file savepoint.examples/file-architecture/: savepoint with focuseddetails/*.mdspillover.examples/load-report/: sample load reports.examples/text-note/: response-only/savepoint textnote.examples/unsafe-savepoint/: intentionally unsafeRESUME_READY: noartifact.
Use scripts/savepoint.py validate .savepoint/SAVEPOINT.md for generated artifacts.
- Repository change validation:
AGENTS.md. - Marker and safe-resume semantics:
docs/reference/savepoint-contract.md. - Compact packaging guidance:
docs/reference/context-packaging.md. - Manual artifact fallback:
docs/reference/savepoint-template.md.
External PTY controllers may parse the final SAVEPOINT_V1 block and decide whether to rotate sessions. This skill only prepares file artifacts or text notes; orchestration remains outside the skill.
See orchestrators/session-rotation.md.