The toolkit

okf-skills is a handful of separate parts. You can use one without the others. For each part: what it does, what it needs, how to run it.

PartWorks onNeeds
ValidatorAny OKF bundle, any domainPython 3.11+ with uv, or pip and PyYAML
VisualizerAny OKF bundle, any domainPython 3.11+ with uv, or pip and PyYAML
okf skillAny domainA coding agent. Written for Claude Code first
Backfill skillA git repositoryClaude Code with the plugin (it uses the plugin's subagents) and its session history
Stop hookA git repositoryClaude Code with the plugin. Off until you opt in
MCP serverAny OKF bundleAn MCP host. Claude Code wires it automatically
GitHub ActionAny OKF bundleGitHub Actions

Validator

A checker in one Python file, skills/validate/scripts/okf_validate.py. No AI involved: the same bundle always gets the same report. It reads a bundle and reports findings in three groups, so you can tell a broken bundle from a bundle that could be tidier.

FindingComes fromExamplesFails by default
ErrorSpec conformance, §11.1Frontmatter that is not a YAML mapping, duplicate keys, an unquoted impossible date like 2026-02-30 (written in quotes in a timestamp field, it is a warning instead), frontmatter in a subfolder index.md or in a log.md, a log.md date heading that is not a real YYYY-MM-DDYes
WarningSpec guidanceA broken link, a .md file without type, a malformed sources or verified entry, a timestamp in the wrong form, an unprefixed custom key at the bundle rootNo
Lintokf-skills advice, not the specA concept without title, description, tags or generatedNo, and only shown with --lint

Most findings name the spec section they come from. A concept with only type passes, also with --strict.

A README.md inside the bundle and a link to a file that does not exist yet are both warnings, so --strict fails on them. Use --max-warnings if you want to keep them. When the bundle is conformant but a gate fails, the last line says so, for example conformant, but --strict allows no warnings (2 found).

Run it on a bundle folder. Without flags, errors fail the run and warnings are listed:

uv run skills/validate/scripts/okf_validate.py my-bundle
FlagEffect
--strictAny warning fails the run too
--lintAlso show our style advice
--max-warnings NFail only above N warnings
--jsonPrint a machine-readable report
--migrateUpgrade a v0.1 or v0.2 bundle in place, then validate

--strict fails on any warning that is shown. Lint findings count only when you also pass --lint. --migrate is described on Upgrading to v0.3. In Claude Code, the same checker runs as /okf-skills:validate.

Visualizer

Turns a bundle into one self-contained HTML file with an interactive graph. Concepts are nodes, coloured by type. Links and in-bundle path fields are edges. Clicking a node opens the rendered concept with its sources, its backlinks, its trust tier and whether it is stale. The page works out staleness when you open it, so a page you published last month still marks a concept stale on the day it expires.

uv run skills/visualize/scripts/okf_visualize.py my-bundle -o viz.html --title "My bundle"

Every concept gets a deep link, such as viz.html#tables/orders. Above 1000 concepts the layout falls back to a simpler one. --max-nodes N refuses bundles larger than N.

Limit

The page loads three libraries (Cytoscape, marked, DOMPurify) from a CDN, pinned to exact versions with Subresource Integrity. Viewing it needs a network connection. Bundle content never leaves the page.

Live demos: a storefront, a data catalog, and this repository's own bundle.

The okf skill

Instructions for a coding agent to produce, maintain and consume bundles, with the full v0.3 spec vendored next to them as the reference. It covers any domain: tables, metrics, policies, services, decisions. It tells the agent to record itself honestly in generated, never to mark its own work as verified, and never to invent a human: identity. Those rules are listed on Spec and our conventions.

/okf-skills:okf produce .okf      # capture knowledge into a bundle
/okf-skills:okf maintain .okf     # update concepts after the code or docs changed
/okf-skills:okf consume .okf      # answer from the bundle

The skill also ships a scaffold script that works without an agent:

uv run skills/okf/scripts/okf_init.py my-bundle --title "Finance knowledge"

Backfill skill

Rebuilds a bundle for a repository that never had one, by replaying its history. A deterministic script turns git commits and Claude Code session transcripts into a list of events. Then subagents summarise the events in batches, and a single writer subagent turns the summaries into concepts.

/okf-skills:backfill .
Limit

Backfill assumes a git repository and Claude Code. It reads Claude Code session history (you can turn that off with --no-sessions), and it needs the plugin install, because the subagents live outside the skill folder. The extraction step gives the same events for the same repository. The writing step uses a language model, so two runs do not produce identical files.

Stop hook (enforced upkeep)

An optional check that runs when Claude Code is about to finish a task. If tracked files have uncommitted changes and nothing in the bundle changed, it blocks and asks the agent to update the bundle first. It does nothing until you opt in, in the bundle-root index.md:

.okf/index.md
---
okf_version: "0.3"
title: Invoice platform
x-okf-skills-upkeep: enforced
---

If the bundle also documents git repositories checked out inside the project, add x-okf-skills-recursive: true so the hook looks at them too. Set OKF_HOOK=off in the environment to turn it off for a session.

For a softer version, paste templates/CLAUDE-okf.md into your CLAUDE.md. It asks the agent to read the bundle before a task and update it after, without blocking anything.

Limit

The hook is a bash script for Claude Code and a git repository. It only notices that something changed, not whether the bundle update was correct.

MCP server

A small server that lets an AI app read a bundle through MCP, the Model Context Protocol. It is for apps that cannot open files themselves. It is read-only, talks over stdio, and serves the bundle given as an argument, else $OKF_BUNDLE, else ./.okf. It never writes, and it refuses any ID that would resolve outside the bundle.

ToolReturns
search_concepts(query, limit)Short cards for matching concepts: ID, type, title, description, status, trust tier, staleness
read_concept(concept_id)One concept, verbatim, frontmatter included
get_neighbors(concept_id)The concepts it links to and the ones that link to it
uv run servers/okf_mcp.py my-bundle

In Claude Code the plugin starts it for you. There it mostly duplicates what the agent can already do with file reads and search, and we say so in the decision record. It exists for hosts that have nothing else.

GitHub Action

A composite action around the validator: uses: ekar-is/okf-skills@v1. Inputs are bundle (default .okf), strict and max-warnings. The JSON report is the report output. A full workflow is on Getting started.

What has been measured

We ran three experiments. Each is published in the repository with its protocol, its runs and the problems it exposed, including the results that did not go our way. None of them measures what OKF is worth in a real repository, where prose and git history already say a lot about what is current.