memory

memory is a skill for Claude Code, Codex from rjmurillo/ai-agents. It costs 99 tokens per session (2,750 once invoked), scanned A, original, MIT.

A routing layer for a tiered memory system that directs requests to focused tools for searching, writing, maintaining, or consolidating remembered context.

In plain words
What is it for?
Use it to recall prior context, route memory searches, record completed sessions, run memory checks, and maintain stored knowledge.
Why use it?
It helps an agent choose the appropriate memory operation when the request is unclear.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the project-toolkit plugin — 95 skills, 26 commands, 33 agents, 4 hooks shipped together

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/rjmurillo/ai-agents/memory
Any agent
npx skills add rjmurillo/ai-agents --skill memory
Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/rjmurillo/ai-agents/memory.svg)](https://agentmods.dev/skills/rjmurillo/ai-agents/memory)
Your own site
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/memory"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,750 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.00099 $0.02750
Opus 5 $0.00049 $0.01375
Sonnet 5 $0.00020 $0.00550
Haiku 4.5 $0.00010 $0.00275

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

Security

Grade A, and why

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.

The scan reads SKILL.md. This mod also ships 35 executable files (__init__.py, conftest.py, memory_core/__init__.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/memory/SKILL.md · 285 lines

How it starts

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

Memory System Skill

Thin router across the tiered memory system. Each operation lives in a focused sub-skill (ADR-063 memory-skill decomposition); this router points you at the right one so a caller loads only the surface it needs.


When to Use This Skill

Scenario Use Memory Router? Alternative
Not sure which memory operation you need Yes -
Tier 1 search only No memory-search sub-skill
Record a completed session No memory-reflexion sub-skill
Pre-change memory-first gate No memory-gate sub-skill
Health, token count, benchmark No memory-maintenance sub-skill
Periodic durable/dated consolidation, index tidy No memory-consolidate sub-skill
Agent needs deep context No exploring-knowledge-graph skill
Human at CLI No /memory-search command

See the exploring-knowledge-graph skill for the deep-context decision tree and the five-source strategy (Issue #2103 folded the former context-retrieval agent into it).


The router delegates every operation to a focused sub-skill. Load the one that matches your task; each carries a smaller context than the full memory surface.

Sub-Skill Operation Load When
memory-search Tier 1 semantic search (Serena + Forgetful) You need facts, patterns, or rules
memory-reflexion Tier 2 episode extraction You are recording a completed session
memory-gate Memory-First Gate (BLOCKING) and Chesterton's Fence protocol You are about to change an existing system
memory-maintenance Health check, token count, size validation, benchmark, density You are maintaining the memory stores
memory-consolidate Periodic durable/dated consolidation, overlap merge, index tidy You are doing a periodic memory cleanup pass

Triggers

Use this skill when the user says:

Read the full file on GitHub · 285 lines

Files

What ships with it

43 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. yesterday First seen · 285 lines · 99 tokens per session scan A a8d014a7ed2b

Subscribe to this mod's changes

memory is a skill published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed yesterday), licensed MIT. It adds 99 tokens to every session and 2,750 once invoked, about $0.0005 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-09-03.