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.
npx agentmods add skills/rjmurillo/ai-agents/memorynpx skills add rjmurillo/ai-agents --skill memorygit clone --depth 1 https://github.com/rjmurillo/ai-agentsWrote 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.
[](https://agentmods.dev/skills/rjmurillo/ai-agents/memory)<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>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.
| Model | Per session | Once 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 |
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.
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.
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).
Related Sub-Skills
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:
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.
- __init__.py 24 B runs code
- CLAUDE.md 170 B
- conftest.py 231 B runs code
- memory_core/__init__.py 1.5 KB runs code
- memory_core/memory_router.py 17 KB runs code
- memory_core/reflexion_memory.py 12 KB runs code
- memory_core/schema_validation.py 11 KB runs code
- memory_core/url_validation.py 1.3 KB runs code
- references/codebase-knowledge-graph.md 2.5 KB
- references/tier-selection-guide.md 3.0 KB
- references/zettelkasten-memory-agents.md 3.3 KB
- resources/schemas/episode.schema.json 4.6 KB
- scripts/__init__.py 26 B runs code
- scripts/convert_index_table_links.py 7.5 KB runs code
- scripts/convert_memory_references.py 6.5 KB runs code
- scripts/count_memory_tokens.py 7.2 KB runs code
- scripts/extract_session_episode.py 110 KB runs code
- scripts/improve_memory_graph_density.py 9.6 KB runs code
- scripts/invoke_memory_cross_reference.py 5.8 KB runs code
- scripts/measure_memory_performance.py 15 KB runs code
- scripts/migrate_causal_version.py 9.4 KB runs code
- scripts/README-count-tokens.md 2.8 KB
- scripts/README-test-size.md 5.3 KB
- scripts/repair_episode_causal_links.py 8.6 KB runs code
- scripts/search_memory.py 15 KB runs code
- scripts/test_memory_health.py 8.5 KB runs code
- scripts/test_memory_size.py 12 KB runs code
- spec/skill-specification.xml 9.9 KB
- tests/__init__.py 24 B runs code
- tests/conftest.py 546 B runs code
- tests/test_convert_index_table_links.py 6.1 KB runs code
- tests/test_convert_memory_references.py 5.2 KB runs code
- tests/test_extract_session_episode.py 41 KB runs code
- tests/test_improve_memory_graph_density.py 6.7 KB runs code
- tests/test_invoke_memory_cross_reference.py 4.4 KB runs code
- tests/test_measure_memory_performance.py 6.1 KB runs code
- tests/test_memory_health.py 6.9 KB runs code
- tests/test_memory_router.py 14 KB runs code
- tests/test_memory_size.py 1.8 KB runs code
- tests/test_reference_docs_resolve.py 8.5 KB runs code
- tests/test_reflexion_memory.py 8.4 KB runs code
- tests/test_schema_validation.py 16 KB runs code
- tests/test_search_memory.py 14 KB runs code
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.
- yesterday First seen · 285 lines · 99 tokens per session scan A a8d014a7ed2b
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.
Other skills, from other repositories
deep-context
Build deep codebase understanding using Capsule context, progressive-reader, and specialist agents instead of overwhelming main context. Triggers on: don't have context, understand codebase, learn about, need background. Implements progressive context building.
agent-memory-coordinator
Agent skill for memory-coordinator - invoke with $agent-memory-coordinator.
agent-memory-mcp
A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).
agent-memory
../../../engineering/agent-memory/skills/agent-memory/SKILL.md.
memory-management
Guide the agent to recall, remember, and route durable learning into Memory, Skills, Scheduled Tasks, or Tape.
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…