agent-memory
Qué hace
Esta skill configura un sistema de memoria para un agente de IA, de modo que una lección se conserva solo cuando vuelve a surgir. Es para quien tiene un archivo de instrucciones del proyecto desordenado o un agente que vuelve a aprender la misma corrección.
Cuándo usarla
- ✓Cuando tu agente vuelve a aprender la misma corrección en cada sesión.
- ✓Cuando el archivo de instrucciones de tu proyecto se ha alargado demasiado y mezcla datos importantes con detalles menores.
- ✓Cuando necesitas rastrear de dónde viene una regla recordada.
Link de la skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-memory/skills/agent-memory/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Mi agente sigue olvidando que usamos pnpm. Configura un sistema de memoria que solo conserve las lecciones que aparecen una y otra vez.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Los datos pasan por cuatro niveles, desde notas brutas de sesión hasta el contexto del proyecto que siempre se carga. Un dato sube de nivel solo si se repite entre sesiones y días, y una persona confirma el último paso.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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 verified claim promotes on one observation and is the only day-exempt path.
- L2 → L3 — held in ≥ 2 distinct projects, aged ≥ 30 days, uncontested.
Two gates refuse rather than guess. A claim whose text was altered by redaction never promotes on evidence alone — the flag firing is evidence the source was sensitive, and a lexical filter finding one secret is not proof it found all of them. A claim with an open contradiction is frozen at L1 until a human resolves it; the incumbent is never silently overwritten.
Use it
# what is remembered, and what is blocking the next promotion
python3 scripts/memory_inspect.py --tier L1
# where did this line come from — sessions, days, transcript, quoted source
python3 scripts/memory_inspect.py --why "PR base branch is dev"
# every claim with an open contradiction, both directions of the join
python3 scripts/memory_inspect.py --contested
# dry-run the promotion pass; writes nothing
python3 scripts/memory_promote.py
Three hooks run the loop unattended: SessionStart injects L2 + L3,
UserPromptSubmit recalls relevant L1 atoms, SessionEnd captures and stages.
Each is disabled independently with AGENT_MEMORY_SESSIONSTART=0,
AGENT_MEMORY_USERPROMPTSUBMIT=0, AGENT_MEMORY_SESSIONEND=0. Every hook fails
open: a broken memory system costs you memory, never a session.
Hard rules
- Redact before writing. Every atom passes the filter before it reaches disk. Anything altered is quarantined from promotion.
- Propose, never apply. Promotions land in
.memory/staged/. Only an explicit/cs-memory adopttouches aCLAUDE.md, and it backs both up first. - Cite, don't invent. Every atom carries a back-pointer to the transcript
line that produced it.
--whyresolving to ambiguous prints nothing rather than guess: a wrong citation is worse than a missing one. - Never surface a contested claim as fact. It is still injected — hiding the conflict is worse — but always tagged.
- The committed tiers carry no paths. Promotion strips the back-pointer prefix, which embeds an OS username.
Forcing questions
Walk these one at a time before trusting the store.
- Which line in your
CLAUDE.mddid you last actually read before acting? - Would you rather the agent forget a true thing, or remember a false one?
- When two remembered rules disagree, who decides — and when?
- What would make you delete
.memory/entirely?
Rationale, open decisions, field schema: ../../DESIGN.md.
More in this skill
Load these only when the task needs them.
- references/hook_capture_discipline.md — Hook discipline — running on someone else's critical path
- references/promotion_gate_design.md — Designing the gates — why these thresholds, and what they cost
- references/tiered_memory_canon.md — Tiered agent memory — the canon,
Preguntas frecuentes
¿Usa una base de datos o llamadas a IA?
No. La skill usa solo scripts estándar, sin base de datos, embeddings, llamadas de red ni llamadas a IA.
¿Quién aprueba un dato antes de que entre en el archivo del proyecto?
Una persona confirma el último paso con una acción de adopción.
¿Por qué un dato debe repetirse?
La repetición muestra que una lección importa, así que las notas circunstanciales no saturan el contexto que siempre se carga.
Detalles
Descripción original del autor
Use when an agent keeps relearning the same correction, CLAUDE.md has grown unreadable, or you need to trace where a remembered rule came from. Promotes facts through four tiers only on recurrence across sessions and days, with memory_promote.py and a human adopt step.
Popularidad
- Estrellas en GitHub
- 29 mil
- Posición en el ranking
- #9525
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
agent-launcher-orchestrator
29 milAyuda a tu agente a planificar, crear, probar y programar un agente gestionado de Claude en tu propia cuenta, paso a paso, a partir de un objetivo claro.
grade-iterate
29 milPermite que tu agente evalúe el trabajo de un agente de IA gestionado según una rúbrica y lo mejore en un número fijo de rondas, para que nunca entre en un bucle infinito.
interview
29 milPermite que tu agente te entreviste sobre una idea de agente de IA y convierta tus respuestas en un plan de construcción sencillo antes de poner nada en marcha.
run-without-you
29 milAyuda a tu agente a configurar un agente gestionado de IA para que se ejecute según un calendario o cuando ocurra un evento, comprobando el horario cron antes del lanzamiento.
Skills parecidas
add-model-provider
394 milPermite que tu agente conecte un nuevo proveedor de modelos de IA a OpenClaw con comandos de configuración seguros, mantenga las claves API fuera del texto plano y haga una prueba en vivo.
acp-router
394 milAyuda a tu agente a enviar una tarea a un asistente de programación como Claude Code o Cursor a través de OpenClaw, para que el trabajo se ejecute en esa herramienta.
browser-automation
394 milEnseña a tu agente a controlar páginas web paso a paso, incluidos los inicios de sesión, las pestañas y la recuperación cuando una página deja de responder.