okf-knowledge skill
The /okf skill builds a Markdown knowledge graph from code and docs in the Open Knowledge Format and keeps it up to date.
- 66 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The skill creates and edits bundle Markdown files in the project and runs a Python validation script.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/okf-knowledgeDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The skill creates and edits bundle Markdown files in the project and runs a Python validation script.
This is third-party code. Review the repository files before installing.
What it does
okf-knowledge is a Claude Code skill with the `/okf` command for Open Knowledge Format bundles. OKF is a vendor-neutral Google Cloud specification: knowledge lives as a directory of small Markdown files, one file per concept (a table, a metric, a runbook), and links between files form a graph. The skill builds such a bundle from a project's code and docs, updates it after changes, answers questions by following links from `index.md`, checks format conformance and draws the graph. Commands: `/okf init [path]`, `/okf update [path]`, `/okf query "question"`, `/okf validate [path]`, `/okf viz [path]` and `/okf add "concept"`. The check is run by the `okf/scripts/validate.py` script. The agent follows links and reads only the files it needs, so a question costs a few small files.
Who it is for. Teams whose project knowledge is scattered across wikis, READMEs and chats and whose agent needs a compact, verifiable version.
Good fit when
- A huge README is read whole or not at all and must be split into linked concepts.
- After code changes the knowledge bundle needs updating, links fixing and the log extending.
- An agent must answer a project question by reading three small files starting from `index.md`.
- The knowledge structure has to be shown to people as an interactive graph.
Not a fit when
- You need a full vector-database search system: an OKF bundle can only serve as its corpus.
- The agent needs guarantees: the author calls the project quickly vibe-coded and gives no promises.
- You need an official Google tool: the project is independent and not affiliated with Google or Anthropic.
Example request
Run `/okf init`: build a knowledge bundle from this project's code and docs and check it with `/okf validate`.Limitations
The author calls the project quickly vibe-coded, unofficial and shipped as is with no guarantees. Validation needs Python 3.7 or newer and the package from `requirements.txt` (PyYAML). The `/okf` command works after the `okf` folder is copied into `~/.claude/skills/`. To keep the bundle in step with the code, add a request to run `/okf update` after changes to the project `CLAUDE.md`. The OKF 0.2 specification lives in a separate Google Cloud repository and may change.
How to disable. Delete the `~/.claude/skills/okf` folder. The knowledge bundle in your project's `okf/` directory stays as ordinary Markdown files and is removed by hand.
FAQ
How do I install the skill?
Clone the repository, run `pip install -r requirements.txt` and copy the `okf` folder into `~/.claude/skills/`. The `/okf` command then works in every project.
What is an OKF bundle?
A tree of Markdown files: each file describes one concept, the YAML header requires only the `type` field, and links between files form a graph. Two names are reserved: `index.md` and `log.md`.
How do I validate a bundle?
The `/okf validate` command or the `python okf/scripts/validate.py <path>` script. The repository example should give 10 files and 0 errors.
How do I keep the bundle current?
Add a line to `CLAUDE.md` asking to run `/okf update` after any change to code or docs.
Is it an official Google tool?
No. The OKF specification is developed by Google Cloud, while the skill is independent and not affiliated with Google or Anthropic.
Discussion
No questions or reviews yet.
Related
SkillsOKF Skills
okf-skills
Tools for the Open Knowledge Format from Google Cloud: writing, validating and visualizing knowledge packs. A third-party set and not from Google
One HTML page for any topic: CSS diagrams, a concept map and references that each say what they support.
Learn from materials
learn-from-materials
A skill that turns books, PDFs, slides and documents into a traceable knowledge base and an interactive learning page with sources, maps and self-check
Skills for Claude Code and Codex turn PDF, DOCX and HTML into a local knowledge base with the original, full text and summary.
An installable skill that gives an agent the full official OpenClaw documentation with progressive disclosure and a daily-synced snapshot
Ten research skills for Claude Code and Codex: figures, conference and journal papers, grants, peer review and code release
README in short
The repository describes itself as an OKF bundle in `okf/resources/self-bundle`: the command, the validator, the rules and the design decisions are linked concepts. It ships a 10-file example, 78 tests and an MIT licence.
README badge
Original SKILL.md
--- name: okf description: 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). --- # /okf — OKF Knowledge Open Knowledge Format (OKF) is a vendor-neutral spec ([Google Cloud](https://github.com/GoogleCloudPlatform/open-knowledge-format), 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 links ``` Default bundle directory: **`okf/`** in the current project (override with `[path]`). ## What to do when invoked 1. Parse the subcommand (no subcommand → **smart default**: if `<project>/okf/` exists run `update`, otherwise propose `init`). 2. Resolve the bundle directory (arg, else `okf/`). 3. Run the matching flow below. 4. **Always finish by validating** and fixing every error: `python <skill-dir>/scripts/validate.py <bundle> --strict` (`<skill-dir>` = this SKILL.md's directory; `scripts/` and `resources/` are its siblings. Both `validate.py` and `visualize.py` need PyYAML — `pip install pyyaml`.)