agent-memory

Featured

Use when a project's CLAUDE.md has grown past what anyone reads and you want the agent to learn durable facts from its own sessions instead — or when asking why the agent keeps re-learning the same correction, why a remembered rule is wrong, or where a memory line came from. Implements a four-tier store (L0 transcripts / L1 candidates / L2 project context / L3 stable persona) where promotion is earned by recurrence across sessions and days, never by one confident statement, and nothing reaches a committed file without a human adopting it.

AI & Automation 30,275 stars 4191 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Agent Memory — promotion is earned, not asserted > **Portability:** stdlib only. No database, no embeddings, no network, no LLM calls. ## The problem A project's `CLAUDE.md` is a memory system with one tier and no eviction: every durable fact and every passing preference land in the same always-loaded file, until the important lines are diluted by the incidental ones. Facts learned mid-session vanish at teardown unless someone writes them down. **The fix is not more storage — it is a promotion ladder.** A claim earns its way toward always-loaded context by recurring; a human confirms the last step. ## The four tiers Tiers are distinguished by **injection policy**, not storage format. | Tier | Holds | Injected | Committed | |---|---|---|---| | **L0** | raw session transcripts | never | no (already on disk) | | **L1** | candidate atoms | on relevance, at prompt time | no (gitignored) | | **L2** | this project's context | every session start | yes, after adopt | | **L3** | stable cross-project persona | always | yes, after adopt | ## The gates Nothing moves up because it sounded important. It moves up because it recurred. - **L0 → L1** — an explicit marker fires (a directive, a correction, a stated preference, a named lesson, a reproducible failure). Rule-based, high precision, deliberately low recall. - **L1 → L2** — ≥ 3 distinct sessions spanning ≥ 2 distinct calendar days. A claim stated outright needs 2 sessions; the distinct-day rule still applies. A ver...

Details

Author
alirezarezvani
Repository
alirezarezvani/claude-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

memory-architecture

Keeps coding-agent memory cheap and true, so Claude stops forgetting between sessions, re-reading bloated CLAUDE.md files, redoing research and acting on stale notes. Knows which files actually load and when (CLAUDE.md at every level, AGENTS.md, .claude/rules, MEMORY.md), where each fact belongs, and the gates that stop it rotting. Ships a self-testing audit script and a 0-10 score. Use it for any question about those files, even a narrow one, before answering from memory or searching by hand. That includes which CLAUDE.md files load in a folder, whether the paths an AGENTS.md or CLAUDE.md mentions still exist, why an agent ignored or broke a rule it was given, how to make Claude Code, Cursor and Codex follow the same rules, how to set up, audit, slim down or clean up agent memory, where a rule or fact should live, and why an agent keeps forgetting, redoing work or burning tokens. Also use it before saving a memory or writing an agent-facing doc, even if nobody says "memory".

1 Updated 1 months ago
nicuk
AI & Automation Listed

agent-memory

Keep a long-running agent's memory useful and small. Use when setting up memory for an agent or project, when asked to remember something for future sessions, when memory/live.md is getting long, or when asked to recall a past decision.

0 Updated 2 days ago
farqhar
AI & Automation Listed

claude-memory-kit

Persistent memory for Claude Code agents with an agent-audit-ritual architecture. User only talks; the agent captures, audits, proposes promotions, and writes. Memory lives in layers — a hot cache (MEMORY.md) held under three size caps, per-session handoffs (context/handoffs/), topical knowledge articles (knowledge/concepts/), and canonical rules (.claude/rules/) — plus multi-project isolation via projects/<name>/ and an experiments/ sandbox. /close-session runs the end-of-session audit ritual. Zero external dependencies.

33 Updated 1 weeks ago
awrshift