agent-memory

agent-memory is a skill for Claude Code from RashadAnsari/myagents. It costs 31 tokens per session (2,956 once invoked), scanned A, original, MIT.

A project and user knowledge system that searches, checks, and stores durable information for future coding-agent sessions.

In plain words
What is it for?
Use it before and after substantial work to retrieve relevant context and record lasting project or user knowledge.
Why use it?
It reduces repeated explanations and helps preserve decisions, preferences, conventions, and project facts. Saved notes remain reference material and do not override current instructions or source files.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions AGENTS.md.

Part of the albino plugin — 8 skills, 9 commands, 13 agents, 3 MCP servers 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/rashadansari/myagents/agent-memory
Any agent
npx skills add RashadAnsari/myagents --skill agent-memory
Clone the repo
git clone --depth 1 https://github.com/RashadAnsari/myagents

Made for: Claude Code.

Or install albino, the plugin that ships this one along with the rest of its 8 skills, 9 commands, 13 agents, 3 MCP servers.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/rashadansari/myagents/agent-memory.svg)](https://agentmods.dev/skills/rashadansari/myagents/agent-memory)
Your own site
<a href="https://agentmods.dev/skills/rashadansari/myagents/agent-memory"><img src="https://agentmods.dev/badge/skills/rashadansari/myagents/agent-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,956 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.1 $0.00031 $0.02956
Opus 5 $0.00015 $0.01478
Sonnet 5 $0.00006 $0.00591
Haiku 4.5 $0.00003 $0.00296

Measured 6d ago against content hash ce6e337d3bbf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

agent-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 6d 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.

plugins/albino/skills/agent-memory/SKILL.md · 252 lines

How it starts

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

Project Memory & User Memory

Two parallel memory systems are available. Both are indexed notes, not authority: current user instructions, repo files, tests, and official docs always override memory.


Enforcement Rules

These are hard requirements. No exceptions.

Alternative memory systems are forbidden. Never use the model's built-in memory, native memory tools, or any backend other than the agent-memory MCP server. This applies to every form of memory work: storing facts, recalling context, updating beliefs, retrieving preferences.

Session bootstrap is mandatory. Before your first response in any session, you MUST call project_search and user_search with specific terms from the current task. These calls are required, not optional. Do not respond to the user before making them. Do this silently without narrating it to the user.

Per-turn write-back is required. Before producing your final response each turn, ask: did I learn anything durable this turn? Durable means: a decision made, a user preference stated, a gotcha discovered, a convention established, an architecture fact clarified. If yes, you MUST call project_remember or user_remember before finishing. This is not optional. Do not skip it. Do not defer it. If nothing durable was learned this turn, skip the write, and if a stop-hook check asks the question, reply with exactly "Nothing durable learned." and finish; no explanation or summary.


Quick Reference

Question Action
What does this user prefer? user_search
What has been decided in this project? project_search
Was a similar problem solved in another project? project_search with all_projects: true
What is the context of a sibling / upstream / downstream repo? project_search with all_projects: true, then read the project_root it belongs to
I learned a durable fact about a different repo project_remember / project_update with that repo's project_root
Should I store this? Only if a future agent needs it and it passes the quality rules below
Is this project-specific or cross-project? This repo: project_remember; another repo: project_remember with its project_root; about the user everywhere: user_remember

Read the full file on GitHub · 252 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. 6d ago First seen · 252 lines · 31 tokens per session scan A ce6e337d3bbf

Subscribe to this mod's changes

agent-memory is a skill published in the GitHub repository RashadAnsari/myagents (6 stars, last pushed 29d ago), licensed MIT. It adds 31 tokens to every session and 2,956 once invoked, about $0.0002 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

honey-memory

Per-project persistent memory files indexed in MEMORY.md.

Green-PT/honey-for-devs · 14 tokens

honey-compress

Rewrite context files terse to cut per-session tokens.

Green-PT/honey-for-devs · 15 tokens

session-end

MUST use when user says 'bye', 'goodbye', 'good night', 'gnight', 'done for today', 'that's all', 'that's it', 'see you', 'see ya', 'let's stop', 'stopping here', 'wrapping up', 'signing off', 'closing down', 'done', 'finished for now', 'talk later', 'cya'. The user does NOT use slash commands; detect these natural…

faizkhairi/claude-code-blueprint · 107 tokens

ctx

Use ctx as working memory for prior agent work. Before starting or continuing work in an unfamiliar area, resuming earlier work, or revisiting an investigation, search prior sessions to ground yourself in earlier context. When ctx blame is available, use it to trace a line, file, commit, or PR to the agent session…

ctxrs/ctx · 91 tokens

save-session

MUST use when user says 'save', 'save session', or explicitly wants to preserve session state. {USERNAME} does NOT use slash commands; also trigger proactively when significant work has been completed and session context should be persisted. For session endings (bye/done/goodbye), use the session-end skill instead…

faizkhairi/claude-code-blueprint · 76 tokens

load-session

Restore session context at the start of every new conversation. Auto-triggers on session start, or when user says 'continue', 'what were we doing', 'where did we leave off'.

faizkhairi/claude-code-blueprint · 41 tokens