Persistent memory for AI coding assistants — Claude Code, OpenCode, and Codex.
AI coding tools don't remember anything across sessions. Every conversation starts cold. The design decision you explained yesterday? Gone. The tricky integration you debugged last week? Forgotten. The business rule that took three rounds to get right? Ask again.
This isn't just annoying — it's dangerous. When the AI doesn't know the implicit contracts, it writes code that looks correct but breaks things.
open-memory is a skill that every AI tool loads at session start. It maintains persistent memory for what code alone cannot tell you: design decisions, implicit contracts, incident root causes, business domain knowledge.
It works with Claude Code, OpenCode, and Codex — one skill, any tool.
.open-memory/ ← project-level, follows the codebase
~/.open-memory/ ← global, follows you across projects
Three files that follow you everywhere:
| File | For |
|---|---|
identity.md |
Who you are, what you know |
preference.md |
Tools, style you follow |
constraint.md |
Lines you cannot cross |
Per-project memory, loaded on demand:
| File | For |
|---|---|
decision.md |
Why A over B |
bugfix.md |
Root causes that must not repeat |
integration.md |
Change A, B breaks |
topology.md |
Where things run, what they talk to |
dataflow.md |
Who produces, who consumes |
domain.md |
What business words mean |
convention.md |
Rules that gate PRs |
debt.md |
Looks wrong, don't touch |
setup.md |
How to run, env quirks |
Custom tags: create .open-memory/<anything>.md when the above don't fit.
- At session start, the skill boots — reading global memories unconditionally and project memories selectively (by filename + content grep).
- Before touching a module, grep memory for relevant context.
- After important discoveries, write back: "If the next AI doesn't know this, will it write bad code?" If yes → write.
Copy skills/open-memory/ into your project's skills directory.
Ensure CLAUDE.md or AGENTS.md at project root contains:
STOP. Before anything else, invoke the open-memory skill.
MIT