okfmem CLAUDE.md

okfmem CLAUDE.md is an instructions file for Claude Code from s-annam/okfmem. It costs 1,544 tokens per session, scanned B, original, Apache-2.0.

Repository instructions for okfmem, a project that keeps its memory data in a separate private store from its public code.

In plain words
What is it for?
Working on the okfmem codebase, protecting private memory data, checking tracked files for exposed private strings, and following its confirmation rules.
Why use it?
They help prevent private paths, session links, personal emails, and model details from entering tracked files. A leak-checking script is used as an early verification step.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/s-annam/okfmem/claude-md
Clone the repo
git clone --depth 1 https://github.com/s-annam/okfmem

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for okfmem CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/s-annam/okfmem/claude-md.svg)](https://agentmods.dev/instructions/s-annam/okfmem/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/s-annam/okfmem/claude-md"><img src="https://agentmods.dev/badge/instructions/s-annam/okfmem/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,544 This file is loaded in full into every session.
When invoked 1,544 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01544 $0.01544
Opus 5 $0.00772 $0.00772
Sonnet 5 $0.00309 $0.00309
Haiku 4.5 $0.00154 $0.00154

Measured 6d ago against content hash b1716836fcf9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

okfmem CLAUDE.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| **Outward or user-config mutating** | write `~/.claude/settings.json` (hook wiring), create symlinks/junctions/copies under `~/.claude`, add/set a git remote, push | **yes/no confirm** (`[y/N]`) |
CLAUDE.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

Guidance for Claude Code (claude.ai/code) and other agents working in this repository.

This file is about writing code for the public okfmem repo. The engine (the tool) lives here; your private memory data lives in a separate store (~/okfmem-store, remote github.com/<you>/okfmem-store). Never conflate the two — code ships here, data never does.

Hard rules (no exceptions)

  • No private strings in tracked files. The repo is public. Never commit: a real home path (/Users/<yourname>), a private session URL (claude.ai/code/session_…), a Claude-Session: trailer, or a personal email. Use the documented placeholders instead — ~/okfmem-store, $OKFMEM_STORE, /Users/you. python3 scripts/check-leaks.py enforces this (wired into the verify CI job as the first, fail-fast step). It scans the content of tracked files and exits non-zero naming the offending file:line. It does not scan commit history, and it cannot judge whether prose is private — that judgement is still yours. Run it before committing.

  • No model provenance in git. No Co-Authored-By: trailer naming a model, no Claude-Session: trailer, no https://claude.ai/code/session_… URL, no 🤖 Generated with … badge — not in a commit message, not in a PR body's git metadata. The Bash tool's default commit template suggests these; ignore it. Model provenance that helps a reader (which model, how much was AI-assisted, what a human reviewed) belongs in the PR body only, as a short prose ## Provenance block a reviewer can actually read. The private session link helps no one but the author and ties public commits to a personal account — keep it out.

  • internal/ never ships. Marketing, launch drafts, positioning notes live under internal/, which is git-ignored here (it is its own separate private repo). Nothing under it is public.

Project overview

okfmem is a self-maintaining memory engine over Open Knowledge Format (OKF) markdown pages — no database, no server. It adds mathematical decay, OKF frontmatter, and automatic archival on top of a native agent's file reading (e.g. Claude Code auto-loading MEMORY.md) so the always-loaded index stays lean instead of growing into an endless scratchpad.

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 99 lines · 1,544 tokens per session scan B b1716836fcf9

Subscribe to this mod's changes

okfmem CLAUDE.md is an instructions file published in the GitHub repository s-annam/okfmem (5 stars, last pushed 23d ago), licensed Apache-2.0. It adds 1,544 tokens to every session, about $0.0077 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.