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/xchucx/agent-memory/agent-memorynpx skills add xChuCx/agent-memory --skill agent-memorygit clone --depth 1 https://github.com/xChuCx/agent-memoryWhat 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.00085 | $0.02387 |
| Opus 5 | $0.00043 | $0.01193 |
| Sonnet 5 | $0.00017 | $0.00477 |
| Haiku 4.5 | $0.00009 | $0.00239 |
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 2d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- agent-memory — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
agent-memory
agent-memory is a local context middleware that maintains a structured,
byte-preserving Markdown memory layer for this repository. Your runtime
exposes three MCP tools backed by it:
memory.fetch_context— read; returns a budgeted Markdown pack drawn from current task state, conventions, decisions, modules, and (on query) the most relevant indexed sections.memory.propose_update— write; submits structured operations that the server validates, secret-scans, and either applies immediately or stages for human review.memory.status— health; reports file counts, pending staged proposals (with drift status), and security/git/lock posture. Call it when you want to know whether memory needs maintenance before proposing more updates.
At session start: always fetch_context with empty query
{ "name": "memory.fetch_context", "arguments": {} }
The empty-query (“bootstrap”) pack contains:
local/current.<branch>.md— your last working notes on this branch.local/current.shared.md— cross-branch shared state.conventions.md— project conventions.index.md— summary of the memory layout.
Read it carefully before reading source files. It tells you what the team already decided, what footguns are documented, and where you left off.
When else to fetch_context
| Trigger | Call |
|---|---|
| Topic shift mid-task (auth → billing) | fetch_context with a query naming the new topic |
| About to make an architectural decision | fetch_context with a query naming the area |
| Refactoring an unfamiliar module | fetch_context with scope: ["<module-path>"] |
Do not call fetch_context on every tool call. Once at session start
plus query-driven refreshes is the right cadence.
When to propose_update
Pick the intent that matches the situation. Each intent maps to a specific category of memory file and an approval policy.
| Situation | intent |
Routes to |
|---|---|---|
| Working notes on this task, branch-scoped | update_current |
apply |
| Working notes that follow you across branches | update_shared |
apply |
| End-of-task log of what you did | session_log |
apply (path auto-rewritten to sessions/<UTC today>.md) |
| Hit a footgun future-you should avoid | add_pitfall |
apply (when append_to_section) / stage (when rewriting) |
| Made a durable architectural decision | record_decision |
stage |
| Updated facts about a module | refresh_module |
stage |
| Discovered a team convention | update_conventions |
stage |
| An older entry is no longer accurate | archive_stale |
stage |
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.
- 2d ago First seen · 226 lines · 85 tokens per session scan A 72356cb4fb98
agent-memory is a skill published in the GitHub repository xChuCx/agent-memory (9 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 85 tokens to every session and 2,387 once invoked, about $0.0004 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
pp-learn-loop-example
Printing Press CLI for Learn Loop Example. Golden fixture exercising the spec-declared self-learning loop.
printing-press-retro
Use when the user asks to retro, run a retrospective, file findings, or improve the Printing Press after a printed-CLI run. Trigger phrases: "retro", "retrospective", "what went wrong", "improve the press", "post-mortem", "lessons learned", "what can we improve", "file a retro", "submit findings". Do not use for…
openmaic-classroom
将 RAG 检索结果、文档块或知识图谱概念转换为 OpenMAIC 互动课程。当用户要求将知识库内容、检索到的文档片段、上传的文档、或知识图谱中的概念批量转换为教学课件/互动课堂时使用此技能。支持纯需求生成、基于 PDF 内容的课程生成、和基于概念图遍历的批量课堂生成。.
draft-docs
Generate first-draft technical documentation from code analysis.
ensure-docs
Verify documentation coverage and generate missing docs interactively.
simple-go-api
Teach, explain, review, or extend the vc-gin-api Gin project while preserving its small Router-to-Handler-to-Service-to-DAO flow. Use when a learner asks how a request works, wants to add a field or endpoint, needs a guided Go backend exercise, or asks Codex to check this repository for overengineering. Do not use to…