okf-reader
Installation
SKILL.md
OKF Bundle Reader Guidance Skill
Procedural rules for reading and traversing any OKF bundle efficiently, no matter how its producer organized it. Following them reduces token consumption, speeds execution, and avoids recursive directory walks.
OKF is deliberately flexible: the directory layout, the concept type values, and whether concepts cross-link are all producer-defined. So these rules key off the spec's universal structures — frontmatter type, index.md, markdown links, and resource — and never off any one source's conventions (there is no required tables/ folder, no fixed type vocabulary, no guaranteed cross-links).
When to Use
Load this skill whenever you are tasked with reading, parsing, querying, or analyzing an existing OKF bundle.
Instructions for Agents
1. Index-first discovery (descend nested indexes)
- Rule: NEVER recursively read or load every markdown file at startup.
- Protocol:
- Read the bundle-root
index.mdfirst if present — it is the directory listing. - Follow its links to map the available concepts. The index may be flat (every concept — including container/directory concepts — listed at the root as peers) or hierarchical (subdirectories carry their own
index.mdor sub-index concept). Descend any nested indexes for progressive disclosure instead of walking the tree. - If there is no
index.md, discover concepts cheaply — a shallow listing or a*.mdglob — without reading bodies yet. - Sanity-check it is an OKF bundle: concept files have YAML frontmatter with a
type; the rootindex.mdmay declareokf_version.
- Read the bundle-root