Agent skill

OKF Agent Memory Protocol

by okf-memory in okf-memory/okf-agent-memory

Teaches an agent deterministic rules for searching, creating and updating a project's Open Knowledge Format memory bundle instead of scanning files directly.

MITAuto-check passedAgent Workflows

Install OKF Agent Memory Protocol

skills CLI
$ npx skills add okf-memory/okf-agent-memory --skill okf-agent-memory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install okf-memory/okf-agent-memory okf-agent-memory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/okf-memory/okf-agent-memory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/pkg/okf/assets/skill .claude/skills/okf-agent-memory && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
okf-agent-memory
GitHub stars
756
Token cost
~934 tokens
SKILL.md length
313 words
Files
6
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Teaches an agent deterministic rules for searching, creating and updating a project's Open Knowledge Format memory bundle instead of scanning files directly.

  • Works in 6 steps: Project & Domain Codex → Behavioral Invariants (RFC 2119) → Guard Clauses & Scope Governance → …
  • Recording an architecture decision so it survives a conversation reset
  • SKILL.md covers 0. Project & Domain Codex, 1. Behavioral Invariants (RFC…, 2. Guard Clauses & Scope… and 3. Completion Pipeline…, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

This skill sets hard behavioral rules for working with an Open Knowledge Format v0.2 knowledge bundle: search it with a dedicated search call before proposing architecture changes or creating new concepts, never scan the knowledge folder with a directory listing, grep, or raw file reader, never forge human verification since that field is human-only (an agent-made entry gets a generated-by field instead), prefer the native tools over CLI fallback commands, and prefer updating an existing entity over creating a new one when mutating something that already exists.

Editing a path first checks whether it has been visited before and searches for it if not, and a scope marked as frozen by governance stops the edit until the user confirms, while a scope marked as a constraint means every listed invariant must be followed. A fixed completion pipeline requires logging any architecture decision as a new entry, updating any concept whose requirements changed, syncing a log and index file whenever concepts are mutated, and validating the bundle strictly before finishing, fixing any errors or warnings before exit.

Diagrams inside the knowledge bundle must be written in Mermaid syntax; any other diagram format, including ASCII art, is explicitly rejected. Tooling is available in two equivalent forms - native MCP tools such as a search or show call, and a deterministic CLI with JSON output - both working against a default knowledge bundle or a custom path passed explicitly.

When your agent uses it

  • Recording an architecture decision so it survives a conversation reset
  • Searching project memory before making a change to a subsystem
  • Checking whether a part of the codebase is frozen by governance

Example prompts

  • “Search project memory for prior decisions about the auth module.”
  • “Record this architecture decision in the OKF knowledge bundle.”
  • “Validate the knowledge bundle and fix any errors before I finish.”

Requirements

  • The okf Go toolchain
  • A knowledge/ OKF bundle

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Project & Domain Codex
  2. Behavioral Invariants (RFC 2119)
  3. Guard Clauses & Scope Governance
  4. Completion Pipeline (Sequential Assertion Gates)
  5. Tooling Reference (Dual-Mode: MCP & CLI)
  6. Workflow Guides (Progressive Disclosure)

What it can do on your machine

Read from SKILL.md and the folder at commit 533b634. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

OKF Agent Memory Protocol loads about 934 tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 313 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~934

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from okf-memory/okf-agent-memory at commit 533b634, republished under its MIT licence (© okf-memory). 313 words, ~934 tokens.

Download SKILL.mdSave it as .claude/skills/okf-agent-memory/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
okf-agent-memory
description
Maintain persistent, domain-neutral project memory for AI agents using Open Knowledge Format (OKF) v0.2 bundles and the deterministic okf Go toolchain. Use whenever project knowledge, decisions, runbooks, research, client notes, or domain discoveries must survive conversational resets.

OKF Agent Memory Skill (AAG Spec v0.1)

Teaches AI agents deterministic interaction with an Open Knowledge Format (OKF v0.2) bundle (knowledge/).

0. Project & Domain Codex

  • GOAL: maintain(high_factual_integrity, domain_neutrality, strict_determinism)
  • FORMAT: diagrams => ASSERT(syntax == mermaid, ELSE=STOP("Mermaid required; ASCII/box art prohibited."))

1. Behavioral Invariants (RFC 2119)

  • MUST execute okf_search(query=keywords, limit=3) before proposing architecture changes or creating concepts.
  • NEVER scan knowledge/ via list_dir, grep_search, or raw file readers.
  • NEVER forge human verification (verified: is human-only; declare generated: { by: "<actor>", at: "<iso-time>" }).
  • PREFER native okf_* MCP tools OVER CLI fallback commands.
  • PREFER okf_update OVER okf_create when mutating existing domain entities.
  • NEVER persist scratchpads, raw chain-of-thought, or speculative chatter to knowledge corpus.

2. Guard Clauses & Scope Governance

  • ON edit(@path/): IF first_visit(@path/) => okf_search(for_path=@path/) IF governance == "hold" => STOP("Subsystem frozen by governance. Confirm with user.") IF governance == "constraint" => MUST adhere to all listed invariants IF governance == "context" => proceed with awareness
  • ON user_query(architecture | requirements | conventions | domain_facts): okf_search(query=keywords, limit=3) => evaluate summary description IF relevant => okf_show(concept_id) ONLY on demand

3. Completion Pipeline (Sequential Assertion Gates)

  1. IF arch_decisions_made => MUST okf_create(architecture/*, type="decision", title=..., desc=...)
  2. IF requirements_discovered => MUST okf_update(concept_id)
  3. IF concepts_mutated => MUST sync(knowledge/log.md, knowledge/index.md)
  4. ASSERT(okf_validate(strict=true, drift=true) == {errors: 0, warnings: 0}, ELSE=fix_before_exit)

4. Tooling Reference (Dual-Mode: MCP & CLI)

Default bundle: ./knowledge. For custom paths, pass bundle="path/to/bundle".

TaskPreferred: Native MCP ToolFallback: Deterministic CLI (--json)
Search Knowledgeokf_search(query="<query>", limit=3)okf search "<query>" knowledge --limit 3 --json
Discover Code Constraintsokf_search(for_path="<file-path>")okf search --for-path <file-path> knowledge --json
Inspect Conceptokf_show(concept_id="<id>")okf show <id> knowledge --json
Create Conceptokf_create(concept_id="<id>", type="<type>", title="<title>", description="<desc>")okf create <id> knowledge --type <type> --title "<title>" --desc "<desc>" --json
Update Conceptokf_update(concept_id="<id>", description="<desc>", title="<title>")okf update <id> knowledge --desc "<desc>" --json
Relate Conceptsokf_relate(source_id="<src>", target_id="<tgt>", description="<prose>")okf relate <src> <tgt> knowledge --desc "<prose>" --json
Validate Bundleokf_validate(strict=true)okf validate knowledge --strict --drift --json

5. Workflow Guides (Progressive Disclosure)

© okf-memory, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in pkg/okf/assets/skill of okf-memory/okf-agent-memory.

  • SKILL.md
  • discovery.md
  • examples.md
  • relationships.md
  • remember.md
  • update.md

Open the folder on GitHubat commit 533b634

Compare with similar skills

OKF Agent Memory Protocol next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

OKF Agent Memory Protocol compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
OKF Agent Memory Protocol this skillokf-memory/okf-agent-memory756—~934Automated safety check: PassMIT
Paxmpax-beehive/paxm421—~574Automated safety check: PassApache-2.0
Add an MCP Tool to remindbradimsem/remindb129—~2.1kAutomated safety check: PassMIT
MemPalace Memory SearchMemPalace/mempalace59k—~1.4kAutomated safety check: PassMIT
MemPalace Setup and OperationMemPalace/mempalace59k—~2.2kAutomated safety check: PassMIT
agentmemory Setup and Diagnosticsrohitg00/agentmemory29k—~1kAutomated safety check: NotesApache-2.0

Similar skills

  • Paxm

    pax-beehive/paxm

    Use paxm as Codex's active and passive memory layer. An agent skill from pax-beehive/paxm.

    421 GitHub stars~574 tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Checklist for adding a new Memory-prefixed tool to remindb's Go MCP server: tool file, registration, test, skill docs, plus the locking and logging rules.

    129 GitHub stars~2.1k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • MemPalace Memory Search

    MemPalace/mempalace

    Mines project files and conversation exports into a local, searchable memory palace and recalls past work by semantic search through the mempalace CLI.

    59k GitHub stars~1.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Installs and configures MemPalace as a private local palace, a shared-brain hub or a client of an existing hub, including MCP registration and version-correct initialization.

    59k GitHub stars~2.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Sets up and troubleshoots a local agentmemory install, covering the MCP connection, environment variables, ports, authentication and optional feature flags.

    29k GitHub stars~1k tokensUpdated yesterday
    Agent WorkflowsAuto-check: notes
  • Claude-Mem Install for Grok Bot

    thedotmack/claude-mem

    Use this when setting up claude-mem on Grok Bot: local worker plus CMEM Pro observer (default), optional host-login observer, or remote cmem.ai. No Cursor…

    97k GitHub stars~440 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

Categories

Questions about OKF Agent Memory Protocol

What does OKF Agent Memory Protocol do?

Teaches an agent deterministic rules for searching, creating and updating a project's Open Knowledge Format memory bundle instead of scanning files directly. 2 knowledge bundle: search it with a dedicated search call before proposing architecture changes or creating new concepts, never scan the knowledge folder with a directory listing, grep, or raw file reader, never forge human verification since that field is human-only (an agent-made entry gets a generated-by field instead), prefer the native tools over CLI fallback commands, and prefer updating an existing entity over creating a new one when mutating something that already exists.

When should I use OKF Agent Memory Protocol?

OKF Agent Memory Protocol fits situations like: recording an architecture decision so it survives a conversation reset; searching project memory before making a change to a subsystem; checking whether a part of the codebase is frozen by governance.

How do I install OKF Agent Memory Protocol in Claude Code?

Run `npx skills add okf-memory/okf-agent-memory --skill okf-agent-memory -a claude-code`. Or copy the skill folder (pkg/okf/assets/skill in okf-memory/okf-agent-memory) into .claude/skills/okf-agent-memory in your project. Claude Code loads it when a task matches its description.

How do I install OKF Agent Memory Protocol in Codex?

Run `npx skills add okf-memory/okf-agent-memory --skill okf-agent-memory -a codex`. Or copy the skill folder (pkg/okf/assets/skill in okf-memory/okf-agent-memory) into .agents/skills/okf-agent-memory in your project. Codex loads it when a task matches its description.

Can I use OKF Agent Memory Protocol in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add okf-memory/okf-agent-memory --skill okf-agent-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/okf-agent-memory, .gemini/skills/okf-agent-memory, .github/skills/okf-agent-memory and .opencode/skills/okf-agent-memory in your project.

What does OKF Agent Memory Protocol need to run?

SKILL.md names no scripts, command-line tools or credentials: OKF Agent Memory Protocol is instructions for the agent only. Our summary lists: The okf Go toolchain; A knowledge/ OKF bundle.

Does OKF Agent Memory Protocol access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is OKF Agent Memory Protocol safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does OKF Agent Memory Protocol use?

OKF Agent Memory Protocol is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does OKF Agent Memory Protocol use?

About 934 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to OKF Agent Memory Protocol?

Skills that share tags, products or a category with OKF Agent Memory Protocol: Paxm (pax-beehive/paxm, 421 stars), Add an MCP Tool to remindb (radimsem/remindb, 129 stars), MemPalace Memory Search (MemPalace/mempalace, 59k stars) and MemPalace Setup and Operation (MemPalace/mempalace, 59k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains OKF Agent Memory Protocol?

okf-memory (a GitHub organization) maintains it in okf-memory/okf-agent-memory, which has 756 GitHub stars. The repository was last updated on October 4, 2026.

Source: okf-memory/okf-agent-memory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.