session

session is a command for Claude Code from nvk/llm-wiki. It costs 32 tokens per session (881 once invoked), scanned A, original, MIT.

A command for capturing, listing, restoring, and promoting session context, meaning the operational memory of an agent session.

In plain words
What is it for?
Use it to configure automatic capture, check session status, create a manual digest, restore context, or promote selected learnings into wiki notes.
Why use it?
It keeps temporary session information separate from lasting topic knowledge and lets you choose what to preserve.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Codex.

Part of the wiki plugin — 1 skill, 28 commands shipped together

Good fit Use it to configure automatic capture, check session status, create a manual digest, restore context, or promote selected learnings into wiki notes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nvk/llm-wiki/session
About the project

LLM Wiki is a system that uses AI agents to research sources, compile knowledge bases, organize project briefs, and answer questions from the resulting wiki. It is used to turn rough ideas and investigations into structured, reusable knowledge for agents, including Claude Code, Codex, and OpenCode. The catalogue entries are commands, hooks, skills, instructions, and a plugin that implement its workflow.

nvk/llm-wiki · 1,422 stars · on GitHub · llm-wiki.net

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.

Clone the repo
git clone --depth 1 https://github.com/nvk/llm-wiki

Made for: Claude Code.

Or install wiki, the plugin that ships this one along with the rest of its 1 skill, 28 commands.

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/commands/nvk/llm-wiki/session/github.svg)](https://agentmods.dev/commands/nvk/llm-wiki/session)
Your own site
<a href="https://agentmods.dev/commands/nvk/llm-wiki/session"><img src="https://agentmods.dev/badge/commands/nvk/llm-wiki/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/commands/nvk/llm-wiki/session"><img src="https://agentmods.dev/badge/commands/nvk/llm-wiki/session.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 881 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00032 $0.00881
Opus 5.5 $0.00013 $0.00352
Sonnet 5.5 $0.00006 $0.00176
Haiku 4.5 $0.00003 $0.00088

Measured 1mo ago against content hash e931c3f83b75, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

session 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 1mo 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-plugin/commands/session.md · 79 lines

How it starts

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

Your task

Manage llm-wiki session context. Session context is operational memory for agent sessions, not canonical topic knowledge. Use HUB/.sessions/ as the canonical store and promote only explicit distilled learnings into topic raw/notes/.

First read references/sessions.md, then resolve HUB by the standard hub resolution protocol from references/hub-resolution.md. If a deterministic helper is available, prefer it:

scripts/llm-wiki-session --hub "$HUB" <subcommand>

If the helper is not available, perform the equivalent file operations described in references/sessions.md.

Parse $ARGUMENTS

  • enable [--mode capture-only|balanced|aggressive] [--tool-events N]: re-enable or reconfigure automated capture by writing HUB/.sessions/config.json. Default mode is balanced; default threshold is 50 observed tool events.
  • disable: opt out by setting enabled: false in HUB/.sessions/config.json.
  • status: report whether capture is enabled, where .sessions/ lives, and how many sessions are indexed.
  • capture: force a manual digest checkpoint for the current or specified session. Accept optional --harness, --session-id, --cwd, --topic, and --summary hints.
  • list: list sessions by recency, optionally filtered by --harness, --cwd, or --topic.
  • show <session-id>: show the latest digest for a session.
  • rehydrate [--session-id <id>|--cwd <path>|--topic <slug>]: print a compact context block that the harness should read before continuing.
  • promote <session-id> --topic <slug>: create a topic raw/notes/ promotion note from the distilled digest. Do not copy raw transcripts.

Policy

  1. Automated capture is default-on when trusted hooks are installed. Users can opt out with session disable, which writes enabled: false and causes hooks using --if-enabled to no-op.
  2. Hooks should be fast and deterministic: append redacted JSONL event metadata, update state, and write markdown digests at checkpoints. Do not call an LLM from every tool hook.
  3. Raw transcript archiving is off by default. Store transcript pointers/hashes, not transcript bodies.
  4. Auto-promotion is forbidden. Sessions can be untagged or topic-tagged, but canonical wiki knowledge requires explicit promotion.
  5. Rehydration may inject a short context block in balanced/aggressive modes; strict forced continuation remains opt-in and must have loop guards.

Read the full file on GitHub · 79 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. 1mo ago First seen · 79 lines · 32 tokens per session scan A e931c3f83b75

Subscribe to this mod's changes

session is a command published in the GitHub repository nvk/llm-wiki (1,422 stars, last pushed 14d ago), licensed MIT. It adds 32 tokens to every session and 881 once invoked, about $0.0001 per session on Opus 5.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.