
okf
Author, maintain, and consume Open Knowledge Format (OKF) knowledge bundles — portable markdown + YAML frontmatter that both humans and agents read. Use when capturing project knowledge (services, APIs, schemas, metrics, runbooks, decisions) into an OKF bundle, when updating one after code or docs change, or when a repository contains an .okf/ (or other OKF) bundle that should inform the task. Triggers on: "document this in OKF", "update the knowledge bundle", "capture this as a concept", or any work in a repo that has an OKF bundle.
- Installs
- 1.1K
- Last 24h
- +12
- Trending rank
- #8070
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/scaccogatto/okf-skills --skill okf- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads okf automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Open Knowledge Format (OKF) skill
OKF represents knowledge as a directory of markdown files with YAML frontmatter. It is minimal by design: no schema registry, no runtime, no SDK. Your job is to produce, maintain, and consume OKF bundles conformant with the spec, not your memory of it.
Always read the canonical spec before non-trivial work: reference/SPEC.md. It is the verbatim OKF v0.2 specification and the source of truth for every rule below.
The one hard rule
A bundle is conformant (§11) iff: every non-reserved .md file has a parseable
YAML frontmatter block, and every such block has a non-empty type field.
Everything else is soft guidance. Consumers MUST tolerate missing optional
fields, unknown types, and broken links — never reject a bundle over them.
Conventions to apply
- One concept = one file. The file path (minus
.md) is the concept ID. - Frontmatter:
typeis required. Addtitle,description,tagswhen they aid consumption; addresource(a canonical URI) only for concepts bound to a real asset — omit it for abstract concepts. - Body: prefer structural markdown (headings, tables, lists, fenced code).
Conventional headings:
# Schema,# Examples,# Computation. - Cross-links: standard markdown links; prefer absolute bundle-relative
form (
/services/auth-api.md). A link asserts a relationship; its kind lives in the surrounding prose, not the link. - Reserved files:
index.md(directory listing, no frontmatter, except the bundle-root index, which may carryokf_versionand this plugin'supkeep: enforcedopt-in flag, plusrecursive: true(or a depthn: levels below the root,trueis 6) to make the hook watch nested git repos) andlog.md(ISO-dated history, newest first). Never use these names for concepts. - What goes in
log.md: lifecycle events only, written in the bundle-rootlog.md: a bundle created, a concept deprecated or retired, one concept superseding another, concepts regenerated after their source changed, a verification pass. Routine edits to a concept do not get an entry: itsgeneratedand git already record them. A log is append-only, so never rewrite or drop an existing entry.
The v0.2 families (all optional, all worth filling)
- Trust (§5.2):
generated: { by, at }— who produced the current content and when.verified: [{ by, at }]— who confirmed it since (a bare mapping is one entry). Writebyin the actor convention (§7):<producer>/<version>for an agent,human:<id>for a person,process:<id>for an automated job. Usehuman:whenever a person authored or signed off — consumers key trust tiers off that prefix. - Lifecycle (§5.4–5.5):
status: draft|stable|deprecated(absent means stable) andstale_after, an absolute ISO 8601 datetime (a bare date is tolerated), not a TTL. - Provenance (§5.1):
sources: [{ id, resource, title, author, usage_count, last_modified }]plus ausage_window: { from, to }sibling ofsourcesframing everyusage_count(an entry may carry its own to override it); ausage_countwithout a window warns.resourceis required per entry and may be a URL, a bundle path, or a scope descriptor. Attribute a specific claim with a markdown footnote whose label is the source'sid:…sharded daily.[^ga4-schema]plus a[^ga4-schema]: …definition. The label is the join key, it must match asources[].id. - Attestation (§10): a sanctioned computation is its own concept,
type: Attested Computation, carryingruntime(required),parameters,executor,attester, and the computation itself under# Computation(or acomputation:path). Concepts that need the value link to it. Never inline a number's SQL into the concept that narrates it.
Reading a v0.1 bundle? Two constructs were superseded (§13.1): timestamp
is now generated.at, and a body # Citations list is now sources. Read both,
write v0.2 — and when you touch a legacy concept in maintain mode, migrate
its frontmatter as part of the edit. The validator warns on both.
Templates to copy: concept, index, log.
Default bundle location
Use .okf/ at the repository root unless the project already uses another
location. Commit it alongside the code it describes — knowledge as code.
Modes
produce — create or extend a bundle
Starting a brand-new bundle? Use the init fast-path instead of hand-writing
the first files — it scaffolds a conformant index.md, log.md, and a
getting-started.md concept with full recommended frontmatter in one shot:
uv run "${CLAUDE_SKILL_DIR}/scripts/okf_init.py" <target-dir> [--title "..."]
It refuses to touch a directory that already has .md files unless --force
is given. Then extend it:
- Read reference/SPEC.md.
- Pick the source(s): code (derive concepts from source, READMEs,
docstrings, config), docs/wiki (distill pages into concepts, record the
originals in
sources), manual (decisions, playbooks, metrics). - Choose a directory layout by domain (e.g.
services/,datasets/,decisions/). One concept per file. - Write each concept from templates/concept.md: set a
descriptive
type, fill recommended fields, recordgeneratedand thesourcesyou actually read, cross-link related concepts. - Add/refresh
index.mdper directory (andokf_version: "0.2"in the root index). A new bundle gets a dated Creation entry inlog.md. Extending an existing one does not. - Validate (see below). Fix every error before finishing.
maintain — keep a bundle in sync with reality
- Identify which concepts the change affects (search by
resource, path, or topic). This bookkeeping is exactly what agents are good at — touch every affected file in one pass. - Update the body and
generated.at(with your own actor ingenerated.by); fix or add cross-links; create new concepts for new assets; mark removed assetsstatus: deprecatedand note the deprecation inlog.mdrather than silently deleting context. Facing a whole v0.1 bundle rather than a stray field? Do not hand-edit it — run the validator's--migrateonce. - Update the relevant
index.mdfiles. Append a datedlog.mdentry only if the change is a lifecycle event (see What goes inlog.md). - Validate.
consume — use a bundle as context
- Read the bundle-root
index.mdfirst for progressive disclosure, then follow links only into the concepts relevant to the task. - Weigh what you read:
status: draft/deprecated, astale_afteralready past, or noverifiedentry all mean "check before relying on this". Treat broken links as not-yet-written knowledge, not errors. - Need a number an
Attested Computationcovers? Run its computation with values bound to the declaredparameters— never write your own query. - If you learn something durable while working, switch to maintain and write it back.
Validation (do this before declaring done)
Never eyeball conformance — run the deterministic checker. Invoke the companion
validate skill (/okf:validate <bundle-dir> --strict), which ships the
checker. If that skill is not installed, run it directly:
uv run "${CLAUDE_SKILL_DIR}/../validate/scripts/okf_validate.py" <bundle-dir> --strict
Resolve every ERROR (hard §11 failures). Under --strict warnings also fail
the run (exit 1), so clear them too; drop --strict (or use --max-warnings N)
if you only want §11 conformance gated.
FAQ
What does the okf skill do?
Author, maintain, and consume Open Knowledge Format (OKF) knowledge bundles — portable markdown + YAML frontmatter that both humans and agents read. Use when capturing project knowledge (services, APIs, schemas, metrics, runbooks, decisions) into an OKF bundle, when updating one after code or docs change, or when a repository contains an .okf/ (or other OKF) bundle that should inform the task. Triggers on: "document this in OKF", "update the knowledge bundle", "capture this as a concept", or any work in a repo that has an OKF bundle.
How do I install okf?
Run npx skills add https://github.com/scaccogatto/okf-skills --skill okf in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/okf/ (personal) or .claude/skills/okf/ (project).
Which AI agents can use okf?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is okf safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains okf?
It is published by scaccogatto in scaccogatto/okf-skills. It has 1,081 recorded installs.
More from scaccogatto/okf-skills
validate
scaccogatto/okf-skills
Check that an Open Knowledge Format (OKF) bundle is conformant with the v0.2 spec (§11). Use when asked to validate, lint, or check an OKF bundle, or before committing changes to one. Runs a deterministic Python checker — not an eyeball pass. Also migrates a v0.1 bundle to v0.2 in place with --migrate.
visualize
scaccogatto/okf-skills
Render an Open Knowledge Format (OKF) bundle as a single self-contained, interactive HTML graph (viz.html) — concepts as nodes coloured by type and sized by body length, markdown links and bundle-internal sources as edges, a wiki-style detail panel with rendered markdown, v0.2 trust/lifecycle/provenance metadata, and "Links to" / "Cited by" backlinks, layout switching, per-type filter and search. Use when asked to visualize, graph, preview, or explore an OKF bundle.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.