okf
Skill66 starsChanged 2 months agoMITView on GitHub
Create, read, maintain, and visualize Open Knowledge Format (OKF) bundles — directory trees of Markdown "concept" files with YAML frontmatter that link into a knowledge graph. Triggers on `/okf` (and `/okf init|update|query|validate|viz`). Use when asked to capture a project's knowledge as OKF, keep an okf/ bundle in sync after changes, navigate a bundle to answer a question, or when a folder of .md files carries a `type:` frontmatter field (the Google Cloud Open Knowledge Format).
- Installs packages
11 other projects use a version of this.
Adopted by
Most recently taken up by
- scaccogatto/okf-skillstheir own version, first seen Sep 28, 2026
- cofin/flowtheir own version, first seen Sep 26, 2026
- k3ybladewielder/skillstheir own version, first seen Sep 20, 2026
- serradura/okftheir own version, first seen Sep 2, 2026
- gannonh/skillstheir own version, first seen Aug 24, 2026
- dribbaengineering/dribbatheir own version, first seen Aug 22, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- scaccogatto/okf-skills★ 407same name
- serradura/okf★ 172same name
- gannonh/kata-symphony★ 67same name
- saschb2b/skills★ 19same name
- cofin/flow★ 17same name
- eloybar/okf-skills★ 4same name
- EwenSellitto/skills★ 4same name
- k3ybladewielder/skills★ 4same name
- 18studio/simple_okf★ 3same name
- gannonh/skills★ 2same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 2 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Default bundle directory: okf/ in the current project (override with [path]).
- Distinctive: line 41
Run the matching flow below.
- Very specific: line 57
Links: use ordinary Markdown and keep .md.
- Very specific: line 69
Honesty: never invent a resource, a date, or a description.
- Distinctive: line 130
Write each concept: valid frontmatter + a faithful Markdown body distilled from the source (keep tables, code, key numbers.
- Very specific: line 132
Add a root index.md declaring okf_version: "0.2" plus a per-directory index.md.
- Very specific: line 133
Start log.md with an Initialization entry.
- Very specific: line 143
Find what changed: Prefer git: git status / git diff since the most recent date in log.md (or since the last commit).
- Very specific: line 148
Create/update the affected concept files.
- Very specific: line 152
Update the relevant index.md when concepts are added/removed/renamed.
- Very specific: line 162
Use frontmatter (type, tags, description) as the quick-query layer.
- Very specific: line 163
Check log.md for "what changed".
- Very specific: line 189
Run python <skill-dir>/scripts/visualize.py <bundle> to (re)generate viz.html (interactive graph) and graph.mmd (aggregated Mermaid).
- Very specific: line 194
Create one new concept file in the right directory with valid frontmatter, link it to/from related concepts, add it to the directory …
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/okf — OKF Knowledge
Open Knowledge Format (OKF) is a vendor-neutral spec (Google Cloud, v0.2) for sharing knowledge as plain Markdown. A bundle is a directory tree of files where each non-reserved file is one concept (a table, a module, an endpoint, a metric, a runbook…) with YAML frontmatter, and concepts link to each other to form a knowledge graph. No SDK, no runtime — just git-versionable text.
v0.2 keeps the v0.1 core (below) and adds optional provenance, trust, lifecycle, and
attestation families — see "OKF v0.2 additions" further down. A v0.1 bundle (using
timestamp and a body # Citations list) stays fully conformant; those are legacy fallbacks
consumers must still accept.
This skill is command-driven: the user runs /okf <subcommand> and you follow the matching
flow below to build, sync, read, validate, or visualize a bundle.
Usage
/okf # smart default: sync the okf/ bundle if it exists, else offer to init
/okf init [path] # build a new OKF bundle from this project's code + docs
/okf update [path] # sync the bundle with what changed; fix links, append log.md, validate
/okf query "<question>" # answer by navigating the bundle, index-first (no full-file dumps)
/okf validate [path] # run conformance + lint checks
/okf viz [path] # (re)generate viz.html + graph.mmd
/okf add "<thing>" # add one new concept and wire its linksDefault bundle directory: okf/ in the current project (override with [path]).
What to do when invoked
- Parse the subcommand (no subcommand → smart default: if
<project>/okf/exists runupdate, otherwise proposeinit). - Resolve the bundle directory (arg, else
okf/). - Run the matching flow below.
- Always finish by validating and fixing every error:
python <skill-dir>/scripts/validate.py <bundle> --strict(<skill-dir>= this SKILL.md's directory;scripts/andresources/are its siblings. Bothvalidate.pyandvisualize.pyneed PyYAML —pip install pyyaml.)
The format in one screen
- A concept = one
.mdfile. Concept ID = its path within the bundle minus.md(modules/openrouter-client.md→modules/openrouter-client). - Frontmatter is delimited by
---. The only required field istype(a non-empty string). Recommended, in order:title,description(one sentence),resource(a URI),tags(YAML list). Optional provenance/trust/lifecycle families — see "OKF v0.2 additions" below. - Links use ordinary Markdown and keep
.md. Prefer absolute, bundle-relative:[customers](/data/customers.md). - Reserved files at every level:
index.md(navigation / progressive disclosure) andlog.md(chronological history, newest first). They carry notype. Only the bundle-rootindex.mdmay carry frontmatter, and onlyokf_version: "0.2". - Conventional body headings:
# Schema(structural/schema sections),# Examples(usage examples),# Computation(the sanctioned code of anAttested Computation— see below). Other headings are free-form.# Citationsis a legacy v0.1 heading; new concepts use frontmattersources+ footnotes instead. - Links are untyped, directed relationships. An ordinary Markdown link
[B](B.md)in concept A means "A references B". No explicit edge labels or types are needed; the graph is implicit in the link structure. - Honesty: never invent a
resource, a date, or adescription; never create a broken link; one concept per file; keep every concept reachable from anindex.md.
---
type: BigQuery Table
title: Orders
description: One row per completed customer order.
resource: bigquery://acme/sales/orders
tags: [sales, orders]
generated: { by: human:maintainer, at: 2026-05-28T00:00:00Z }
---See resources/example-bundle/ for a complete reference bundle.
OKF v0.2 additions (all optional)
Four families on top of the v0.1 core above. Absence of any of them is fine — never reject a
concept for missing them; a plain type-only concept stays fully conformant.
- Provenance —
sources: a list of{ id, resource, title, author, usage_count, last_modified }the concept derives from (resourceis required per entry). Attribute one claim with a Markdown footnote whose label is asources[].id:claim.[^src-id]…[^src-id]: Source title. - Trust —
generated/verified:generated: { by, at }records who/what produced the current content (byrequired);verifiedrecords independent confirmations, as one{ by, at }mapping or a list of them. Actor convention:<producer>/<version>for agents,human:<id>for people,process:<id>for automated processes. Trust tier (derived, not stored): noverified→ unverified; non-human:verifier(s) only → machine-confirmed; anyhuman:verifier → human-reviewed. - Lifecycle —
status/stale_after:status: draft|stable|deprecated(defaultstable);stale_after: <ISO 8601 instant>— content is stale oncenow >= stale_after. - Attestation —
type: Attested Computation: a standalone concept carrying a sanctioned computation so a consumer can confirm it (not an agent's improvisation) produced a value:runtime(required for this type, e.g.bigquery/dbt/python),parameters(a{ name, type, required }list),computation(a path to the code, or a body# Computationfence),executor: { resource, receipt },attester: { resource }(deterministic, no-LLM check code). AMetricor table links to it instead of embedding raw SQL.
Breaking, with an accepted fallback: timestamp → generated.at; a body # Citations
list → sources + footnotes. A v0.1 concept using the old fields stays fully conformant —
consumers fall back to them when the v0.2 field is absent. During /okf update, migrate a
concept you're already touching to the new fields; don't rewrite the whole bundle in one pass
just to bump fields.
Full spec: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/main/SPEC.md
Flows
/okf init — build a bundle
- Inventory the concepts: one file per atomic unit (table/collection, endpoint, module, metric, playbook, system…). Choose a directory layout that fits the domain.
- Fix the full path list first — this is what makes cross-links valid. For a large source, list every concept's path/type/title before writing bodies.
- Write each concept: valid frontmatter + a faithful Markdown body distilled from the source (keep tables, code, key numbers; never invent). Link related concepts (absolute paths).
- Add a root
index.mddeclaringokf_version: "0.2"plus a per-directoryindex.md. - Start
log.mdwith an**Initialization**entry. - Validate
--strict; fix everything. Offer/okf viz.
For bulk import from a source of truth (DB schema, dbt manifest, OpenAPI, an existing doc),
map one concept per asset and leave description empty rather than inventing it.
/okf update — sync after changes (the on-demand maintain)
This is the everyday command. Bring the bundle back in line with reality:
- Find what changed. Prefer git:
git status/git diffsince the most recent date inlog.md(or since the last commit). If git is unavailable, ask the user "what changed?". - Map changes to concepts: a new route →
endpoints/<x>.md; a changed module →modules/<y>.md; a renamed file → rename its concept and update every inbound link (search the whole bundle for the old path). - Create/update the affected concept files; refresh each changed file's
generated: { by, at }(or its legacytimestamp, if that's the field the concept already uses). - Keep links valid — but never rewrite links inside historical
log.mdentries (dangling history is expected and exempt from the link check). - Update the relevant
index.mdwhen concepts are added/removed/renamed. - Append a dated entry to
log.md(newest first) with the right convention word (Creation / Update / Removal / Fix / Deprecation), linking the affected concept(s). - Validate
--strict; fix; offer to refreshviz.
/okf query "<question>" — read
- Start at the root
index.md(if absent, build a map from the tree + each file's frontmatter). Follow only the links relevant to the question — do not dump every file. - Use frontmatter (
type,tags,description) as the quick-query layer; bodies for detail. - Check
log.mdfor "what changed". Answer, citing the concepts you used by path.
/okf validate [path]
Run python <skill-dir>/scripts/validate.py <bundle> --strict.
Conformance errors (always checked — failing any is a spec violation):
- Parseable YAML frontmatter on every concept file.
- Non-empty string
typeon every concept file. - Reserved-file structure (
index.md/log.mdmust not carry atype).
Producer lints (warnings, enabled by --strict): broken intra-bundle links, links missing
the .md extension, orphan concepts unreachable from any index.md, missing recommended fields
(title, description); malformed optional v0.2 families when present (generated missing
by, a verified/sources entry missing a required sub-field, non-ISO-8601 dates, an invalid
status, an Attested Computation missing runtime); and migration nudges for the two legacy
v0.1 fields (timestamp without generated, a body # Citations heading). These are not
spec violations — they flag quality issues in the producer (the tool generating the
bundle). Consumers must tolerate bundles that have lint warnings; they are never grounds to
reject a bundle.
Report results; fix errors. Lint warnings should be fixed too, but they do not make a bundle non-conformant.
/okf viz [path]
Run python <skill-dir>/scripts/visualize.py <bundle> to (re)generate viz.html (interactive
graph) and graph.mmd (aggregated Mermaid). It reads the explicit concept links — no LLM.
/okf add "<thing>"
Create one new concept file in the right directory with valid frontmatter, link it to/from
related concepts, add it to the directory index.md, log a **Creation** entry, validate.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

