session-save

A session checkpoint tool that saves the agent's current work, decisions, file changes, and lessons before a session closes or becomes very large.

In plain words
What is it for?
Use it to preserve work-in-progress state, check for changes that were discussed but never saved, and prepare a concise continuation summary.
Why use it?
It prevents unfinished work and important context from being lost between sessions.

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/xcota/pos/session-save
Any agent
npx skills add xcota/pos --skill session-save
Clone the repo
git clone --depth 1 https://github.com/xcota/pos

Made for: Claude Code, Codex.

Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00019 $0.00791
Opus 5 $0.00010 $0.00396
Sonnet 5 $0.00004 $0.00158
Haiku 4.5 $0.00002 $0.00079

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

Security

Grade A, and why

session-save scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/session-save/SKILL.md · 72 lines

How it starts

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

/session-save — Save Session State

Save current session state before closing or when context gets heavy (>150K tokens).

Arguments

  • [name] — optional checkpoint name. Auto-generated if not provided.

Steps

  1. Analyze this session as a self-improvement signal: before summarizing, walk back through this session and read it as friction data (like /reflect Step 1b, but over the CURRENT dialogue): how the user responded (tone, corrections, what they valued, what frustrated them), and where the agent missed, substituted, failed to orient, or added noise. → new anti-pattern / learned / identity refinements, tagged with a source-tier. Don't bulk-load the transcript — reflect over what is already in context.

  2. Summarize what was done — scope = ALL un-persisted work since the last commit, NOT just the current salient task:

    • First scan for orphans: git log --oneline -5 vs. substantive work that exists only in the transcript/compaction-summary. Anything analyzed-but-never-written-to-a-file → fixate it in this save. Work done before a /compact is the most likely orphan — explicitly verify it got persisted.
    • Key decisions made
    • Files created/modified
    • Insights discovered
    • What remains to be done
  3. Extract knowledge — if any new entities, facts, or connections were discovered:

    • Create or update files in knowledge/{type}/ with [[wikilinks]]
    • Only for genuinely new, reusable knowledge — not session-specific noise
  4. Update shared state:

    • Update state/current.md with session results
    • Append to daily/{today}.md with session summary (2-3 lines)
  5. Track learnings:

    • If any anti-patterns were triggered → append to context/anti-patterns.md
    • If any new lessons learned → append to context/learned.md
  6. Save checkpoint to state/sessions/{name}.md:

    ---
    type: session-checkpoint
    date: {today}
    ---
    # {name}
    
    ## Done
    {what was accomplished}
    
    ## Remaining
    {what still needs to be done}
    
    ## Key Files
    {files that were created or modified}
    
    ## Continue With
    {prompt to resume this work in a new session}
    

Read the full file on GitHub · 72 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 · 72 lines · 19 tokens per session scan A 4ac0df03f3da

Subscribe to this mod's changes

session-save is a skill published in the GitHub repository xcota/pos (43 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 791 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ori-memory

Persistent agent memory with learning retrieval. Knowledge graph on markdown files — capture insights, decisions, research, and learnings during work, then retrieve them weeks or months later. Use when knowledge is too valuable to lose but too much to inject into every prompt.

aayoawoyemi/Ori-Mnemos · 54 tokens

capture-knowledge

将对话、项目文档、调试经验或用户指定材料沉淀到 Second Brain。用于“保存知识”“提取经验”“导入文档”“记录到知识库”“capture knowledge”等请求;先保存可追溯来源,再按一个稳定主题一张卡提取或更新 canonical 页面,禁止把 README、报告、故事或整段会话直接做成一张大卡。.

YusenZhang0601/context-canopy · 92 tokens

second-brain-learn

从当前 Agent 对话和工作轨迹中挖掘可长期保留的偏好、方法、Agent 角色事实、项目规则、知识与山脉进展;审计现有 owner,新增、纠错、缩限、替代、合并、迁移或退役规则,自动合并有证据的低风险变化,高风险变更先询问用户,并同步当前 Agent。用户说学习、记住、采纳或停止某种行为、修正规则、保存本次经验、从当前对话改进、运行 /learn,或要求未来 Agent 遵守某项教训时使用。.

YusenZhang0601/context-canopy · 145 tokens

plur-memory

Persistent learning for AI agents. Open engram format. Your agent learns from corrections, remembers across sessions, and transfers knowledge across domains.

plur-ai/plur · 31 tokens

recall

Recall this repository's OwnMem local memory before changing code, and keep it healthy. Use when a repository contains .ownmem/, when past debugging lessons could apply ("have we hit this before", "why is it done this way"), or when the user mentions ownmem, project memory, or recalling across sessions.

grpcer/ownmem · 66 tokens

ogham-research

Structured memory capture for Ogham shared memory. Use when the user wants to store findings, remember something, save what was learned, or capture a decision. Triggers on "remember this", "store this", "save this finding", "save what we learned", "capture this decision", "log this", or any request to persist…

ogham-mcp/ogham-mcp · 113 tokens