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 skills add vbcherepanov/total-agent-memory --skill memory-protocolgit clone --depth 1 https://github.com/vbcherepanov/total-agent-memoryWrote 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/vbcherepanov/total-agent-memory/memory-protocol)<a href="https://agentmods.dev/skills/vbcherepanov/total-agent-memory/memory-protocol"><img src="https://agentmods.dev/badge/skills/vbcherepanov/total-agent-memory/memory-protocol/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/vbcherepanov/total-agent-memory/memory-protocol"><img src="https://agentmods.dev/badge/skills/vbcherepanov/total-agent-memory/memory-protocol.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00120 | $0.02653 |
| Opus 5.5 | $0.00048 | $0.01061 |
| Sonnet 5.5 | $0.00024 | $0.00531 |
| Haiku 4.5 | $0.00012 | $0.00265 |
Grade A, and why
memory-protocol 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 1mo 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 — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory Protocol — Universal Skill
You have access to a persistent cross-session memory via the total-agent-memory MCP server (60+ tools). Knowledge survives between sessions and is shared across agents working on the same project.
This skill is universal — the same MCP tools, the same triggers, the
same templates work in every supported environment (Claude Code, Codex,
Cursor, Cline, Continue, Aider, Windsurf, Gemini CLI, OpenCode). Hooks
and sub-agents are environment-specific and documented separately
(see references/hooks-explained.md and references/ide-setup.md).
The five non-negotiables
- Session start →
session_initfirst, thenmemory_recall. Always. Skip only if you have already calledsession_initin this session. - Before any non-trivial task →
memory_recall(query, project). Use the recipe instead of guessing the convention. - After every significant action →
memory_saveimmediately. Don't batch. A decision, a fix, a new convention — one save per fact, not one save per session. - On error / bash non-zero / stuck →
learn_error(orself_error_log) with root cause + fix. Pattern auto-consolidates after 3 occurrences. - End of session →
session_endwith summary + next_steps + pitfalls.
If you only remember one thing: session_init → memory_recall →
work → memory_save → session_end.
Trigger table — when to call what
| Event | Tool | Why |
|---|---|---|
| Session opens | session_init(project) |
Returns previous summary + next_steps + pitfalls and marks them consumed. Call first. |
| Any task starts | memory_recall(query, project) |
Recipe-first; never invent a convention twice. |
| Before edit/write to a file | file_context(path) |
Returns risk_score + warnings (past errors on this path, hot spots). |
| Before architecture choice | memory_recall + analogize(query, exclude_project) |
Cross-project analogy. |
| Bash returns non-zero (and reproducible) | learn_error(file, error, root_cause, fix, pattern) |
Auto-consolidates to a rule after N≥3. |
| Architectural decision made | save_decision(title, options, criteria_matrix, selected, rationale) |
Structured; auto-tagged structured; goes into recall with decisions_only=True filter. |
| Tech-stack/dependency/config change | kg_add_fact(subject, predicate, object) |
Temporal; auto-invalidates old facts. |
| Solution that other projects could reuse | memory_save(type='solution', tags=['reusable', '<tech>']) |
Surfaces in analogize() for sibling projects. |
| Reusable pattern / idiom | memory_save(type='convention') |
|
| Lesson learned (regression / postmortem) | memory_save(type='lesson') |
Higher recall weight on similar tasks. |
| Episode (story of how something was done) | memory_episode_save(narrative, outcome) |
Narrative form — "what was tried, what failed, what worked". |
| Error worth a one-time note | self_error_log(description, category, fix?) |
Cheaper than learn_error; no auto-rule. |
| User prompt that should be remembered | save_intent(prompt, project) |
Auto-captured by hook if installed. |
| Major task starting | workflow_predict(task_description) |
If confidence < 0.3 ask the user about approach. |
| Major task ending | workflow_track(workflow_id, outcome) |
Trains the predictor. |
| "What was the stack at date X?" | kg_at(timestamp) |
Time-travel query. |
| "Find similar in other projects" | analogize(text, exclude_project) |
Jaccard + Dempster-Shafer fusion. |
| Indexing an external repo | ingest_codebase(path, languages) |
AST tree-sitter, 9 languages. |
| Show recent saves chronologically | memory_timeline(limit) |
Replays session → session. |
| Build per-project digest | memory_wiki_generate(project) |
Markdown to <MEMORY_DIR>/wikis/<project>.md. |
| Session closes ("сохранись" / "save") | session_end(session_id, summary, next_steps, pitfalls) + dual-write to Obsidian if available |
Picked up by next session_init. |
What ships with it
10 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.
- references/hooks-explained.md 11 KB
- references/ide-setup.md 9.9 KB
- references/subagent-protocol.md 4.9 KB
- references/tool-cheatsheet.md 14 KB
- references/workflow-recipes.md 12 KB
- templates/claude-code-settings.json 1.5 KB
- templates/cline-rules.md 1.7 KB
- templates/codex-AGENTS-block.md 1.3 KB
- templates/codex-config.toml 783 B
- templates/cursor-rules.mdc 2.0 KB
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.
- 1mo ago First seen · 223 lines · 120 tokens per session scan A 3e1238a16d28
memory-protocol is a skill published in the GitHub repository vbcherepanov/total-agent-memory (73 stars, last pushed 5d ago), licensed MIT. It adds 120 tokens to every session and 2,653 once invoked, about $0.0005 per session on Opus 5.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-30.
Other skills, from other repositories
engram-digest
Seed or top up this project's Engram graph from the existing codebase — an explicit, user-invoked digestion of the current working tree into typed memory nodes (decisions, principles, cautions, problems, insights, intents). Use when the user says "digest this project", "ingest the codebase into memory", "seed the…
engram
Read and write the project's durable reasoning memory (decisions, principles, cautions, problems, insights) through the Engram MCP tools. Recall relevant memory before non-trivial work; capture only durable, high-value knowledge silently at natural stopping points; keep the graph honest (judge suspects, close answered…
session-recap
Document Claude Code sessions by extracting knowledge into cross-referenced documentation. Triggers on "recap the session", "summarize the work", or after significant code changes.
garden-tending
Tend the knowledge garden — diagnose vault health, condense project memos into project.md overviews, create/merge cross-project topics, fix broken links, archive superseded notes, extend trails. Trigger on "tend the garden", "condense", "update project overview", "check vault health", "where are we with X?", "what…
knowledge-bank-lookup
Delegates knowledge bank lookups to Explore subagents with reflections-first strategy that learns from past mistakes. Checks /reflections/ directory before documentation to extract documented failures to avoid and proven approaches to apply. Automatically triggers when user mentions services ([project-a], [project-b]…
kb-ingest
Ingest external sources into the knowledge bank through interactive study or quick filing. Two modes — Quick (summarize → file) and Study (theme-by-theme deep dive with online research and personal notes → multi-layer KB output → optional blog/slack synthesis). Triggers on "ingest this", "study this article", "add to…