save

save is a command for Claude Code from linxule/memex-plugin. It costs 13 tokens per session (2,633 once invoked), scanned A, original, MIT.

A memo-saving command that records the current session’s context in a memex knowledge vault, a searchable collection of connected notes.

In plain words
What is it for?
Use it to identify the project, search related memos, add links to them, and write a memo about the current session.
Why use it?
It preserves decisions and useful context so later sessions can find and connect them to earlier work.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; positional $N argument.

Part of the memex plugin — 5 skills, 3 commands, 5 hooks shipped together

Good fit Use it to identify the project, search related memos, add links to them, and write a memo about the current session.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/linxule/memex-plugin/save
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/linxule/memex-plugin

Made for: Claude Code.

Or install memex, the plugin that ships this one along with the rest of its 5 skills, 3 commands, 5 hooks.

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 save

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/linxule/memex-plugin/save"><img src="https://agentmods.dev/badge/commands/linxule/memex-plugin/save.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,633 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.00013 $0.02633
Opus 5.5 $0.00005 $0.01053
Sonnet 5.5 $0.00003 $0.00527
Haiku 4.5 $0.00001 $0.00263

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

Security

Grade A, and why

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 23d 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.

commands/save.md · 207 lines

How it starts

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

Save Memo Command

Save the current session context as a memo to the memex vault.

Instructions

1. Detect the Project

Use git remote or working directory to identify the project.

2. Connect to Existing Knowledge

If you know (or suspect) this session relates to previous work, search:

memex search "<keywords>" --limit=5

Use results to:

  • Add wikilinks to related memos
  • Note if this contradicts or supersedes a previous decision
  • Suggest topic links that already exist

Skip this step for standalone topics where you already know the relevant links.

3. Write the Memo

Model guidance. This is the Layer 1 path: write the memo inline in this session — you were THERE, and that live experiential context is exactly what makes a Layer 1 memo better than the transcript-reconstructed fallback. Do not delegate the write just to change models; running inline on whatever model you're on is the intended, best-quality flow.

If you do delegate memo generation to a subagent (e.g. to conserve a heavier main model, or to batch a backlog), pin it to model='sonnet' — memo writing + observation extraction is a sonnet-tier task:

Task(subagent_type='general-purpose', model='sonnet',
     prompt='Generate a session memo from the transcript at <path>. Read the memo prompt at <vault>/skills/memo-writing/memo-default.md ...')

The automated background fallback (SessionStart post-compaction / orphan-retry) already pins model='sonnet'; keep any manual delegation consistent with it.

Use the format and quality guidelines from the memo-writing skill. You have full session context — you were THERE. Capture:

  • The journey (what was tried, what failed, what surprised you)
  • Alternatives considered and why they were rejected
  • Failed approaches (often more valuable than what worked)
  • User's voice (quotes that reveal priorities, concerns, thinking)
  • Specific open threads (not vague "think about this")

The memo template is defined in the skill. Key sections:

  • For Future Context — the one-liner briefing
  • Summary — what was the actual work (not "we discussed X")
  • What Happened — key decisions, what worked/didn't, surprises, insights
  • Perspectives & Tensions — where user and AI disagreed or changed direction (omit if straightforward)
  • Open Threads — concrete next steps, unresolved questions, blocked items
  • Related — wikilinks to related topics/memos
  • Context Signals — difficulty, session character

Read the full file on GitHub · 207 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. 23d ago Changed · +3 lines 8dbc20ee46c6
  2. 1mo ago Changed · +4 lines 6f0ca4e30dd4
  3. 1mo ago Changed · +2 lines 5391901b6eaf
  4. 1mo ago First seen · 198 lines · 13 tokens per session scan A 81a5388a1933

Subscribe to this mod's changes

save is a command published in the GitHub repository linxule/memex-plugin (7 stars, last pushed 3d ago), licensed MIT. It adds 13 tokens to every session and 2,633 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-31.