using-memory

using-memory is a skill for Claude Code, Codex from Lotargo/memory_plugin. It costs 91 tokens per session (2,399 once invoked), scanned A, original, MIT.

Instructions for using a persistent memory and knowledge system connected to helper tools. It covers saving and retrieving facts, searching a curated knowledge base, managing documents, and linking related project information.

In plain words
What is it for?
Use it when recording durable preferences or project rules, recalling saved facts, ingesting documents, searching the knowledge base, or managing links between stored information.
Why use it?
It explains which memory or knowledge operation fits each situation, so useful project context can be stored and found later instead of being lost between sessions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it when recording durable preferences or project rules, recalling saved facts, ingesting documents, searching the knowledge base, or managing links between stored information.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lotargo/memory_plugin/using-memory
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.

Any agent
npx skills add Lotargo/memory_plugin --skill using-memory
Clone the repo
git clone --depth 1 https://github.com/Lotargo/memory_plugin

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lotargo/memory_plugin/using-memory/github.svg)](https://agentmods.dev/skills/lotargo/memory_plugin/using-memory)
Your own site
<a href="https://agentmods.dev/skills/lotargo/memory_plugin/using-memory"><img src="https://agentmods.dev/badge/skills/lotargo/memory_plugin/using-memory/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 using-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/lotargo/memory_plugin/using-memory"><img src="https://agentmods.dev/badge/skills/lotargo/memory_plugin/using-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,399 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.00091 $0.02399
Opus 5.5 $0.00036 $0.00960
Sonnet 5.5 $0.00018 $0.00480
Haiku 4.5 $0.00009 $0.00240

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

Security

Grade A, and why

using-memory 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 26d 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.

skills/using-memory/SKILL.md · 82 lines

How it starts

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

Using Memory, Hybrid RAG Knowledge Engine & MCP Helper Tools

You have access to a persistent dual-layer memory engine supercharged with an Agent-Driven Knowledge Graph and general MCP integration helpers:

  1. Layer 1: Notebook Store (Key-Value Facts): Stores high-signal personal preferences, project conventions, and durable rules in clean Markdown.
  2. Layer 2: Curated RAG Knowledge Base: Preserves selected external findings, documentation, repositories, and technical guides that are likely to matter again.
  3. Layer 3: Agent-Driven Knowledge Graph: Connects Notebook facts (Layer 1) to specific Knowledge Base documents, sections, and exact line ranges (Layer 2).
  4. Integration Layer (General MCP Helpers): Quickly discovers connected MCP servers and identifies appropriate tools for specific tasks.

Session Initialization (MANDATORY)

Follow this exact sequence at the start of every session:

  1. If the client has already supplied an auto-injected <MEMORY> block (native OpenCode), treat the complete active memory as loaded and do not call recall again merely for initialization. In clients without auto-injection, your very first step MUST be recall(scope: "all") with full bodies and no restrictive filters — never mode: "headers".
  2. Apply entries marked kind: "directive" as active user-selected personalization or working instructions. Treat kind: "fact" entries as descriptive context.
  3. Call memory_info for the current workspace.
  4. If it reports Identity: git and Registry: unlinked, immediately call link_project_memory for the current directory.
  5. If the link result reports migrated: true, call recall(scope: "all") again so the migrated facts enter the active context.
  6. If it reports Identity: no-git, do not create project memory and do not invent a remote; continue with global memory only.

1. Tool Selection Decision Matrix

Scenario / Intent Target Tool Key Parameters
User shares identity, tech stack preference, or workflow rule remember fact (English), title (concise 2-5 word headline), kind (fact context or directive active instruction), scope, optional directory (workspace path), docId, startLine, endLine
User asks what you remember about them, the project, or linked docs recall scope ("all", "global", "project", "list_projects"), mode ("full", "headers"), offset, limit, optional query, tags, since, until, directory / project (at session start in clients without auto-injection, MUST fetch all memories with scope: "all" without restrictive query filters)
Get a single fact's text and metadata by ID get_fact id (metadata id e.g. "8f3a2c"), scope, optional directory
User corrects/updates or reclassifies an old saved fact update_fact id (number/id/text), newText, optional kind, scope, optional directory
Replace a fact but keep a version trail remember fact, supersedes (number/id/text), optional directory
Protect a fact from accidental forget remember keep: true
Set a time-to-live on a fact remember ttl ("90d", "2w", "24h", "12m")
Filter facts by keyword / tags / date recall query, tags, since, until, optional directory
Show storage paths, versions, fact & RAG stats, git identity memory_info optional directory
Connect a Notebook fact to a document, section, or line range link_knowledge action ("link", "list_links", "get_doc_links"), factText, docId, startLine, endLine, relationType, optional directory
Register current Git project identity / migrate legacy stores memory_info then link_project_memory when Registry: unlinked directory, optional remote
Remove path alias or purge project identity unlink_project_memory directory, purge (boolean)
Move or merge project memories to new target identity relink_project_memory directory, remote (target remote URL)
User asks to index a documentation URL, file, or repository ingest_document content (text/file path/URL), type ("text", "file", "url"), title, path, scope (project default), optional directory
User asks a complex question about indexed docs or code query_knowledge_base query, scope (all default), limit, instruction, generateEmbeddings, optional directory
User needs multiple queries executed in batch (comparisons, multi-topic) batch_query_knowledge_base queries (array), scope (all default), limit, instruction, generateEmbeddings, optional directory
Read full raw content of an ambiguous/abstract document manage_knowledge_base action: "read_document", docId
View DB stats, list indexed docs, read/delete docs, export/import snapshots manage_knowledge_base action ("stats", "list", "read_document", "delete", "export_snapshot", "import_snapshot"), docId, snapshotPath, optional directory
Re-embed all documents after switching embedding model / dimension reindex_knowledge_base model, dimension (optional; defaults to active config)
Discover available MCP servers and their specific purposes list-mcp-tools —
Ask which MCP tool / server is suitable for a specific task mcp-reminder task (string, e.g., "db migration")

Read the full file on GitHub · 82 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 26d ago Changed · -179 lines · -33 tokens per session 95ae021c633e
  2. 1mo ago First seen · 261 lines · 124 tokens per session scan A 1fc5d6f78dee

Subscribe to this mod's changes

using-memory is a skill published in the GitHub repository Lotargo/memory_plugin (2 stars, last pushed 24d ago), licensed MIT. It adds 91 tokens to every session and 2,399 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

brain-page

Operating manual for reading and writing a project's brain — every read and write goes through the bundled zero-dependency brain CLI; never hand-edit brain files. Read it before creating or modifying any page or root page.

mindmuxai/brain.md · 47 tokens

brain-setup

Bootstrap the Open Project Brain Standard into the current project — prefer brain init (ensure BRAIN.md, scaffold empty brain brainRoot-aware, default-wire CLAUDE.md + AGENTS.md). Optionally install a pre-commit hook and a Claude Code or Codex SessionStart hook.

mindmuxai/brain.md · 63 tokens

brain-bootstrap

Seed a freshly-scaffolded brain with real project knowledge — on an existing (brownfield) project read the code, docs, and git log to draft the six root pages and capture key historical decisions; on a near-empty (greenfield) project interview the user. Every write goes through the brain CLI. Run it after brain-setup.

mindmuxai/brain.md · 74 tokens

brain-ingest

The process for digesting a conversation, document, or research result, classifying it, and writing it down as brain content (a root-page update or a new/updated page) through the brain CLI.

mindmuxai/brain.md · 48 tokens

crystalline-capture

Use when durable knowledge is learned while working, when the user asks to update a Crystalline domain, or before writing or editing an engram so it is deduplicated, well-formed and linked correctly.

jordiboehme/crystalline · 47 tokens

crystalline-intelligence

Use when the crystalline MCP tools are available and the task involves recalling, storing or sharing knowledge - searching domains, capturing engrams or sharing with a team.

jordiboehme/crystalline · 36 tokens