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/rashadansari/myagents/agent-memorynpx skills add RashadAnsari/myagents --skill agent-memorygit clone --depth 1 https://github.com/RashadAnsari/myagentsWrote 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/rashadansari/myagents/agent-memory)<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>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.1 | $0.00031 | $0.02956 |
| Opus 5 | $0.00015 | $0.01478 |
| Sonnet 5 | $0.00006 | $0.00591 |
| Haiku 4.5 | $0.00003 | $0.00296 |
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.
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 |
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.
- 6d ago First seen · 252 lines · 31 tokens per session scan A ce6e337d3bbf
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.
Other skills, from other repositories
honey-memory
Per-project persistent memory files indexed in MEMORY.md.
honey-compress
Rewrite context files terse to cut per-session 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…
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…
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…
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'.