engram

engram is a skill for Claude Code from 20alexl/claude-engram. It costs 41 tokens per session (2,256 once invoked), scanned A, original, MIT.

A persistent-memory system for Claude Engram that stores and retrieves useful context from coding sessions. It also tracks edits, errors, decisions, related files, and links between shared code modules.

In plain words
What is it for?
Use it to search project memories, recover session context, check proposed imports, see which files depend on a module, and identify recurring errors.
Why use it?
It reduces repeated investigation by bringing back relevant past fixes, decisions, file context, and warnings when similar work or errors appear again.

Skill for Claude Code

Written for Claude Code: SessionEnd hook event. Also seen: mentions subagents; mentions Claude Code.

Good fit Use it to search project memories, recover session context, check proposed imports, see which files depend on a module, and identify recurring errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/20alexl/claude-engram/engram
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 20alexl/claude-engram --skill engram
Clone the repo
git clone --depth 1 https://github.com/20alexl/claude-engram

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/20alexl/claude-engram/engram"><img src="https://agentmods.dev/badge/skills/20alexl/claude-engram/engram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,256 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Memory Poisoning · line 27
    Skill injects content designed to persist in agent memory or context across interactions. Persistent injection can alter agent behavior long after the initial interaction.
    Fix: Do not allow untrusted input to persist in agent memory or context. Validate all content before storing and implement memory isolation between sessions.
How audits are shown
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.00041 $0.02256
Opus 5 $0.00020 $0.01128
Sonnet 5 $0.00008 $0.00451
Haiku 4.5 $0.00004 $0.00226

Measured 10d ago against content hash 9c146c1c1bde, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

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

claude_engram/skill/engram/SKILL.md · 110 lines

How it starts

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

Claude Engram — Quick Reference

Automatic (hooks, zero invocation)

  • Edit/error/decision tracking, loop warnings, compaction survival
  • Session mining: background indexing after every session PLUS debounced live ticks at turn end — search/extractions/code-index stay fresh mid-session (CLAUDE_ENGRAM_LIVE_MINE, default 300s)
  • Embeddings: resident daemon on cpu (zero VRAM parked); bulk jobs (512+ texts) run in a transient GPU worker that exits after the job (CLAUDE_ENGRAM_DEVICE forces one device; status shows the daemon's device)
  • Smart session start: last session context + recurring patterns
  • Predictive context: related files + likely errors before edits
  • Pre-edit import/export check: proposed imports verified against the per-project code index (AST, LLM-free) — <engram-precheck> banner with closest-name suggestions
  • Blast-radius: editing a shared module lists its importers — <engram-blast-radius>
  • Read context: before Read of an indexed file, code-index orientation + that file's memories (<engram-read-context>, once per file per session)
  • Error deja-vu: a failure matching a known recurring error gets the past fix injected inline at failure time ("Deja vu: TypeError hit in 3 past session(s) - fix: ...")
  • Known-good test commands: session start lists the project's tracked test commands that currently pass
  • Mistake hygiene: stale machine-written one-off mistakes (3+ weeks, never recurred, away from current work) auto-archive in the background — restorable via memory(restore); failing TEST runs are never logged as mistakes (TDD-aware)
  • Lessons bridge (opt-in): dated entries in curated note files sync as protected lesson memories with code-index triggers — enable with lessons_globs in ~/.claude_engram/config.json
  • Session-start patterns are project-scoped: recurring errors/struggles filter to the sub-projects the last session touched; errors quiet 30 days drop out
  • Outcome feedback loop: tracks which injection kinds (memory/prediction/precheck/blast) precede passing tests AND feeds back a bounded (0.8-1.2x) memory-injection multiplier; see session_mine(reflect)
  • Tool duration tracking: slow tools surfaced in handoffs

Read the full file on GitHub · 110 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. 10d ago First seen · 110 lines · 41 tokens per session scan A 9c146c1c1bde

Subscribe to this mod's changes

engram is a skill published in the GitHub repository 20alexl/claude-engram (16 stars, last pushed 13d ago), licensed MIT. It adds 41 tokens to every session and 2,256 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-30.

Related

Other skills, from other repositories

memory-audit-pattern-extraction

A method for investigating repeated mistakes by comparing related memories and checking whether an earlier reminder failed. It looks at where the reminder was stored, when it was created, and whether it was strong enough to prevent the mistake.

Dataojitori/nocturne_memory · 48 tokens

coding-agents-hooks-authoring

To author, register, and test Rosetta hooks, add a SemanticKind, or debug a hook that won't fire.

griddynamics/rosetta · 31 tokens

memorix-sessions

Use when resuming work, preparing handoff context, binding an HTTP control-plane project, or deciding whether sessionstart is useful.

AVIDS2/memorix · 31 tokens

frontmcp-extensibility

Use when extending FrontMCP beyond the core SDK by integrating external npm packages, libraries, or third-party services into providers and tools. Covers VectoriaDB for in-memory semantic and vector search (ML-based embeddings or TF-IDF keyword engines, with persistence) and the tamper-evident, hash-chained skill…

agentfront/frontmcp · 124 tokens

cortex-consolidate

Run memory maintenance — decay old memories, compress stale content, consolidate episodic memories into semantic knowledge, and run sleep-like replay. Use when the user says 'clean up memories', 'consolidate', 'run maintenance', 'compress old memories', 'memory cleanup', or periodically to keep the memory system…

cdeust/Cortex · 84 tokens

cortex-profile

View and manage your cognitive profile — how you think, work patterns, blind spots, and cross-domain connections. Use when the user says 'show my profile', 'how do I work', 'what are my patterns', 'cognitive style', 'blind spots', 'methodology', or at the start of a session to load context. Also use 'rebuild profile'…

cdeust/Cortex · 98 tokens