alivecontext/alive/save
Claude Code and agent skill by alivecontext/alive
- community
Checking that the SKILL.md file is still in the repository.
The human wants to checkpoint. Or: the stash has grown heavy — 5+ items, 30+ minutes, a natural pause in the work. The squirrel doesn't decide when to save. It surfaces the need and lets the human pull the trigger. Runs the full save protocol: confirms stash, writes log, updates state, generates projections, dispatches, resets.
Install
npx vskill@latest install alivecontext/alive/saveSKILL.md
The same SKILL.md was published earlier as alivecontext/alive/save.
Save
Checkpoint. Route the stash. Update state. Generate projections. Keep working.
Save is NOT a termination. The session continues. Save can happen multiple times. Each save increments the saves: counter and updates last_saved:. The stop hook only blocks when saves: 0 (never saved).
Flow
1. Read First (understand before acting)
Read these in parallel before presenting the stash or writing anything:
_kernel/now.json— which bundle is active? What was the context? Which tasks are urgent or active?_kernel/log.md— first ~100 lines (recent entries — what have previous sessions covered?)- Active bundle's
context.manifest.yaml— ifnow.jsonreports an active bundle, read its manifest
Do NOT read per-bundle task files directly — task data lives in now.json already (computed projection), or call tasks.py list --walnut {path} if you need specific detail. In v3, tasks are stored in tasks.json per walnut and per bundle, managed only through the supported task tooling (alive tasks promote for batched stash promotion in step 6c, scripts/tasks.py for direct edits like done / priority changes). Never edit tasks.json from the agent.
If `_kernel/now.json` does not exist: suggest running python3 "$ALIVE_PLUGIN_ROOT/scripts/project.py" --walnut {path} to generate it.
Standalone session (no walnut loaded): If no walnut was opened this session, the squirrel still has a stash to route. Ask: "Which walnut does this session belong to?" If the human names one, load its core files and proceed normally. If the human cannot name one, abort the save — on the fn-12 CLI-only save path, alive log prepend requires a concrete walnut (it only targets {walnut}/_kernel/log.md). Surface a quote block explaining the save is blocked until a walnut is chosen; the stash stays in conversation and the squirrel YAML at .alive/_squirrels/ keeps walnut: null until the next save. Do NOT attempt to write to a world-level .alive/log.md — the CLI does not support that path.
This gives the squirrel the full picture BEFORE it starts routing. It knows which bundle was active, what previous sessions accomplished, and what the task state is. This makes everything that follows smarter — better routing suggestions, better log entries that don't duplicate what's already recorded.
2. Pre-Save Scan
"Anything else before I save?"
Then scan back through messages since last save for stash items the squirrel may have missed. Add them.
3. Confirm Stash (batched)
Present the full stash visually in a single quote block for readability, then batch confirmations into as few AskUserQuestion calls as possible.
Display:
Then one AskUserQuestion call with up to 3 questions — skip empty categories:
| Question slot | Category | Options | |
|---|---|---|---|
| 1 | Decisions | "Confirm all" / "Review list" / "Drop some" | |
| 2 | Tasks | "Confirm all" / "Edit or drop" | |
| 3 | Notes | "Confirm all" / "Drop some" |
You can select an option OR use "Other" to provide free text — editing items, adding context, changing routing, or explaining what happened. Every question supports elaboration.
Insight candidates get a separate call (if any exist) because they require a different decision — commit as evergreen vs just log it:
→ AskUserQuestion: "Commit as evergreen" / "Just log it"
4. Write Log Entry
Before writing anything else, prepend a signed entry to `_kernel/log.md`. This is the primary record of what happened. The log entry uses the standard template:
- What happened (brief narrative)
- Decisions made (with rationale — WHY, not just WHAT)
- Tasks created or completed
- References captured
The log entry must be written BEFORE any other files. The log is truth. Everything else derives from it.
Write the entry via the `alive log prepend` CLI, not via the Edit tool. The CLI owns the deterministic parts of the entry block (heading, entry-hash marker, signed line, separator) and the frontmatter bump (entry-count, last-entry, summary). Your responsibility is the body prose + summary string.
Step 4a — Precheck (before composing anything):
Run the doctor log check. If it fails, abort the save, surface the hint to the human, and stop — do not attempt to write the log entry any other way.
Python fallback if bin/alive is missing:
Parse the JSON stdout. If check.status != "ok", show the check.hint verbatim to the human inside a quote block and stop. Do NOT fall back to Edit-tool log prepend. The CLI is the only supported write path on this version of the plugin.
Step 4b — Compose body + summary in memory.
The body is pure prose — the CLI adds the heading, hash marker, signed line, and separator. Do NOT write ## <date> -- squirrel:..., <!-- entry-hash: ... -->, signed: squirrel:..., or a trailing --- yourself; those come from the CLI.
The summary is a one-line distillation of the entry (what changed, not the full narrative). It lands in the log frontmatter's summary: key.
Step 4c — Invoke the CLI.
Single-line summary — pass via --summary CLI arg, body via stdin heredoc:
Multi-line summary — write the summary to a real temp file and pass --summary-file. Never use process substitution `<(...)` — it's shell-fragile in agent-invoked contexts and silently misbehaves under some Bash tool wrappers. Use trap ... EXIT so the temp file is removed even when the CLI exits non-zero and the skill aborts the save:
Compose the temp-file path with mktemp first, then write the summary to it via the agent's native file-write tool (NOT a shell heredoc — heredocs append a trailing newline, and --summary-file is read verbatim with no rstrip, so a stray \n would land in the frontmatter summary:). Use trap ... EXIT so the file is removed even when the CLI exits non-zero and the skill aborts the save:
Python fallback — single-line summary (same arg shape; substitute the binary):
Python fallback — multi-line summary (same temp-file + trap lifecycle as the primary path):
Step 4d — Parse JSON stdout + surface to the human.
The CLI emits pure JSON on stdout. Parse it and confirm:
success: trueprojection_updated: trueindex_updated: true(or you passed--no-indexintentionally — not the default save path)
Log the squirrel_id and entry_id in the save summary block so the human has an identifier to grep on later. Surface entry_count and any non-empty projection_stdout excerpt if the human asked about projection state.
If any of the booleans above are false, or if the CLI exits non-zero, treat the save as failed: surface the JSON error.code + error.message verbatim inside a quote block, and include error.hint and/or error.detail if the CLI emitted them (they're optional fields — not every error path populates them). Stop. Do NOT attempt a second write path.
5. Prepare Remaining Content (in memory)
Re-read `_kernel/log.md` first ~150 lines to ground the remaining work in the actual written log. This captures the entry just prepended in step 4 plus the previous 3-4 entries. Don't rely on memory of what was read in step 1; the log has changed since then.
Then prepare the content for all remaining files in memory:
- Active bundle's `context.manifest.yaml` — update the
context:field to reflect current state. Merge new information with existing context; don't flatten rich context from a previous deep session. - `_kernel/insights.md` — new evergreen entries (only if confirmed in step 3)
- Cross-walnut dispatches — brief log entries for destination walnuts
- Task promotion — confirmed task-shaped stash items are promoted in step 6c via a single
alive tasks promoteinvocation, not per-itemtasks.py addcalls. No prep is needed here; the CLI reads the stash items off the squirrel YAML written in step 6b. For non-promotion task edits (mark done, change priority on a pre-existing task), plan directtasks.pycalls: - Mark done:
python3 "$ALIVE_PLUGIN_ROOT/scripts/tasks.py" done --walnut {path} --id t001 - Edit:
python3 "$ALIVE_PLUGIN_ROOT/scripts/tasks.py" edit --walnut {path} --id t001 --priority active
The agent does NOT write `now.json`. alive log prepend (step 4) invokes project.py after the log write, which assembles now.json from all source files. Do not prepare now.json content.
6. Write Remaining Files (parallel)
Fire all remaining writes as parallel calls in a single message. The content was prepared in step 5. These are independent of each other — they only depend on the log entry existing, which step 4 handled.
Parallel writes:
- Active bundle's
context.manifest.yaml— context field update _kernel/insights.md— new evergreen entries (if any confirmed)- Cross-walnut dispatches — brief log entries to destination walnut logs (if any)
- Cross-walnut task additions — tasks routed to other walnuts (if any)
- Task edits via
tasks.pyBash calls (mark done, change priority on existing tasks) — can run in parallel with the file writes above. Promotion of new task-shaped stash items is a single post-6b call, see step 6c.
6b. Update Squirrel Entry
Write the routed stash to the session's squirrel YAML in .alive/_squirrels/{session_id}.yaml. This turns the YAML from a skeleton into an actual session record.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/alive/skills/save/SKILL.md
Popularity
- Repository stars
- 113
- Repository forks
- 5
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 26 Jun 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alivecontext/alive/save)