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

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/hbarefoot/engram/engram-memory
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.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.svg" alt="Measured on agentmods" 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. 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 $0.00152 $0.01594
Opus 5 $0.00076 $0.00797
Sonnet 5 $0.00030 $0.00319
Haiku 4.5 $0.00015 $0.00159

Measured 4d ago against content hash 41f9e440719a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (7 stars, last pushed 1mo ago), licensed MIT. It adds 152 tokens to every session and 1,594 once invoked, about $0.0008 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

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

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

cognee-cli

Use when the user wants to drive cognee from the terminal with cognee-cli — remember/recall/forget/improve memory commands, managing datasets and config, or database migrations.

topoteretes/cognee · 42 tokens

hs-release

Cut a core Hindsight release (vX.Y.Z) and open the changelog + blog PR. Use when asked to cut/start a release, bump the version, or publish a new Hindsight version.

vectorize-io/hindsight · 45 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, configuring browser or database persistence, configuring MergeableStore…

tinyplex/tinybase · 76 tokens

memory-audit-pattern-extraction

模式提取与失效解药分析。当发现多条记忆在讲同一个教训,或发现自己在一而再再而三地犯同样的错误时使用。.

Dataojitori/nocturne_memory · 48 tokens