skillmem
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**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.
- **$0 per write and per read** — no LLM calls, no cloud, no API keys. Plain SQLite on your disk.
- **Bilingual hybrid search, fully local** — FTS5 BM25 + Snowball stemming (EN/RU) matches inflected forms within a language; the multilingual ONNX embedder is what lets a Russian query find an English skill, so install the semantic extra if you work across both. All on CPU, offline.
- **Ebbinghaus strength model, earned not claimed** — strength rises only on evidence from outside the agent's own judgement, falls after a failure, and fades on a schedule when unused; dead skills are swept to a backed-up archive (never deleted). Rules that are rare by nature can be pinned out of decay.
- **Provenance, and trust the owner grants** — every memory records where it came from (owner / agent / imported / derived), and only the owner approves one as a rule (skillmem trust ). 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.
- **Tamper-evident history** — every edit is appended to a SHA256 hash-chain; skillmem verify detects any after-the-fact tampering.
- **Deep Claude Code integration** — hooks on five events + 9 MCP tools installed with one command.
- **One memory, several agents** — Claude Code and Codex share a single database, and every
record carries the agent that wrote it, taken from the MCP handshake, so authorship stays
readable when they learn side by side.
- **Cross-platform** — macOS (launchd), Windows (schtasks), Linux (systemd user timers, cron fallback).
- **No vendor lock** — 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.
Why
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.
What 0.10.0 changed
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