engram-memory

engram-memory is a skill for Claude Code, Codex from HBarefoot/engram. It costs 152 tokens per session (1,594 once invoked), scanned A, original, MIT.

A persistent memory system for coding-agent sessions. It stores and retrieves useful project or user information so later sessions can continue with earlier context.

In plain words
What is it for?
Use it to recall relevant project history at the start of work, save durable discoveries or preferences, and record what was completed or blocked.
Why use it?
It reduces repeated explanations and helps preserve decisions, outcomes, and known problems across sessions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to recall relevant project history at the start of work, save durable discoveries or preferences, and record what was completed or blocked.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hbarefoot/engram/engram-memory
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.

Any agent
npx skills add HBarefoot/engram --skill engram-memory
Clone the repo
git clone --depth 1 https://github.com/HBarefoot/engram

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/hbarefoot/engram/engram-memory/github.svg)](https://agentmods.dev/skills/hbarefoot/engram/engram-memory)
Your own site
<a href="https://agentmods.dev/skills/hbarefoot/engram/engram-memory"><img src="https://agentmods.dev/badge/skills/hbarefoot/engram/engram-memory/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.

agentmods 80×15 button for engram-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/hbarefoot/engram/engram-memory"><img src="https://agentmods.dev/badge/skills/hbarefoot/engram/engram-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 152 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00152 $0.01594
Opus 5.5 $0.00061 $0.00638
Sonnet 5.5 $0.00030 $0.00319
Haiku 4.5 $0.00015 $0.00159

Measured 1mo ago against content hash 41f9e440719a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

engram-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 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.

skills/engram-memory/SKILL.md · 88 lines

How it starts

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

Engram Memory

Engram gives you memory that survives the end of this conversation. Treat it like a colleague's notebook: read it before you start, write in it when you learn something the next session will need. A session that starts with recall feels like continuity; a session that ends with a write-back makes the next one smarter.

The rhythm

Session start — recall before acting:

engram_recall { query: "<the project or topic you're about to work on>", limit: 5 }

Scope with namespace when you know the project (see Namespaces). If you're about to do substantial work in a known context, prefer engram_context — it returns a pre-formatted block of the most relevant memories in one call:

engram_context { query: "<topic>", namespace: "<project>", max_tokens: 500 }

During the session — write when durable knowledge appears (see "What deserves a memory").

Session end — after completing significant work, store the outcome: what shipped, what broke, what was decided and why. This is the single highest-value write; it's what makes the next session start from "here's where we left off" instead of zero.

What deserves a memory

Store it when a future session would act differently for knowing it:

  • The user tells you to — "remember", "don't forget", "for future reference". Always store, confidence 1.0.
  • Decisions with their why — "we chose X over Y because Z". The rationale is the valuable part; a decision without its why gets relitigated.
  • Corrections — the user corrects a wrong assumption you made. These are gold: they prevent the same mistake in every future session.
  • Preferences — how the user likes to work, tools they favor, styles they reject.
  • Setup and infrastructure facts — versions, hosts, ports, conventions, account structures, "the staging DB is the one named prod2" landmines.
  • Outcomes — what a completed piece of work produced, including failures and dead ends ("tried X, doesn't work because Y" saves the next session from repeating it).

Read the full file on GitHub · 88 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. 1mo ago First seen · 88 lines · 152 tokens per session scan A 41f9e440719a

Subscribe to this mod's changes

engram-memory is a skill published in the GitHub repository HBarefoot/engram (9 stars, last pushed 3mo ago), licensed MIT. It adds 152 tokens to every session and 1,594 once invoked, about $0.0006 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-31.

Related

Other skills, from other repositories

crystalline-capture

Use when durable knowledge is learned while working, when the user asks to update a Crystalline domain, or before writing or editing an engram so it is deduplicated, well-formed and linked correctly.

jordiboehme/crystalline · 47 tokens

crystalline-intelligence

Use when the crystalline MCP tools are available and the task involves recalling, storing or sharing knowledge - searching domains, capturing engrams or sharing with a team.

jordiboehme/crystalline · 36 tokens

weekly-digests

Generate a serial week-by-week narrative digest of a project's full claude-mem timeline. Splits the timeline into per-ISO-week files, then runs one consecutive subagent per week — each receiving the prior week's carry-forward block — to produce one chapter per ISO week of data. Use when asked for "weekly digests"…

thedotmack/claude-mem · 93 tokens

cloud-sync

Set up or check claude-mem cloud sync with cmem.ai Pro. Use when the user says "set up cloud sync", "sync my memories", "cmem pro", "cloud backup", "sync status", or wants their memory database backed up or synced to their cmem.ai account.

thedotmack/claude-mem · 64 tokens

memory-retain

Save what was learned to Hindsight long-term memory. Use when a task finishes, when the user states a fact, decision or preference, and when you discover something a later run or another Bot would need.

vectorize-io/hindsight · 46 tokens

build-with-tinybase

Scaffold, extend, and verify reactive local-first JavaScript or TypeScript applications with TinyBase. Use when choosing TinyBase for in-memory tabular or key-value state, generating an app with create-tinybase, adding schemas or UI bindings, resolving TinyBase import paths, configuring browser or database…

tinyplex/tinybase · 90 tokens