From okf-memory
Use when you change code in a way that alters how it works (update + restamp the affected concept), when drilling into a .knowledge/ concept file, or when running /okf-init, /okf-sync, /okf-check. The SessionStart hook already injects index.md for read-only use, so do NOT load this skill just to read the index. Cross-session memory in Open Knowledge Format - keeps sessions from re-reading source to relearn vocabulary and architecture.
How this skill is triggered — by the user, by Claude, or both
Slash command
/okf-memory:okf-memoryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Cross-session memory stored as an **Open Knowledge Format (OKF)** bundle inside the repo at `.knowledge/`. The point: a fresh session should know the codebase's vocabulary and architecture from cheap markdown, instead of re-reading source files (token-expensive) or making the user re-explain terms every session.
Cross-session memory stored as an Open Knowledge Format (OKF) bundle inside the repo at .knowledge/. The point: a fresh session should know the codebase's vocabulary and architecture from cheap markdown, instead of re-reading source files (token-expensive) or making the user re-explain terms every session.
.knowledge/
index.md # progressive-disclosure map - the ONLY file loaded at session start
glossary.md # project vocabulary (one concept)
arch-<area>.md # one concept file per real subsystem
log.md # append-only history (what changed, when) - NOT auto-loaded
Each concept is one markdown file. The file path is its identity. See references/format.md for the exact frontmatter and rules; references/maintenance.md for the update workflow.
| State | History | |
|---|---|---|
| Holds | current truth, present tense | dated record of what happened |
| Files | index.md + concept files | log.md |
| On change | overwritten in place | appended only |
| Auto-loads | yes (index) | no |
The single most common failure of memory systems is storing events ("renamed X to Y on June 16") as if they were state. Events only accumulate - they never get corrected, so they rot and contradict. Keep state and history strictly apart: concept bodies say what is, log.md says what happened.
At session start, read .knowledge/index.md only. It lists every concept with a one-line description and a freshness stamp. That map alone usually answers "what do the terms mean / what's the shape" without opening any concept file. Open a concept file only when the task actually touches that area. Never read the whole bundle up front, and never re-read source to relearn something a concept already records.
If there is no .knowledge/ directory, tell the user they can run /okf-init to create one. Do not silently scan the codebase.
When you change behavior, vocabulary, or architecture (not for typo fixes or pure refactors that change nothing observable):
timestamp to now.index.md.log.md recording what changed.This rides the same moment you'd already use to commit or note a change - it is not a separate habit to remember. Full procedure in references/maintenance.md.
Each concept carries its own timestamp, so freshness is per-fact. When a concept looks older than the code it describes and you're about to rely on it, re-verify only that one concept against source, then overwrite + restamp. Don't re-verify the whole bundle.
A fact lives in exactly one concept file. If two files would state it, link instead of duplicating: [glossary](glossary.md). Cross-links between concepts form a graph richer than the folder tree - use them.
/okf-init - create the bundle for a repo that has none (shallow 3-layer structure scan, infer subsystems, then write - no approval prompt)./okf-sync - fold recent changes into concepts and restamp (use after a batch of work, or when the post-edit nudge fires)./okf-check - audit the bundle for staleness, contradictions, and coverage gaps.| Thought | Reality |
|---|---|
| "Let me read the source to learn the architecture" | Read index.md first - that's why it exists. |
| "I'll append what changed to the concept file" | Concepts are overwritten, not appended. Append to log.md. |
| "I'll note the date in the concept body" | Dates go in frontmatter timestamp and in log.md, never in the body. |
| "The whole bundle might be stale, let me re-verify all of it" | Re-verify only the specific concept you're about to trust. |
| "I'll record this fact in both files to be safe" | One fact, one file. Duplication is how drift starts. |
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub fx818/okf-memory --plugin okf-memory