save

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

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 commands/linxule/memex-plugin/save
Clone the repo
git clone --depth 1 https://github.com/linxule/memex-plugin
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,468 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 $0.00013 $0.02468
Opus 5 $0.00006 $0.01234
Sonnet 5 $0.00003 $0.00494
Haiku 4.5 $0.00001 $0.00247

Measured 2d ago against content hash 81a5388a1933, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 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 · 198 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. 2d 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 4d ago), licensed MIT. It adds 13 tokens to every session and 2,468 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-31.