Session Management

Session Management is a skill for Claude Code, Codex from lukacf/meerkat. It costs 16 tokens per session (405 once invoked), scanned A, original, Apache-2.0.

A guide to preserving and restoring conversation sessions using saved runtime state. Session replay rebuilds a conversation from stored events, while compaction shortens older conversation details into summaries.

In plain words
What is it for?
Use it when resuming sessions, recovering after compaction or restart, inspecting saved state, or tuning how much conversation is compacted.
Why use it?
It helps resume work safely and explains how to handle archived sessions, uncertain saved data, and lost context without manually changing internal files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Session Management

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukacf/meerkat/session-management.svg)](https://agentmods.dev/skills/lukacf/meerkat/session-management)
Your own site
<a href="https://agentmods.dev/skills/lukacf/meerkat/session-management"><img src="https://agentmods.dev/badge/skills/lukacf/meerkat/session-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 405 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.1 $0.00016 $0.00405
Opus 5 $0.00008 $0.00202
Sonnet 5 $0.00003 $0.00081
Haiku 4.5 $0.00002 $0.00040

Measured 6d ago against content hash 96d10afb7975, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

Session Management 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 6d 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.

meerkat-session/skills/session-management/SKILL.md · 43 lines

What it actually says

Session Management

Use session management guidance when resuming, inspecting, or reasoning about a conversation's persisted runtime state.

Operating Rules

  • Resume with the session_id from a previous run. The runtime rebuilds the session from durable state when persistence is enabled.
  • Treat event logs, catalogs, and projection files as derived. A current Session is domain-only conversation and metadata; the store issues the physical authority used to commit or recover it. Never repair state with ad hoc file edits.
  • An archived session is lifecycle-terminal and is not an ordinary resume target. Durable-tail recovery can also hold or quarantine a resume when the persisted evidence is ambiguous; preserve the data and surface the typed failure instead of fabricating a repair.
  • Compaction may replace old transcript detail with summaries. Use skills, memory, files, and WorkGraph to recover relevant context when needed.
  • System messages are ordinary ordered transcript messages. They may repeat at turn boundaries; do not assume there is one mutable system-prompt slot.
  • Host-injected context is a typed, separate user-channel message delivered immediately before the turn input. It is excluded from memory indexing and is not a free-form transcript role.
  • Session persistence preserves conversation continuity. It does not replace WorkGraph for shared durable work or Schedule for future wakeups.

Compaction

  • Lower thresholds compact more often and reduce live context.
  • Higher thresholds preserve more live context but cost more tokens.
  • Compaction summaries are typed runtime-minted messages. Hosts and transcript rewrite callers cannot mint that role, and summaries are not re-indexed into memory.
  • If compaction causes ambiguity, inspect durable artifacts or ask for the missing detail instead of inventing it.
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. 6d ago First seen · 43 lines · 16 tokens per session scan A 96d10afb7975

Subscribe to this mod's changes

Session Management is a skill published in the GitHub repository lukacf/meerkat (20 stars, last pushed today), licensed Apache-2.0. It adds 16 tokens to every session and 405 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

task-agent-eliza-bridge

Use when spawning a Claude Code, Codex, Gemini, Aider, or other CLI task agent whose work needs parent Eliza runtime context. Covers the read-only loopback bridge for character, room, memory, and active workspace state.

elizaOS/eliza · 55 tokens

kb-builder

Build an Obsidian-compatible knowledge base from public web sources using the TinyFish CLI. Use this skill when a user wants a builder-grade markdown knowledge base on a technical topic, asks for a structured research vault, or wants a topic compiled from live public sources into interlinked markdown files. Supports…

tinyfish-io/tinyfish-cookbook · 158 tokens

self-improve-with-tinyfish

Enables Hermes to create new reusable skills for itself by researching live web sources with TinyFish Search and Fetch, analyzing source coverage, writing SKILL.md files, and installing them into Hermes memory. Use when the user asks Hermes to learn, teach itself, upgrade itself, or save a reusable capability.

tinyfish-io/tinyfish-cookbook · 68 tokens

aidd-context:02:project-init

Initialize or refresh the project memory bank, scaffold the rules directory, and ensure AI context files contain the project memory block. Use when running aidd init for the first time, bootstrapping a new project, or re-running the init flow on an existing project. Do NOT use for updating individual memory files…

ai-driven-dev/framework · 102 tokens

weknora-shared

Use when driving a WeKnora RAG server through the weknora CLI as an agent — authenticating, managing knowledge bases / documents / sessions / agents, running search or chat, or interpreting the CLI's JSON envelopes and exit codes. Read this before any other weknora- skill.

Tencent/WeKnora · 68 tokens

02-project-memory

Build the project's memory of its architecture, conventions, and decisions, and wire it into your AI tools. Use when the user wants to set up or refresh project memory, or rewire it into a tool. Not for editing one existing memory file.

ai-driven-dev/framework · 54 tokens