context-save

context-save is a command for Claude Code from wshobson/agents. It costs 12 tokens per session (999 once invoked), scanned A, original, MIT.

A command that captures project knowledge and saves it in formats such as JSON, Markdown, or vectors for later retrieval.

In plain words
What is it for?
Use it to record architecture, progress, and other project context so future sessions can pick up where earlier work stopped.
Why use it?
It helps preserve decisions, project state, and shared knowledge between work sessions or AI agents.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the context-management plugin — 1 command shipped together

Good fit Use it to record architecture, progress, and other project context so future sessions can pick up where earlier work stopped.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/wshobson/agents/context-save
About the project

Agentic Plugin Marketplace is a collection of reusable plugins, agents, skills, commands, and rules for coding-agent tools including Claude Code, Codex CLI, Cursor, OpenCode, Antigravity CLI, and GitHub Copilot. It is for developers assembling agentic workflows across multiple harnesses from shared Markdown sources, and the catalogue entries are examples or subsets of those workflow components.

wshobson/agents · 41,158 stars · on GitHub · sethhobson.com

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/wshobson/agents

Made for: Claude Code.

Or install context-management, the plugin that ships this one along with the rest of its 1 command.

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 context-save

README.md
[![agentmods](https://agentmods.dev/badge/commands/wshobson/agents/context-save/github.svg)](https://agentmods.dev/commands/wshobson/agents/context-save)
Your own site
<a href="https://agentmods.dev/commands/wshobson/agents/context-save"><img src="https://agentmods.dev/badge/commands/wshobson/agents/context-save/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 context-save

Your own site · 80×15
<a href="https://agentmods.dev/commands/wshobson/agents/context-save"><img src="https://agentmods.dev/badge/commands/wshobson/agents/context-save.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 999 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.00012 $0.00999
Opus 5.5 $0.00005 $0.00400
Sonnet 5.5 $0.00002 $0.00200
Haiku 4.5 $0.00001 $0.00100

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

Security

Grade A, and why

context-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 24d 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.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

plugins/context-management/commands/context-save.md · 182 lines

How it starts

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

Context Save Tool: Intelligent Context Management Specialist

Role and Purpose

An elite context engineering specialist focused on comprehensive, semantic, and dynamically adaptable context preservation across AI workflows. This tool orchestrates advanced context capture, serialization, and retrieval strategies to maintain institutional knowledge and enable seamless multi-session collaboration.

Context Management Overview

The Context Save Tool is a sophisticated context engineering solution designed to:

  • Capture comprehensive project state and knowledge
  • Enable semantic context retrieval
  • Support multi-agent workflow coordination
  • Preserve architectural decisions and project evolution
  • Facilitate intelligent knowledge transfer

Requirements and Argument Handling

Input Parameters

  • $PROJECT_ROOT: Absolute path to project root
  • $CONTEXT_TYPE: Granularity of context capture (minimal, standard, comprehensive)
  • $STORAGE_FORMAT: Preferred storage format (json, markdown, vector)
  • $TAGS: Optional semantic tags for context categorization

Context Extraction Strategies

1. Semantic Information Identification

  • Extract high-level architectural patterns
  • Capture decision-making rationales
  • Identify cross-cutting concerns and dependencies
  • Map implicit knowledge structures

2. State Serialization Patterns

  • Use JSON Schema for structured representation
  • Support nested, hierarchical context models
  • Implement type-safe serialization
  • Enable lossless context reconstruction

3. Multi-Session Context Management

  • Generate unique context fingerprints
  • Support version control for context artifacts
  • Implement context drift detection
  • Create semantic diff capabilities

4. Context Compression Techniques

  • Use advanced compression algorithms
  • Support lossy and lossless compression modes
  • Implement semantic token reduction
  • Optimize storage efficiency

5. Vector Database Integration

Supported Vector Databases:

  • Pinecone
  • Weaviate
  • Qdrant

Read the full file on GitHub · 182 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. 24d ago Changed · +4 lines · +12 tokens per session 882d900c18e0
  2. 1mo ago First seen · 178 lines · 0 tokens per session scan A 4801dca4b039

Subscribe to this mod's changes

context-save is a command published in the GitHub repository wshobson/agents (41,158 stars, last pushed today), licensed MIT. It adds 12 tokens to every session and 999 once invoked, about $0.0000 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-09-03.