session-snapshot

A session-saving procedure for the Lets workflow that records what happened during a coding session and how to continue. It always stores a recovery note in the project’s .lets/sessions folder.

In plain words
What is it for?
Use it when ending a session, saving a note before context compaction, or preparing a recovery handoff. It writes the snapshot but does not commit, push, merge, or close the work.
Why use it?
It preserves the task state before a session ends or its context is shortened. The next session can use the note to recover the goal, completed work, decisions, and next step.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/restarter/lets-workflow/session-snapshot
Any agent
npx skills add restarter/lets-workflow --skill session-snapshot
Clone the repo
git clone --depth 1 https://github.com/restarter/lets-workflow

Made for: Claude Code, Codex.

Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,895 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00083 $0.01895
Opus 5 $0.00042 $0.00948
Sonnet 5 $0.00017 $0.00379
Haiku 4.5 $0.00008 $0.00189

Measured 2d ago against content hash 1e9d1aae5ce8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

session-snapshot scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

TRANSCRIPT_PATH=$(find "$HOME/.claude/projects" -maxdepth 2 -name "${CLAUDE_CODE_SESSION_ID}.jsonl" 2>/dev/null | head -1)
plugins/lets/skills/session-snapshot/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Snapshot

Shared snapshot primitive for /lets:end (settlement + snapshot + close), /lets:end --pre-compact, and /lets:note --pre-compact. Single source of truth - all three delegate here so the template and file/pointer behavior never drift.

Goal: ONE recovery-grade ## RESUME snapshot, file-primary - it ALWAYS lands in a .lets/sessions/ file (the single trail /lets:start reads), regardless of task state (feature / trunk / --main / no-task). The active task gets only a ONE-LINE pointer to that file, and only when a task is unambiguously active (via detect-task, NEVER a list-by-status | head -1 guess).

Contract - this skill ONLY writes the snapshot (file + optional pointer). It does NOT end the session, push, merge, commit, or close anything. The caller decides what else to do.

Arguments (from the caller)

Passed via the Skill invocation's args string as space-separated key=value pairs (e.g. args: "kind=end pointer=off task-id=lets-abc range=session: X..HEAD (3 commits)"). Put range= / task-id= LAST when the value contains spaces - each consumes the rest of the string. Any omitted key falls to its default.

  • kind = precompact (default) | end - selects the artifact-path kind (snapshot-precompact / snapshot); Step 3 owns the filename, never build it here.
  • pointer = off (default) | auto - whether the skill writes the standalone one-line task pointer. off is the SAFE default (a caller that forgets never double-writes a task comment); a caller that wants the skill to write the pointer passes auto explicitly (both pre-compact callers do). /lets:end default passes off when it folds the pointer into its own progress comment, auto otherwise.
  • range (optional) - a RANGE_DESC string (e.g. session: <ref>..HEAD (N commits)); include the ### Range block ONLY when provided. Only /lets:end default passes it.
  • task-id (optional) - pre-resolved active task from the caller's own detect-task.

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 96 lines · 83 tokens per session scan B 1e9d1aae5ce8

Subscribe to this mod's changes

session-snapshot is a skill published in the GitHub repository restarter/lets-workflow (17 stars, last pushed 10d ago), licensed MIT. It adds 83 tokens to every session and 1,895 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.