session

session is a skill for Claude Code from Borda/AI-Rig. It costs 205 tokens per session (5,844 once invoked), scanned B, original, Apache-2.0.

A session-management tool for preserving selected work across a context reset. It writes a handover document containing the goal, decisions, lessons, files changed, open items, and next step, then restores that information later.

In plain words
What is it for?
Use it to dump a session, recall a saved handover, list stored handovers, or remove one when its work is finished.
Why use it?
It prevents important decisions and unfinished work from being lost when a conversation is cleared or its context is reset. Temporary exploration details are intentionally left out.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool; mentions Claude Code.

Part of the foundry plugin — 10 skills, 10 agents shipped together

Good fit Use it to dump a session, recall a saved handover, list stored handovers, or remove one when its work is finished.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/borda/ai-rig/session
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.

Any agent
npx skills add Borda/AI-Rig --skill session
Clone the repo
git clone --depth 1 https://github.com/Borda/AI-Rig

Made for: Claude Code.

Or install foundry, the plugin that ships this one along with the rest of its 10 skills, 10 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/borda/ai-rig/session/github.svg)](https://agentmods.dev/skills/borda/ai-rig/session)
Your own site
<a href="https://agentmods.dev/skills/borda/ai-rig/session"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/session/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for session

Your own site · 80×15
<a href="https://agentmods.dev/skills/borda/ai-rig/session"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/session.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 205 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,844 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00205 $0.05844
Opus 5.5 $0.00082 $0.02338
Sonnet 5.5 $0.00041 $0.01169
Haiku 4.5 $0.00020 $0.00584

Measured 6d ago against content hash 551c5f1c3cf6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

session 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 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.

Reads agent configuration directoriesmediumAgent snooping

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

find .claude/state/session -maxdepth 1 -name '*.md' ! -name 'PARKED.md' 2>/dev/null | while IFS= read -r f; do
plugins/cc_foundry/skills/session/SKILL.md · 343 lines

How it starts

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

Carry the durable part of a session across /clear, hold open loops until they land. dump composes a small handover doc from the live conversation, writes it to .claude/state/session/<slug>.md, ends by printing /clear. The session-restore.js hook (SessionStart, matcher clear) injects that doc into the fresh session, so restore is free. Implementation detail — diffs, tool output, exploration transcript, abandoned approaches — dropped on purpose; only the decision that settled an approach survives.

Runs inline, never context: fork. Conversation history is the authoritative source for what changed, what was decided, what never landed; a forked run would see none of it.

NOT for: auto-compact survival (compaction.md skill contract); reviving a finished conversation (native /resume). Boundary table in the notes section below.

  • $ARGUMENTS: required. Six modes:
    • dump [name] — sweep, compose and write handover doc, set LATEST pointer, print /clear next step. name optional; unnamed dumps derive a slug from branch + UTC timestamp.
    • recall [name] — print a stored handover into context, mark it consumed. Named, or LATEST when omitted. Manual path for dumps the hook skips.
    • list — table of stored handovers (slug, age, consumed) plus open parked items.
    • park <idea> — append one open-loop item to .claude/state/session/PARKED.md. No dump needed; works any time.
    • sweep — read conversation for unlanded ideas, unanswered questions, pending tasks; report them, offer to park.
    • drop <item> — fuzzy-match a parked item, remove it, log the closure.
  • Store dir: .claude/state/session/ (project-local; .claude/state/ gitignored, same as session-context.md)
  • Item store: .claude/state/session/PARKED.md — one bullet per open item; survives every dump, never auto-deleted
  • Pointer file: .claude/state/session/LATEST — plain text, slug of most recent unconsumed dump. Blank or missing = nothing pending.
  • Closure log: .claude/state/session/dropped.jsonl — one JSON line per drop
  • Doc size cap: ~1.5K tokens (~75 lines). Compress prose, never drop a decision.
  • Hook auto-restore window: unconsumed and created within 30 min. Outside it, recall is the manual path.
  • Hook truncation threshold: ~8000 chars — above it hook injects ## Goal + files table + ## Next step + a → /foundry:session recall <slug> pointer instead of the whole doc.
  • Stale threshold: 14 days (⚠ stale prefix when listing) — applies to handover docs and parked items
  • Delete threshold: 30 days — handover docs only, swept during list. Parked items never auto-deleted; only drop removes one.
  • Files-table row cap: 25 (over that, group by directory, state elided count)

Task hygiene — task tools may be deferred; load before first use: ToolSearch(query="select:TaskList,TaskCreate,TaskUpdate,TaskGet", max_results=4). Call TaskList first and triage each task it returns: completed if work clearly done, deleted if orphaned, keep in_progress only if genuinely continuing. Never spend a turn on bookkeeping alone — every TaskCreate/TaskUpdate ships in the same response as the next substantive tool call; one exception, TaskUpdate(completed) immediately before a long output block (rules/task-lifecycle.md).

Step 0: Validate and dispatch mode

Extract first word of $ARGUMENTS as MODE.

If MODE matches:

  • dump (alias: save) → Mode: dump
  • recall (aliases: restore, load) → Mode: recall
  • list → Mode: list
  • park → Mode: park
  • sweep → Mode: sweep
  • drop (alias: archive) → Mode: drop

Unsupported flag check — after extracting mode token, scan the tokens after it for --<token> patterns — except in park and drop, whose whole remainder is free-text payload (an idea or item may itself contain --), never flags. Found: invoke AskUserQuestion with question text ! Unknown flag(s): `--<token>`. Supported modes: dump, recall, list, park, sweep, drop. — (a) Abort (stop, re-invoke correctly) · (b) Continue ignoring (skip unknown flags, proceed with recognized mode).

Read the full file on GitHub · 343 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. 6d ago Changed · -4 tokens per session 551c5f1c3cf6
  2. 15d ago Changed f14cb1fbdc1b
  3. 17d ago Changed 5d984f0a53b9
  4. 27d ago Changed · +9 lines ea2ba8684b64
  5. 28d ago Changed · -5 lines 67bd9d2e4cb6
  6. 1mo ago Changed · +2 lines 2eed207ddc30
  7. 1mo ago Changed 872038610697
  8. 1mo ago First seen · 337 lines · 209 tokens per session scan B ef11cbb9599e

Subscribe to this mod's changes

session is a skill published in the GitHub repository Borda/AI-Rig (28 stars, last pushed yesterday), licensed Apache-2.0. It adds 205 tokens to every session and 5,844 once invoked, about $0.0008 per session on Opus 5.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.

Related

Other skills, from other repositories

memory-review

Review the file-based memory store via the Agent Monitor Config Explorer API: the user and project CLAUDE.md plus per-project auto-memory files under /.claude/projects/ /memory/.md. Groups by project, shows the index (MEMORY.md) vs per-fact files, and flags stale or oversized facts. Reads /api/cc-config/memory and…

hoangsonww/Claude-Code-Agent-Monitor · 93 tokens

context-optimizer

A context-management assistant for long conversations with AI agents. It helps organize the information an agent needs when conversations become large or contain conflicting details.

huangwb8/skills · 48 tokens

context-engineering

Strategies for managing LLM context windows effectively in AI agents. Use when building agents that handle long conversations, multi-step tasks, tool orchestration, or need to maintain coherence across extended interactions.

itsmostafa/llm-engineering-skills · 42 tokens

handover

Session handover — end a session by systematically updating project state files for continuity. Use this when the session is ending, the user asks for a "handover", or when significant progress needs to be recorded.

isvlasov/rageatc-oss · 45 tokens

learn

Capture an observation — something that went wrong or worked well — to LEARNINGS.md for future reference. Quick in-session capture, not full analysis.

isvlasov/rageatc-oss · 32 tokens

review-memory

Review auto-memory for the current project. Shows accumulated learnings, identifies noise, and helps promote permanent patterns to CLAUDE.md, rules, or skills.

stuartshields/claude-setup · 35 tokens