okf

okf is a command for Claude Code from kimsanguine/llm-brain. It costs 14 tokens per session (1,408 once invoked), scanned A, original, MIT.

A command that exports a private knowledge wiki into an OKF-compatible bundle. OKF is a format for packaging knowledge, with a separate guarded mode for preparing material to share externally.

In plain words
What is it for?
Use it to preview export contents, exclude pages, remove internal fields, create a private bundle, or prepare a redacted share bundle after the required human approval.
Why use it?
It separates ordinary personal exports from external sharing and adds checks intended to reduce the chance of exposing sensitive pages or metadata.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python scripts/okf_export.py --share \.

Part of the llm-brain plugin — 1 skill, 7 commands shipped together

Good fit Use it to preview export contents, exclude pages, remove internal fields, create a private bundle, or prepare a redacted share bundle after the required human approval.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kimsanguine/llm-brain
agentmods
npx agentmods add commands/kimsanguine/llm-brain/okf

Made for: Claude Code.

Or install llm-brain, the plugin that ships this one along with the rest of its 1 skill, 7 commands.

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 okf

README.md
[![agentmods](https://agentmods.dev/badge/commands/kimsanguine/llm-brain/okf/github.svg)](https://agentmods.dev/commands/kimsanguine/llm-brain/okf)
Your own site
<a href="https://agentmods.dev/commands/kimsanguine/llm-brain/okf"><img src="https://agentmods.dev/badge/commands/kimsanguine/llm-brain/okf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for okf

Your own site · 80×15
<a href="https://agentmods.dev/commands/kimsanguine/llm-brain/okf"><img src="https://agentmods.dev/badge/commands/kimsanguine/llm-brain/okf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,408 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00014 $0.01408
Opus 5.5 $0.00006 $0.00563
Sonnet 5.5 $0.00003 $0.00282
Haiku 4.5 $0.00001 $0.00141

Measured 1mo ago against content hash 7cdbcee0512b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

okf scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/okf.md · 100 lines

How it starts

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

llm-brain의 okf 커맨드입니다. wiki/(내부 슈퍼셋)를 OKF v0.1 호환 번들 okf/로 투영합니다. 기본 경로는 기존 개인용 export이고, 외부 공유는 별도의 --share gate만 사용합니다. $ARGUMENTS에 따라 아래를 실행하세요.

인자 파싱

  • --dry-run → 파일 미작성, export 대상·제외·통계만 출력 (보안 검토용)
  • --strip-internal → OKF 예약 6필드만 (x-llmbrain-* 제거, 단독으로는 공유 승인 아님)
  • --exclude-slug <slug> → 특정 페이지 추가 제외 (복수 가능)
  • --config <경로> → private export 전용 override. --share는 canonical schema/okf_export.yaml만 허용
  • --out <경로> → 출력 번들 루트 (기본 private okf/, share okf-share/)
  • --share → Share-ready gate + redacted manifest를 거쳐 별도 공개 번들 생성
  • --approve-share I_ACKNOWLEDGE_SHARE_READY_EXPORT → 사람이 직접 입력하는 필수 승인 값
  • 인자 없음 → 기본 export (okf/ 생성)

기본 private export

기존 uv run python scripts/okf_export.py [--dry-run] 동작은 호환 유지한다. 이는 개인용 OKF projection이며 Share-ready 승인을 의미하지 않는다. --strip-internal만으로도 공개 승인이 되지는 않는다.

🔴 Share-ready gate (외부 공유 전 one-way door)

공유 산출물을 push하면 history가 영구다(비가역). 민감정보 누출을 막는다:

  1. schema/okf_export.local.yaml(gitignored) 존재 확인. 아래 두 키를 명시한다. 민감 키워드(sensitive_patterns)· 제외 페이지(exclude_slugs)는 반드시 이 로컬 파일에만 둔다. 커밋되는 schema/okf_export.yaml엔 실명·내부명을 절대 넣지 않는다(그 자체가 누출).
  2. 공유 후보 페이지는 scope: shared|private가 반드시 있어야 한다. 미지정·알 수 없는 scope, 허용되지 않은 classification(type), skipped/broken page는 hard-stop이다.
  3. 다음 명령의 승인 값은 자동 생성·추론하지 말고 사람이 검토 후 직접 입력한다.
exclude_slugs: []
sensitive_patterns: []
uv run python scripts/okf_export.py --share \
  --approve-share I_ACKNOWLEDGE_SHARE_READY_EXPORT

게이트는 base policy 또는 local security config 부재, 민감 hit, scope/policy 위반, wiki 내부 symlink/외부 해석 경로면 출력 전에 중단한다. local config는 exclude_slugs와 sensitive_patterns만 추가할 수 있고 base policy·승인 값을 바꿀 수 없다. --out의 canonical path가 레포 루트, raw/**, wiki/** 안이면 stage·receipt·output을 만들기 전에 거부한다.

통과 시 sibling stage에 전체 bundle과 share-manifest.json을 만든다. 기존 디렉토리 교체는 portable POSIX에서 단일 atomic rename이 아니므로 두 rename 사이 아주 짧게 경로가 없을 수 있다. 첫 rename 전에 durable recovery receipt를 만들며, hard exit 뒤에는 다음 정상 share 실행이 기존 bundle 복구 또는 새 bundle 완료를 수행한다. 따라서 published bundle과 recovery receipt가 동시에 없는 상태는 만들지 않는다.

Read the full file on GitHub · 100 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. 1mo ago First seen · 100 lines · 14 tokens per session scan A 7cdbcee0512b

Subscribe to this mod's changes

okf is a command published in the GitHub repository kimsanguine/llm-brain (10 stars, last pushed 21d ago), licensed MIT. It adds 14 tokens to every session and 1,408 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.