memory-save

memory-save is a command for Claude Code from rjmurillo/ai-agents. It costs 19 tokens per session (1,174 once invoked), scanned A, a copy of memory-save, MIT.

A deprecated command for saving a useful piece of conversation context as a small, organized memory in Forgetful, a memory system. Its instructions say to use Serena's writememory instead.

In plain words
What is it for?
It was intended to check related memories, then create, update, link, or retire a stored memory based on the current conversation.
Why use it?
Using it can lead to an outdated memory workflow and duplicate the newer recommended command.

Command for Claude Code

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Deprecated**: Use `mcp__serena__write_memory` for memory creation. See [Memory Interface Decision Matrix](../../../CLAUDE.md#memory-interface-decision-matrix).

Part of the project-toolkit plugin — 125 skills, 25 commands, 33 agents, 5 hooks shipped together

Good fit It was intended to check related memories, then create, update, link, or retire a stored memory based on the current conversation.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents
agentmods
npx agentmods add commands/rjmurillo/ai-agents/memory-save

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 125 skills, 25 commands, 33 agents, 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 memory-save

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/rjmurillo/ai-agents/memory-save"><img src="https://agentmods.dev/badge/commands/rjmurillo/ai-agents/memory-save.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,174 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 86% copy Near-identical to another mod 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.00019 $0.01174
Opus 5.5 $0.00008 $0.00470
Sonnet 5.5 $0.00004 $0.00235
Haiku 4.5 $0.00002 $0.00117

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

Security

Grade A, and why

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

Origin

This is a copy

86% identical to memory-save — 41 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/forgetful/memory-save.md · 152 lines

How it starts

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

Save Memory

Deprecated: Use mcp__serena__write_memory for memory creation. See Memory Interface Decision Matrix.

Create an atomic memory from the current conversation context.

Your Task

  1. Analyze the conversation for the key insight/decision/pattern to capture
  2. Check for existing related memories that might be affected
  3. Create the memory with proper curation

User guidance: $ARGUMENTS

Pre-Creation: Check for Existing Memories

Before creating, query for related memories:

execute_forgetful_tool("query_memory", {
  "query": "<topic of new memory>",
  "query_context": "Checking for existing memories before creating new one",
  "k": 5,
  "include_links": true
})

Analyze results to determine if the new memory would:

  • Invalidate an existing memory (mark it obsolete with mark_memory_obsolete)
  • Update an existing memory (use update_memory instead of creating new)
  • Supersede an existing memory (create new, then mark old as obsolete with superseded_by)
  • Complement existing memories (create new and potentially link_memories)

Atomic Memory Principles (Zettelkasten)

Before creating, verify the memory passes the atomicity test:

  • Can you understand the idea at first glance?
  • Can you easily title it in 5-50 words?
  • Does it represent ONE concept/fact/decision?

Memory Constraints

  • Title: Max 200 characters - short, searchable phrase
  • Content: Max 2000 characters (~300-400 words) - single concept
  • Context: Max 500 characters - WHY this matters
  • Keywords: Max 10 - for semantic clustering
  • Tags: Max 10 - for categorization

Importance Scoring Guide

  • 9-10: Personal facts, foundational architectural patterns
  • 8-9: Critical technical solutions, major architectural decisions
  • 7-8: Useful patterns, strong preferences, tool choices
  • 6-7: Project milestones, specific solutions
  • 5-6: Minor context (use sparingly)

Read the full file on GitHub · 152 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 · 152 lines · 19 tokens per session scan A 355efe59582f

Subscribe to this mod's changes

memory-save is a command published in the GitHub repository rjmurillo/ai-agents (48 stars, last pushed today), licensed MIT. It adds 19 tokens to every session and 1,174 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 86% identical to memory-save, differing in 41 lines, and is treated as a copy.