Skip to main content
skill CX Codex

okf-knowledge-base — Claude Code skill: what it does, how to install

Teaches an agent the rules of Open Knowledge Format v0.2, so it can build and maintain knowledge bundles without guessing at frontmatter or links.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add inkeep/open-knowledge-skills --skill okf-knowledge-base -a claude-code
Open on GitHub

What okf-knowledge-base does

The skill hands the agent the semantics of Open Knowledge Format v0.2, a portable way to keep knowledge as Markdown files with YAML frontmatter and plain links. A bundle is a directory tree of .md files, and each concept's ID is its path minus the extension. Frontmatter must parse and carry a non-empty type string. Types form an open vocabulary, so an unknown one has to be accepted rather than rejected.

Much of the text covers authoring. Provenance goes into sources, with generated and verified kept apart and lowercase human: or process: prefixes where they apply. Every provenance timestamp is ISO 8601 with an explicit UTC offset. Reserved files index.md and log.md are spelled out, as is the rule that consumers read .md and not .mdx. A deprecated status or an expired stale_after acts as a trust signal, not a validation failure.

The skill assumes an agent host with the OpenKnowledge MCP server configured. The optional okf plugin adds write-time warnings and project audits, and it reads field contracts from .ok/okf/*.schema.json. Without that server the agent still gets the written rules; what it loses is the feedback loop. Generated index files belong to the plugin and get overwritten, so editing them by hand does nothing.

What it helps with

  • build an OKF bundle an agent can navigate
  • record source provenance and verification on a concept
  • work through warnings from the okf plugin
  • keep index.md and log.md consistent
  • migrate older concepts to v0.2 fields

Example prompts for the agent

  • Turn these notes into an OKF bundle with one file per concept
  • Check the frontmatter in docs/api.md — is type present and valid?
  • Add a dated log.md entry for the change you just made

How to install okf-knowledge-base

1Skills CLI (Vercel)

npx skills add inkeep/open-knowledge-skills --skill okf-knowledge-base -a claude-code

2Manually: put the files in place

~/.claude/skills/okf-knowledge-base/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/okf-knowledge-base/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about okf-knowledge-base

How do I install okf-knowledge-base in Claude Code?

Run npx skills add inkeep/open-knowledge-skills --skill okf-knowledge-base -a claude-code. The skill lands at ~/.claude/skills/okf-knowledge-base/SKILL.md.

What does okf-knowledge-base do?

It gives the agent the Open Knowledge Format v0.2 rules: bundle layout, required frontmatter fields, provenance, links, indexes and logs.

Is the OpenKnowledge MCP server required?

Yes, the skill targets hosts with that server configured. The okf plugin is optional and off by default, yet it is the piece that reports portability problems during writes.

Source text

SKILL.md · MIT
---
name: okf-knowledge-base
description: "Open Knowledge Format (OKF) v0.2 guidance. Use when creating, reading, reviewing, or maintaining an OKF bundle; responding to OpenKnowledge `okf` plugin warnings; or choosing types, provenance, links, indexes, or logs."
compatibility: "Any agent host with the OpenKnowledge MCP server configured. The optional `okf` plugin provides continuous conformance feedback."
# This skill may live inside an OKF bundle, so it carries the required type.
type: Document
metadata:
  plugin: "okf"
  author: "Inkeep"
  repository: "https://github.com/inkeep/open-knowledge-skills"
---
# Open Knowledge Format (OKF)

[OKF v0.2](https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/main/SPEC.md) is a portable format for agent-readable knowledge: Markdown files, YAML frontmatter, and standard links. The `/open-knowledge` skill governs tool use; this skill covers OKF semantics.

## Core rules

- A bundle is a directory tree of `.md` files. Each non-reserved file is one concept; its path without `.md` is its ID.
- Every concept needs parseable frontmatter with a non-empty string `type`. No other field is always required.
- Types are an open vocabulary. Consumers must accept unfamiliar types and metadata.
- Use standard Markdown links for portable relationships. Broken links and a missing index are allowed.
- `index.md` and `log.md` are reserved at every level. Use lowercase filenames.
- An `index.md` normally has no frontmatter; only the root index may declare `okf_version: "0.2"`.
- A `log.md` is newest-first; entry headings begin with an ISO date — `## YYYY-MM-DD: Summary` (the summary after the date is optional; a bare `## YYYY-MM-DD` is equally conformant).
- OKF consumers read `.md`, not `.mdx`.

## Authoring judgment

- Make each concept the smallest useful link or citation target. Choose a stable, descriptive type; `Document` is only a generic fallback.
- Do not invent facts, relationships, resources, sources, verification, or history. Missing knowledge is better than false structure.
- Use `title`, `description`, `resource`, and `tags` only when they add real information.
- Record provenance in `sources`. Join claim-level citations with matching `sources[].id` and Markdown footnotes.
- Keep authorship and verification separate: `generated` says who produced content; `verified` says who confirmed it. Use exact lowercase `human:` and `process:` prefixes when applicable.
- Write every provenance timestamp as an ISO 8601 datetime with an explicit UTC offset (`stale_after: 2026-12-31T00:00:00Z`), never a bare date and never an offsetless time. This covers `generated.at`, `verified[].at`, `stale_after`, `sources[].last_modified`, and both `usage_window` bounds. A `log.md` entry heading is different: it stays a plain `YYYY-MM-DD` date.
- Treat `status: deprecated` and expired `stale_after` values as trust signals, not validation errors.
- For `type: Attested Computation`, follow the declared runtime and parameters. Do not rewrite the sanctioned computation.

## Read and maintain a bundle

- Start with the nearest `index.md`, inspect frontmatter, then follow only relevant links.
- Prefer current, verified sources, but tolerate unknown types and incomplete links.
- If the bundle conflicts with an assumption, trust the bundle; if it is missing or inconsistent, say so.
- Write durable discoveries back to the relevant concept and authored enumerations.
- Add a truthful dated `log.md` entry after durable changes when the bundle uses a log.
- Read legacy `timestamp` and body citations, but prefer v0.2 `generated.at` and `sources` when updating a concept. Never invent provenance while migrating.

## OpenKnowledge's `okf` plugin

The optional project plugin provides continuous portability feedback without blocking writes:

- Write-time warnings and project audits check structure, frontmatter, reserved files, links, and `.mdx` use.
- `.ok/okf/*.schema.json` contains the precise field contracts. Read these generated files instead of guessing; do not edit them.
- Deterministic lint findings establish conformance. Agent judgment still establishes whether metadata is true and useful.
- Optional index generation maintains `index.md` files. Generated indexes are machine-owned: never edit them, because OpenKnowledge replaces their contents.
- `log.md` remains authored, not generated.

The plugin is off by default and each rule can be disabled. Its value is early warning when OpenKnowledge-native content would be misread by another OKF consumer.

© Inkeep · MIT · inkeep/open-knowledge-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set7

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor