learn

A memory tool that records confirmed lessons from coding sessions in a searchable vault. It also keeps the vault's raw conversation index up to date.

In plain words
What is it for?
Use it after a review, failed check, correction, explicit save request, or completed piece of work that produced a reusable lesson.
Why use it?
It prevents important corrections, saved notes, and confirmed approaches from being lost between tasks. It limits saved lessons to things explicitly established during the session.

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/toejough/engram/learn
Any agent
npx skills add toejough/engram --skill learn
Clone the repo
git clone --depth 1 https://github.com/toejough/engram

Made for: Claude Code, Codex.

Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,158 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.00118 $0.04158
Opus 5 $0.00059 $0.02079
Sonnet 5 $0.00024 $0.00832
Haiku 4.5 $0.00012 $0.00416

Measured 2d ago against content hash 9075156a8f4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

learn 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 2d 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.

agent-instructions/skills/learn/SKILL.md · 268 lines

How it starts

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

Learn — Sweep Raw Memory, Crystallize Explicit Lessons

Two jobs, in order: (1) mechanically true up the chunk index so every conversation and doc is searchable memory, and (2) write a vault note for every explicit lesson this session — user corrections, explicit save-requests, presented conclusions that were later overturned, and confirmed approaches (user-praised or self-validated). Nothing else.

Raw event memory is AUTOMATIC. engram ingest chunks and embeds session transcripts and markdown itself — no summaries, no episode notes, no arc detection. The agent's only writing job is crystallizing EXPLICIT lessons. Do not reconstruct the old episode workflow (engram transcript, engram learn episode) — it is gone.

Mid-cycle capture (fast path). When you fire at a CORRECTION moment mid-task — a review, a failing check, or the user just rejected your approach or named a different convention — this is a focused single-note capture, NOT the open/close of a cycle. SKIP Step 1 (sweep) and Step 1.5 (vocab); go straight to Step 2 and crystallize the ONE confirmed correction (hand off to write-memory as always). Do NOT run engram ingest --auto mid-task — the sweep is a cycle-boundary job, it is wasteful here and can block on a large corpus, and losing the capture to a hung sweep is the failure mode. The closing learn still sweeps.

Step 1 — Sweep (first; the closing learn always sweeps)

engram ingest --auto

That's it. The binary stats every known source (repo markdown, .claude dirs, all session transcripts), re-chunks and re-embeds only what changed — within one source, existing chunks are never deleted (append-only history). Across sources, byte-identical content is deduplicated: only one canonical copy is indexed, and a duplicate's index is removed only once its retained twin is verified to cover its records (not on hash-match alone) — see engram prune --duplicates for the retroactive cleanup mode. Unchanged corpus → returns in seconds. Report the one-line tally it prints (or "memory index up to date").

Read the full file on GitHub · 268 lines

Files

What ships with it

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

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. 2d ago First seen · 268 lines · 118 tokens per session scan A 9075156a8f4c

Subscribe to this mod's changes

learn is a skill published in the GitHub repository toejough/engram (8 stars, last pushed 2d ago), licensed Apache-2.0. It adds 118 tokens to every session and 4,158 once invoked, about $0.0006 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

agent-builder

Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI system" (2) want to understand agent architecture, agentic patterns, or autonomous AI (3) need help with capabilities, subagents, planning, or skill mechanisms (4) ask about Claude Code…

shareAI-lab/learn-claude-code · 125 tokens

code-review

Perform thorough code reviews with security, performance, and maintainability analysis. Use when user asks to review code, check for bugs, or audit a codebase.

shareAI-lab/learn-claude-code · 35 tokens

copilotkit-self-update

Use when the user wants to update, refresh, or reinstall the CopilotKit agent SKILLS (the SKILL.md files that teach this agent about CopilotKit). NOT for updating the CopilotKit codebase or project — this is specifically about refreshing the skills/knowledge this agent has loaded. Triggers on "update copilotkit…

CopilotKit/CopilotKit · 144 tokens

docs-style

Style guidelines for writing and updating documentation. Use when writing new docs, updating existing docs, or reviewing docs for quality.

continuedev/continue · 27 tokens

high-end-visual-design

Teaches the AI to design like a high-end agency. Defines the exact fonts, spacing, shadows, card structures, and animations that make a website feel expensive. Blocks all the common defaults that make AI designs look cheap or generic.

Leonxlnx/taste-skill · 53 tokens

edu-math-tutorial

数学题分步讲解视频的领域知识。适用场景:(1) 用户给出一道数学题并要求做讲解/ 解题视频;(2) 用户说"讲解这道题"、"生成解题视频"、"make a math tutorial"; (3) 需要中文数学教学视频,涉及方程、公式或几何图形。本 skill 只提供领域 知识(题目拆解、讲解节奏、旁白文案规范、版式与 KaTeX 排版风格);画面、 配音与成片一律用 Creator 原生 Element 与工具从源头构建。.

agentscope-ai/QwenPaw · 146 tokens