Skill memory for coding agents: learn, recall, reinforce, decay. Local SQLite, no API key.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
Self-improving skills for Claude Code and Codex β your agents learn, recall, reinforce, and forget.

Strength has to be earned β saying a skill helped is not evidence, a passing test is:
Generated from a real run: scripts/demo.sh --record | python3 scripts/cast_to_svg.py > docs/demo-evidence.svg.
skillmem gives Claude Code and the Codex CLI a local, persistent skill & memory layer. After every non-trivial task the agent can record how it was done as a skill; before the next task it recalls the relevant ones; skills that keep proving useful get stronger, and skills nobody uses fade away β the way human memory works.
semantic extra if you work across both. All on CPU, offline.owner / agent / imported / derived), and only the owner approves one as a rule (skillmem trust <slug>). Anything unapproved β an imported pack, a summary of a transcript that quoted a web page, a rule an agent was talked into saving β is injected inside a marked block that says it is data, not instructions. An agent cannot change a memory the owner wrote or approved: it writes a proposal under a new slug.skillmem verify detects any after-the-fact tampering.export-all dumps everything to plain markdown with YAML frontmatter; re-importing the dump yields the same records. One destination per database: the exporter prunes its own stale files via a manifest, and refuses a directory another database exports to rather than overwrite its backup.Agents repeat their mistakes because each session starts from zero. Existing "memory" tools store facts; skillmem stores procedures β trigger, steps, outcome, lessons β and ranks them by how often they actually helped. The write path costs nothing, so the agent can afford to learn from every task.
Memory that an agent writes is not the same thing as a rule you set, and until 0.10.0 this
project treated them the same. An external text β a README, a web page β reaches a transcript,
a model distils it into a note, and the note comes back in the next session under a heading
that reads like your own rules. A document could also talk an agent into saving a rule through
mem_learn, and that rule looked exactly like one you wrote.
Now provenance is a field, trust is an act, and the summariser that reads your transcripts runs
with no tools at all (--tools "" plus --strict-mcp-config; a CLI that does not understand
those flags gets no recap rather than an uncaged one). The full list β including the migration
and what it does and does not approve on upgrade β is in the CHANGELOG.
The seven releases before it, in one line each, because they were all about the same hook:
0.9.3 stopped the Stop hook recursing into itself (one machine spawned 4083 summary sessions in
a day); 0.9.4 put a rate limit on it and stopped a failing model buying a call per turn; 0.9.5
fixed four silent defects, including recall being dead for notebook edits; 0.9.6 stopped a slow
summary overwriting a fresher one; 0.9.7 added skillmem recap and skillmem hooks-status;
0.9.8 stopped a skipped turn reading a 59 MB transcript first; 0.9.9 made publishing a summary
compare-and-swap. Anyone on 0.9.0β0.9.2 should upgrade β those versions contain the
recursion.
The memory products in this space β Mem0, Zep, Letta, LangMem, Cognee β are built mostly for conversational and user memory, entity graphs, or agent-managed context, and most of them offer a hosted tier. skillmem is narrower on purpose and different on four axes:
| skillmem | |
|---|---|
| What it stores | procedures β trigger, steps, outcome, lessons β not facts about a user |
| What it forgets | actively: unused skills decay on an Ebbinghaus schedule and are archived; rare-but-critical rules are pinned out of it |
| Where strength comes from | outside evidence only β a passing test, an accepted diff, your confirmation. An agent saying "that helped" moves recency, never strength, so it cannot promote its own mistake. reinforce is not idempotent: a retried confirmation counts again (evidence ids are a later release) |
| Who is trusted | you. Provenance is recorded, approval is yours to give, and unapproved memory arrives framed as data |
| Where it runs | your disk. SQLite + FTS5 + a local ONNX embedding model. No API key, no cloud, no Docker, no graph database |
| How it reaches the agent | hooks on five events (SessionStart, UserPromptSubmit, PreToolUse, Stop, SessionEnd) β recall happens whether or not the agent thinks to ask, plus 9 MCP tools when it does |
Retrieval quality is measured, not asserted: hit@5 0.871 / MRR 0.622 on the full LongMemEval oracle set, hybrid retrieval, k=5, CPU only, reproducible from this repo β see Benchmarks for the per-type table and the reporting rules we hold ourselves to.
macOS / Linux:
Windows (PowerShell):
Or from a checkout:
Flags combine in one run β the agents then share one database.
| Flag | Agent | Config it writes |
|---|---|---|
--claude-code | Claude Code | ~/.claude.json + hooks in ~/.claude/settings.json |
--codex | Codex CLI | ~/.codex/config.toml |
--cursor | Cursor | ~/.cursor/mcp.json |
--windsurf | Windsurf | ~/.codeium/windsurf/mcp_config.json |
--gemini | Gemini CLI | ~/.gemini/settings.json |
--opencode | opencode | ~/.config/opencode/opencode.json |
Every entry is idempotent and backed up before it is touched; a config that
does not parse is left alone rather than overwritten. Each agent is stamped
with SKILLMEM_AGENT, so in a shared database "who learned this" stays
answerable. skillmem uninstall removes all of them (--no-editors to keep
the editor entries).
init --claude-code registers the MCP server in ~/.claude.json and the hooks in ~/.claude/settings.json (idempotent, with backups). Use --hooks minimal for no hooks at all (only the deny rules for the owner-only commands, below), or --hooks none for MCP only. Hand-written memory files are imported with skillmem migrate --source <dir>; there is no per-turn import hook.
Appends an [mcp_servers.skillmem] table to ~/.codex/config.toml and marks the entry with
SKILLMEM_AGENT=codex. The tag is belt-and-braces: with no tag set, the server takes the
author's name from the agent's own MCP handshake, so attribution is right in a shared
database whichever way skillmem was installed.
The file is appended to, never rewritten: your own settings and comments stay where you put
them, the result is parsed before it is written, and invalid TOML is refused rather than
overwritten. skillmem uninstall removes the table again and leaves the rest of the file intact.
Codex reads AGENTS.md for project rules; if you keep yours in CLAUDE.md, point Codex at it
with project_doc_fallback_filenames = ["CLAUDE.md"] in the same config file β then both agents
follow one set of rules and one memory.
The repo is also a plugin, in two flavours, both pointing at the same skillmem-mcp binary:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/skillmem)<a href="https://allmcps.com/mcp/skillmem"><img src="https://allmcps.com/api/badge/skillmem?style=directory" alt="Skillmem on AllMCPs" /></a>