Creates, validates, and enriches Open Knowledge Format (OKF) bundles — markdown directories with YAML frontmatter for agent-readable organizational knowledge. Activates on OKF, knowledge bundle, LLM wiki, or folder conversion requests.
Ships in okf. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
OKF is a vendor-neutral, open spec (v0.3) for representing knowledge as a directory of markdown files with YAML frontmatter. No SDK required — if you can cat a file, you can read OKF.
It formalizes the "LLM Wiki" pattern (Karpathy's gist) into an interoperable format: wikis written by different producers can be consumed by different agents without translation.
The canonical repository is open-knowledge-format/open-knowledge-format, pinned here at commit 527e81a (2026-11-18). The earlier GoogleCloudPlatform/open-knowledge-format repo was marked deprecated on 2026-11-18 (commit 8a8ff87) and is no longer updated.
v0.3 adds: superseded_by for deprecated concepts, bundle metadata (title, description, license on the root index.md), and rules for extension keys (x-<producer>-<name>). It also makes two breaking changes in how a consumer reads a v0.2 value (see Migrate v0.2 to v0.3).
For the full spec, see:
type is required on a concept. The spec defines the interoperability surface, not the content model.| Term | Definition |
|---|---|
| Bundle | A directory tree of .md files. The unit of distribution (git repo, tarball, or subdirectory). |
| Bundle root | The top directory of a bundle. Paths that start with / resolve from here. A root index.md with frontmatter identifies the root when the bundle lives inside a larger repository. |
| Concept | One markdown file with a non-empty type = one unit of knowledge (table, metric, playbook, API, etc.). |
| Concept ID | File path within the bundle, minus .md suffix. Example: tables/users.md → ID tables/users |
| Asset | A non-.md file in the bundle (image, attester code). Not a concept. |
| Frontmatter | YAML block between --- delimiters at file top. |
| Body | Everything after the frontmatter. CommonMark, plus GFM tables and [^label] footnotes. |
| Link | A standard markdown link asserting an untyped, directed relationship between concepts. Only the directory tree gives parent/child structure. |
| Path field | A frontmatter field whose value is a path or a URI (resource, sources[].resource, computation, executor.resource, attester.resource, superseded_by). |
| Source | A material a concept derives from, recorded in the sources frontmatter field. |
| Provenance | The set of sources a concept derives from. |
| Actor | Identity string: <producer>/<version> for agents, or <scheme>:<id> (human:, team:, process:, or another scheme). |
| Trust tier | Level derived from current verified events: unverified, machine-confirmed, or human-reviewed. |
| Attested Computation | A concept (type: Attested Computation) carrying a sanctioned way to compute a value. |
| Extension key | A frontmatter key the spec does not define. Future versions will not define keys that start with x-. |
| Field | Required? | Description |
|---|---|---|
type | YES | Kind of concept (free-form string, e.g. BigQuery Table, Metric, Playbook, Attested Computation) |
title | Recommended | Human-readable display name |
description | Recommended | One-sentence summary |
resource | Recommended | URI identifying the underlying asset (omit for abstract concepts) |
tags | Optional | YAML list of short strings. A scalar value is one tag — consumers MUST NOT split it at commas. |
type is the only always-required key. A file without frontmatter or without type is not a concept; it does not make the bundle non-conformant (README.md, AGENTS.md, and similar files may live in the bundle).
| Field | Description |
|---|---|
generated | { by: <actor>, at: <timestamp> } — Who/what produced the current content and when. by is required in the mapping. at is the last meaningful change (format, whitespace, or link repair does not change it). |
verified | List of { by: <actor>, at: <timestamp> } — Who confirmed correctness. Both keys are required in an event. A single mapping counts as a one-item list. |
status | draft | stable | deprecated — Default when absent: stable. Any other value is not stable; filters to current knowledge exclude the concept. |
superseded_by | Path to the replacement concept. Meaningful only with status: deprecated. |
stale_after | Timestamp — content is stale on/after this instant. Stale means "check again", not "false". A value that does not parse is never fresh. |
Timestamps (generated.at, verified[].at, stale_after, sources[].last_modified, usage_window.from, usage_window.to) are RFC 3339: a date-time with an offset ("2026-06-30T14:00:00Z") or a date only ("2026-06-30", meaning the start of that day in UTC). A date-time without an offset is invalid. Producers SHOULD use the date-time form for generated.at and verified[].at, because consumers compare them. Quote values that look like numbers or booleans (for example okf_version: "0.3").
| Field | Description |
|---|---|
sources | List of source entries (see below) |
usage_window | { from, to } — Time range for usage_count signals. One source entry MAY override it. |
Each sources entry:
resource (REQUIRED): URL, bundle path, or scope descriptorid: Stable key for footnote attribution (SHOULD be present when the body cites the source)title: Human-readable labelauthor: Actor who produced the sourceusage_count: How often exercised during usage_window (liveness signal, not a precise score)last_modified: When the source last changedFor concepts with type: Attested Computation:
| Field | Description |
|---|---|
runtime | REQUIRED. How to run it: bigquery, postgres, dbt, python, Looker |
parameters | List of { name, type, required } — name and type are required in an entry; required defaults to false. Common types: string, integer, number, boolean, date, timestamp. |
computation | Path to a computation file (if not a fenced block in the # Computation section) |
executor | { resource, receipt: [...] } — How to run and what evidence to capture |
attester | { resource } — Deterministic code (no LLM) that verifies the receipt and returns at least { ok, reason? } |
Consumers MUST NOT show a value as attested when the concept has no runtime or no attester.
| File | Purpose | Has frontmatter? |
|---|---|---|
index.md | Directory listing for progressive disclosure; bundle metadata at the root | NO in subdirectories. Bundle-root index.md MAY have okf_version, title, description, and license. |
log.md | Change history, newest first | NO (v0.3: never) |
Dot-paths (files and directories whose names start with .) are not part of the bundle.
| Heading | When to use |
|---|---|
# Schema | Data assets — describe columns/fields |
# Examples | Show concrete usage (code blocks, queries) |
# Computation | Attested Computation — the sanctioned code/query |
Fields that record identity (generated.by, verified[].by, sources[].author) use one of two forms:
<producer>/<version> for agents and tools: reference_agent/gemini-2.5-pro<scheme>:<id> for other actors. Defined schemes:| Scheme | Meaning | Example |
|---|---|---|
human: | A person | human:ahormati |
team: | A group of people | team:finance-fpa |
process: | An automated process | process:finance-nightly |
Other schemes are allowed and count as non-human. Only human: gives the human-reviewed trust tier. A team: actor in verified is machine-confirmed — a team name does not identify the person who did the check.
A verification event is current when its at is equal to or later than generated.at, or when generated is absent. Consumers MUST calculate the trust tier only from current events. Earlier events stay in the file as history.
| Condition | Trust Tier |
|---|---|
No current verified event | Unverified |
Current events from non-human: actors only | Machine-confirmed |
At least one current human:<id> event | Human-reviewed |
This matters when agents maintain the corpus: if an agent rewrites a concept after a human review, the human did not read the new text, so the concept is not human-reviewed until a human confirms it again.
Trust tiers are advisory signals, not access control. Consumers MUST NOT reject an unverified concept.
Links and path fields use the same resolution rules:
https:) is an absolute URL./ resolves from the bundle root.Both in-bundle forms are valid. v0.2 recommended / for links; v0.3 does not prefer one form. Consumers MUST resolve both. A value that resolves outside the bundle root is external — consumers MUST NOT read it from the local filesystem.
Paths are case-sensitive URI references. Percent-encode spaces (my%20concept.md).
Broken links are explicitly permitted — they can represent knowledge not yet written. [[wikilinks]] are not OKF links.
When writing a path field from the bundle root, use a leading /. A bare path such as references/attesters/foo.py now resolves from the file's own directory, not from the bundle root (a v0.3 breaking change; see Migrate v0.2 to v0.3).
When the user wants to create an OKF bundle from scratch:
Ask: What knowledge are we capturing? (tables, metrics, APIs, playbooks, etc.) Organize into a directory tree that makes sense for the domain.
Each concept = one .md file. Minimal conformant example:
---
type: Metric
---
# Monthly Recurring Revenue (MRR)
Sum of all active subscriptions normalized to a monthly amount.
Full v0.3 example with provenance and trust:
---
type: Metric
title: Monthly Recurring Revenue
description: Sum of all active subscription revenue normalized to monthly.
tags: [revenue, saas, kpi]
status: stable
generated: { by: "human:ftelles", at: "2026-08-25T10:00:00Z" }
verified: { by: "human:finance-lead", at: "2026-08-25T14:00:00Z" }
stale_after: "2026-12-31T00:00:00Z"
sources:
- id: stripe-docs
resource: https://stripe.com/docs/billing/subscriptions
title: Stripe Subscription Billing
author: "team:stripe-docs"
last_modified: "2026-06-01T00:00:00Z"
---
# Monthly Recurring Revenue (MRR)
## Definition
Sum of all active subscriptions normalized to a monthly amount.[^stripe-docs]
Excludes one-time fees and overages.
## Formula
`MRR = Σ(active_subscription_monthly_value)`
## Related
- [Churn Rate](./churn.md) uses MRR as denominator
- [ARR](./arr.md) = MRR × 12
[^stripe-docs]: Stripe Subscription Billing
For more examples across domains, see references/examples.md.
Use standard markdown links. Two valid forms:
/): [customers](/tables/customers.md)[churn](./churn.md) or [customers](../tables/customers.md)Links assert relationships. The kind of relationship is conveyed by surrounding prose, not by the link syntax. Broken links are explicitly permitted — they represent knowledge not yet written.
When claims reference external sources, use sources in frontmatter and footnotes in body:
sources:
- id: ga4-schema
resource: https://developers.google.com/analytics/bigquery/export-schema
title: GA4 BigQuery Export schema
The `events_` table is sharded daily as `events_YYYYMMDD`.[^ga4-schema]
[^ga4-schema]: GA4 BigQuery Export schema
The footnote label is the join key into sources. Consumers match on id, not on footnote text or list position.
Place in any directory for progressive disclosure. Subdirectory indexes have no frontmatter. Format:
# Metrics
- [MRR](./mrr.md) - Monthly recurring revenue
- [Churn](./churn.md) - Monthly churn rate
- [NPS](./nps.md) - Net Promoter Score
Entries should include the description from the linked concept's frontmatter.
A producer that regenerates index.md MUST keep the existing frontmatter of the bundle-root index.md.
Chronological change history, newest first, ISO 8601 date headings. No frontmatter.
# Update Log
## 2026-08-25
- **Creation**: Added MRR, Churn, and NPS metrics.
- **Creation**: Established directory structure.
## 2026-08-20
- **Initialization**: Bundle created.
Bundle-root index.md SHOULD include frontmatter declaring the spec version, plus a title, a one-sentence description (scope and when to use the bundle), and an optional license (SPDX expression or path to a license file):
---
okf_version: "0.3"
title: My Knowledge Bundle
description: Tables, metrics, and playbooks for the sales org. Use it for revenue and pipeline questions.
license: CC-BY-4.0
---
# My Knowledge Bundle
- [Tables](./tables/) - Database tables
- [Metrics](./metrics/) - Business KPIs
These keys apply to the bundle, not to the concepts in it. Quote okf_version as a string.
A bundle can be distributed as:
A bundle is conformant with OKF v0.3 when:
.md file under the bundle root parses as a YAML mappingindex.md, log.md) follows §8 / §9 when presentA .md file without frontmatter or without type is not a concept. It does not make the bundle non-conformant. Validators SHOULD warn about it.
Attested Computations are concepts that carry not just what a value means but a sanctioned way to compute it. Use them when you need verifiable, reproducible calculations.
---
type: Attested Computation
title: Revenue for fiscal year
description: Recognized revenue for a fiscal year, per Finance's definition.
tags: [finance, revenue]
status: stable
runtime: bigquery
parameters:
- { name: year, type: integer, required: true }
executor:
resource: /references/skills/run-on-bq.md
receipt: [job_id, executed_sql, result]
attester:
resource: /references/attesters/sql-equality.py
generated: { by: reference_agent/gemini-2.5-pro, at: "2026-06-20T14:00:00Z" }
verified: { by: "human:ahormati", at: "2026-06-25T09:00:00Z" }
stale_after: "2026-12-31T00:00:00Z"
sources:
- id: rev-policy
resource: https://wiki.acme/finance/revenue-recognition
title: Revenue recognition policy
author: "team:finance-fpa"
last_modified: "2026-04-02T00:00:00Z"
---
# Computation
```sql
SELECT SUM(amount) AS revenue
FROM finance.recognized_revenue
WHERE fiscal_year = @year
```
The computation binds only the declared `parameters`, per the recognition
policy.[^rev-policy]
[^rev-policy]: Revenue recognition policy
parameters, never edits the computation itselfcomputation is set, that file is the computation and the body should not also have a fenced block. If it is absent, the computation is the first fenced code block in the # Computation section (any ATX level; the section ends at the next heading of the same or a higher level)ok and an optional reasonverified confirms the definition still agrees with policy (recorded in the bundle). Attestation confirms one run used the sanctioned computation (a runtime artifact; the bundle does not record it)Other concepts link to Attested Computations:
---
type: Metric
title: Revenue
---
# Definition
Recognized revenue for a fiscal year, computed by
[the revenue computation](../computations/revenue.md).
validate.py (when available)The official repo ships skills/okf-generate/scripts/validate.py (Python 3, PyYAML). If that script is reachable, prefer it — it implements the v0.3 rules, including current-only trust tiers, path-resolution fallbacks, and reserved-file checks.
python3 /path/to/okf-generate/scripts/validate.py ./bundle/
# add --strict to treat warnings as failure
The official repo also has agent skills okf-generate and okf-consume. This catalog skill stays a self-contained guide with a bash fallback; it does not replace those official skills.
okflint is a dedicated Python linter for OKF bundles with 18 rules across 3 tiers (OKF core, profile, hygiene). If it is installed and the official script is not available, prefer it over the built-in bash script. Confirm which OKF version your installed okflint targets before treating its results as v0.3 conformance.
Agent behavior: Before validating, check for the official script, then command -v okflint. If neither is available, ask the user:
"O validador oficial (
validate.pydo repositório open-knowledge-format) não está acessível, e o okflint (linter comunitário para OKF, profiles via manifesto e suporte a wikilinks) não está instalado. Quer que eu instale o okflint, aponte ovalidate.pyoficial, ou siga com a validação básica do script bash embutido?
- Apontar o
validate.pyoficial (clone ou path do repositório)uv tool install okflint(isolado)pip install okflint- Seguir sem eles (script bash embutido)"
If the user agrees to install okflint:
# Option 1: uv (recommended — installs isolated, no venv needed)
uv tool install okflint
# Option 2: pip (installs in current environment)
pip install okflint
# Verify installation
okflint --version
After installation (or if already available):
# Full validation with manifest (if okf-base.yaml exists)
if [ -f okf-base.yaml ]; then
okflint validate --manifest okf-base.yaml ./bundle/
else
# Core OKF validation only (no manifest needed)
okflint validate ./bundle/
fi
okflint advantages over the built-in script:
--json) for CI pipeline parsing0 = pass, 1 = conformance failure, 2 = bad manifestWhen the official validator and okflint are not available, use scripts/validate.sh. It checks v0.3 conformance plus trust, lifecycle, and provenance signals.
When asked to validate, apply the two conformance rules and report:
✅ PASS: 12 concept files; all present frontmatter parses
✅ PASS: reserved index.md / log.md follow structure
⚠ WARNING: 1 file is not a concept (no type) — permitted in v0.3
⚠ WARNING: 2 broken cross-links (permitted but worth noting)
ℹ INFO: 5 files with current trust fields (generated/verified)
ℹ INFO: 1 concept lost its trust tier (verification older than generated.at)
ℹ INFO: 2 Attested Computation concepts found
E3: Reserved file {path} has unexpected structure (subdirectory index.md with frontmatter; log.md with frontmatter)Unparseable frontmatter, when detected, is also a conformance failure (spec §11.1). The bash fallback cannot always parse YAML; prefer validate.py for that check.
W1: Missing recommended field title or descriptionW2: Broken cross-link {link} in {file}W3: Using legacy timestamp instead of generatedW4: No index.md in directory {dir}W5: log.md dates not in ISO 8601 YYYY-MM-DD format, or not newest firstW6: sources entry missing resource fieldW7: stale_after date has passed — content is stale (check again, not "false")W8: File is not a concept (no frontmatter, or frontmatter without type)W9: Attested Computation missing required runtime field (consumers cannot treat it as attested)W10: superseded_by present without status: deprecatedW11: Unknown status value — consumers treat the concept as not currentI1: No verification is current (each verified event is older than generated.at) — trust tier is unverifiedI2: Attested Computation has no attester — consumers cannot show values as attestedConsumers MUST NOT reject a bundle because of: missing optional fields, unknown type values, unknown extension keys, broken links, or missing index files. A null, empty string, or empty list is the same as an absent key. Where a field is a list (tags, sources, verified, parameters), a single item counts as a one-item list.
When the user has existing OKF concepts that need enrichment:
For data assets, add # Schema with a columns table:
# Schema
| Column | Type | Description |
|--------|------|-------------|
| `order_id` | STRING | Unique identifier |
| `customer_id` | STRING | FK to [customers](/tables/customers.md) |
For APIs, queries, or tools, add # Examples with fenced code blocks showing usage.
Add sources to frontmatter and footnotes to body for per-claim attribution:
sources:
- id: official-docs
resource: https://example.com/docs
title: Official Documentation
author: "team:product-docs"
last_modified: "2026-07-15T00:00:00Z"
generated: { by: reference_agent/gemini-2.5-pro, at: "2026-08-25T10:00:00Z" }
verified: { by: "human:domain-expert", at: "2026-08-25T14:00:00Z" }
status: stable
stale_after: "2026-12-31T00:00:00Z"
Only add stale_after when a review date is actually known. Do not invent one. After a meaningful rewrite, update generated.at and do not treat earlier verified events as current.
Keep the file, set status: deprecated, and add superseded_by when a replacement exists. When you rename or move a concept, leave a short deprecated stub at the old path so existing links keep working.
Weave links into natural prose. Don't create a standalone "links" section — express relationships in context where they're meaningful.
If title, description, tags are missing, add them. Derive values from body content when possible. Write tags as a YAML list.
Unknown keys are allowed at any level, including inside sources, generated, verified, executor, and attester. Keep keys you do not recognize. Name new keys x-<producer>-<name> (for example x-acme-owner); future OKF versions will not define keys that start with x-.
The official enrichment agent follows this pattern — apply the same logic manually:
sources from authoritative documentationindex.md files for progressive disclosure; keep existing root frontmattergenerated and optionally verified for trust trackingv0.3 has two breaking changes. Both alter how a consumer reads a v0.2 value.
| Change | Effect on v0.2 bundles | Fallback |
|---|---|---|
A path field without a leading / resolves from the directory of its file | Bare paths that v0.2 examples wrote from the bundle root do not resolve | For bundles that declare okf_version 0.2 or earlier, or no version, the consumer MAY try the bundle root |
| Only current verification events give the trust tier | Some concepts go from human-reviewed to a lower tier | None. The tier can only go down, which is the safe direction |
okf_version: "0.3" on the root index.md, and add title and description (optional license)/ that was written from the bundle root, and add the /log.mdtags value to a YAML list, and split a comma-separated string into separate tags. Example: tags: sales, orders becomes tags: [sales, orders]. (Consumers of a leftover scalar will treat it as one tag and MUST NOT split on commas.)superseded_by to each deprecated concept that has a replacementgenerated.atstatus is not stableparameters entries require name and type; required defaults to false/ and relative paths are validteam: is a defined actor schemeStill applies when a bundle (or some files in it) uses v0.1 forms. After these steps, do the v0.2 → v0.3 migration above.
timestamp → generated.at
# v0.1
timestamp: 2026-05-28T22:53:05Z
# v0.3
generated: { by: "human:author", at: "2026-05-28T22:53:05Z" }
# Citations → sources
# v0.1 body
# Citations
[1] https://example.com/docs
# v0.3 frontmatter
sources:
- id: docs
resource: https://example.com/docs
title: Example Documentation
If you do not know the producer, keep timestamp. Consumers MAY use it when generated is absent. Consumers MAY also parse a legacy # Citations body list when sources is absent.
For detailed conversion guides, see references/conversion.md.
Notion export: Properties → frontmatter. Remove UUID suffixes from filenames. Convert Notion links → relative markdown links. Map last-edited dates to generated, not to the legacy timestamp field.
Obsidian vault: Convert [[wikilinks]] → [title](./file.md). Ensure type field exists. Move inline #tags to frontmatter as a YAML list.
CSV/spreadsheet: Each row = one concept. Map columns to frontmatter fields. First column = filename.
type, ask. If you don't have schema info, leave it out. No fabricated URLs, column names, or stale_after dates.x-<producer>-<name> for new keys.type (required) + recommended fields that are warranted. Don't pad with empty values.verified by human: if actually human-reviewed. Don't fabricate verification. After a meaningful rewrite, update generated.at; do not treat older human reviews as current.index.md at the bundle root, preserve the existing frontmatter.tags value is one tag.Google Cloud's Knowledge Catalog natively ingests OKF bundles and serves them to agents. This is the enterprise path — optional but powerful.
kcmd is a bidirectional sync tool between OKF-like local metadata and Knowledge Catalog. Think "git for metadata."
# Initialize from BigQuery dataset
kcmd init --bigquery-dataset <project>.<dataset>
# Pull current state from catalog
kcmd pull
# Push local changes
kcmd push --dry-run
kcmd push
Also ships as an MCP server for agent integration:
{
"mcpServers": {
"kc-mac": {
"command": "kcmd",
"args": ["mcp", "--path", "/path/to/root"]
}
}
}
MCP tools: pull, push, list-entries, lookup-entry, modify-entry.
The official enrichment agent (Python, ADK, Gemini) auto-generates OKF bundles from BigQuery metadata. Two-pass architecture:
references/<slug> docControls: --web-seed-file, --web-max-pages, --web-allowed-host, --no-web.
The reference agent includes a visualize subcommand that renders any OKF bundle as a self-contained interactive HTML file:
python -m reference_agent visualize --bundle ./bundles/<name>
Features:
When to mention this to users: If they're enriching BigQuery datasets, point them to the reference agent in the canonical repo. If they want enterprise catalog integration, point to kcmd.
When creating a bundle, present results as:
generated.at do not count)saas-metrics/
├── index.md
├── log.md
├── metrics/
│ ├── index.md
│ ├── mrr.md
│ ├── churn.md
│ └── nps.md
└── computations/
└── mrr-calculation.md
Then show each file, then confirm:
Bundle is OKF v0.3 conformant ✅
- 4 concept files
- 1 Attested Computation
- 3 human-reviewed, 1 unverified (current events only)
- 0 stale concepts
What SKILL.md sets; muted values are Claude Code's defaults
/fabricioctelles-okf-skills-okf-open-knowledge-format:okf-open-knowledge-formatfrom okf
Generated from the plugin's indexed repository (fabricioctelles/skills) — no native marketplace selected
npx claudepluginhub p/fabricioctelles-okf-skills-okf-open-knowledge-formatOther plugins' skills for the same job