engram-sleep

engram-sleep is a skill for Claude Code from techtheist/engram. It costs 114 tokens per session (3,498 once invoked), scanned A, original, MIT.

A maintenance operation for an Engram knowledge graph, which stores connected notes and their relationships. It groups related notes, keeps a current note for each subject, records replacements, and identifies unresolved conflicts or disconnected notes.

In plain words
What is it for?
Use it after accumulating notes to merge restatements, settle or flag conflicts, link disconnected notes, and mark reviewed material.
Why use it?
It reduces repeated or competing notes that make search and agent context harder to use. It also brings isolated information back into the graph for review.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions Claude Code.

Part of the engram plugin — 3 skills, 4 commands, 1 MCP server shipped together

Good fit Use it after accumulating notes to merge restatements, settle or flag conflicts, link disconnected notes, and mark reviewed material.

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

Made for: Claude Code.

Or install engram, the plugin that ships this one along with the rest of its 3 skills, 4 commands, 1 MCP server.

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-sleep

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/techtheist/engram/engram-sleep"><img src="https://agentmods.dev/badge/skills/techtheist/engram/engram-sleep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,498 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.00114 $0.03498
Opus 5.5 $0.00046 $0.01399
Sonnet 5.5 $0.00023 $0.00700
Haiku 4.5 $0.00011 $0.00350

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

Security

Grade A, and why

engram-sleep 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 13d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

claude-plugin/skills/engram-sleep/SKILL.md · 153 lines

How it starts

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

Engram sleep — consolidate after the fact

A graph that is used grows piles: the same subject restated across versions, an investigation captured as twenty findings, a decision and three paraphrases of it, a release note per version. Every pile costs twice. Search delivers several near-identical notes where one would do, and the current answer competes with its own history for the agent's attention. And nobody can review thousands of notes by hand. Sleep is the cure, applied after the fact: read one subject, write down where it stands now, keep one clear note per claim, record what replaced what, and leave the rest alone. Two smaller queues ride along: conflicts nobody settled, and islands — notes no edge and no tag reaches, which only a lucky text search ever finds.

The daemon nominates; you judge. Engram measures closeness from the stored vectors (no model call):

  • The band is the cosine this graph calls close: its own top 1% of note pairs. It means "closer than almost everything else here", not a fixed number.
  • A subject is a group of notes joined by chains of close pairs: at least 2% of the graph's notes (never fewer than 5), at most four times that. When subjects touch and chain into a larger blob, Engram re-cuts it at a stricter cosine until the pieces fit; cohesion is the cosine a subject holds together at.
  • Each subject has a name: two or three terms most of its notes share and the rest of the graph rarely uses (picked without a model; check it against the titles).
  • The queue is ranked by worth: size × (1 + ln of the versions it spans) × how settled it is (members from past versions, older than two weeks). History spread over many releases comes first; a pile of this cycle's notes is live work and ranks low.

When to run

  • The user asks: "sleep", "consolidate memory", "tidy the graph", "dedupe", /engram-sleep [subject] (/engram:sleep in the plugin).
  • Suggest it in one line, run it on a yes: the user complains about reviewing or too many, duplicate or noisy memories; or search keeps returning restatements of one subject and you can't tell which is current (offer /engram-sleep <that subject>).
  • Never on your own, and never in the middle of other work.

Read the full file on GitHub · 153 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. 13d ago Changed · +2 lines 9d2e98cda00c
  2. 29d ago First seen · 151 lines · 114 tokens per session scan A 1c62204f1320

Subscribe to this mod's changes

engram-sleep is a skill published in the GitHub repository techtheist/engram (37 stars, last pushed 13d ago), licensed MIT. It adds 114 tokens to every session and 3,498 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-11-01.

Related

engram-sleep compared with skills from other repositories

engram-sleep next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
engram-sleeptechtheist/engramSkill3713d agoMITA114Claude Code
memory-protocolvbcherepanov/total-agent-memorySkill782d agoMITA120Claude Code
memoryvbcherepanov/total-agent-memorySkill782d agoMITA65Claude Code, Codex
session-recapsxhmilyoyo/sundayhao-pluginsSkill87d agoApache-2.0A39Claude Code
garden-tendinglinxule/memex-pluginSkill76d agoMITA131Claude Code
knowledge-bank-lookupsxhmilyoyo/sundayhao-pluginsSkill87d agoApache-2.0A94Claude Code
curator-practicelinxule/memex-pluginSkill76d agoMITA153Claude Code