memorize

memorize is a command for Claude Code from lucasrosati/claude-code-memory-setup. It costs 0 tokens per session (284 once invoked), scanned A, original, MIT.

A command for immediately pinning a decision, insight, or convention to a project's vault. It can save a supplied item or review the current session for information worth keeping.

In plain words
What is it for?
Use it to record an important project rule or decision during a session, or to update an existing session log.
Why use it?
It lets you preserve important knowledge before the session ends instead of relying on a later automatic save. It also avoids creating a note when there is nothing new to retain.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads .claude/ paths.

Good fit Use it to record an important project rule or decision during a session, or to update an existing session log.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/lucasrosati/claude-code-memory-setup/memorize
About the project

Claude Code Memory Setup is a workflow that gives Claude Code persistent project memory and selected codebase context using Obsidian notes, chat imports, and Graphify knowledge graphs. Developers use it to retain decisions between sessions and retrieve relevant code information without repeatedly reading the whole repository. Its catalogue commands support this memory and code-context workflow.

lucasrosati/claude-code-memory-setup · 1,038 stars · on GitHub

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/lucasrosati/claude-code-memory-setup

Made for: Claude Code.

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 memorize

README.md
[![agentmods](https://agentmods.dev/badge/commands/lucasrosati/claude-code-memory-setup/memorize/github.svg)](https://agentmods.dev/commands/lucasrosati/claude-code-memory-setup/memorize)
Your own site
<a href="https://agentmods.dev/commands/lucasrosati/claude-code-memory-setup/memorize"><img src="https://agentmods.dev/badge/commands/lucasrosati/claude-code-memory-setup/memorize/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 memorize

Your own site · 80×15
<a href="https://agentmods.dev/commands/lucasrosati/claude-code-memory-setup/memorize"><img src="https://agentmods.dev/badge/commands/lucasrosati/claude-code-memory-setup/memorize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 284 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.00000 $0.00284
Opus 5.5 $0.00000 $0.00114
Sonnet 5.5 $0.00000 $0.00057
Haiku 4.5 $0.00000 $0.00028

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

Security

Grade A, and why

memorize 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 yesterday.

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/memorize.md · 14 lines

What it actually says

/memorize — Update Permanent Memory

Pins a decision, insight or convention to the vault right away. /save already does this automatically at the end of the session; use this command only when you want to write something now, mid-session.

When you receive this command, do the following:

  1. Read ~/.claude/commands/save.md. Run the "Vault detection" block to get <vault> and <project>.
  2. With an argument (the item to memorize): run steps 2.2 to 2.5 of Phase 2 for the given item. If the item meets none of the 2.1 criteria, say why and don't write.
  3. Without an argument: run the whole Phase 2, starting at 2.1, over the current session. Items that a /save in this session already wrote count as "already memorized with no change".
  4. Don't create a session log: step 2.4 only applies if a log for this session already exists (from an earlier /save); in that case, update its "Notes created or updated" section.
  5. In the 2.5 report, omit the "Session log" line if none was touched.
  6. If nothing was written, don't write any file and end the reply with this exact line: Memory: nothing new to memorize.
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. yesterday First seen · 14 lines · 0 tokens per session scan A b55bc4f6c0a9

Subscribe to this mod's changes

memorize is a command published in the GitHub repository lucasrosati/claude-code-memory-setup (1,038 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 284 tokens. 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-10-22.

Related

Other commands, from other repositories