using-memory

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

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 skills/lotargo/memory_plugin/using-memory
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.

Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,296 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.00124 $0.06296
Opus 5 $0.00062 $0.03148
Sonnet 5 $0.00025 $0.01259
Haiku 4.5 $0.00012 $0.00630

Measured yesterday against content hash 1fc5d6f78dee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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

How it starts

The opening of the file, as written. The whole thing — 261 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.

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 · 261 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. yesterday 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 7d ago), licensed MIT. It adds 124 tokens to every session and 6,296 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens