by serradura
okf-gem: The complete OKF harness (skills + CLI + server)
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
# Add to your Claude Code skills
git clone https://github.com/serradura/okf-gemGuides for using ai agents skills like okf-gem.
okf-gem (okf on RubyGems) is the complete harness for
Open Knowledge Format (OKF) v0.1 bundles: create, maintain, and consume
your project's knowledge with your agent. The package is Agent Skill + CLI/Lib + Graph: an agent skill that authors and curates, a CLI and Ruby library that validate, lint, search, and embed, and a graph to explore, live or static, in one gem that runs 100% local. A bundle is a directory of Markdown files with YAML frontmatter that humans and agents read from one source; each file is a concept. The gem does not define a new place to keep knowledge; it gives you leverage over knowledge that already lives as Markdown.
The package, end to end:
Over a bundle the gem gives you the okf
command-line tool (the library API is also usable in-process). Each capability
below links to the concept that documents it: this gem's own knowledge is an OKF
bundle, so you can read its design in the format it defends.
| Capability | What it answers | Verb |
|---|---|---|
| Companion agent skill | Can an agent author it? | skill |
| Conformance validator | Is this a legal OKF bundle? (§9) | validate |
| Curation linter | Is it navigable, complete, fresh? | lint / loose |
| Interactive graph | Explore it — live or static? | server / render |
| Library API | Can my Ruby program use it? | in-process |
[!TIP] Browse the gem as knowledge, not just docs. This README is the front door; the depth lives in the
.okf/bundle this repo ships. Start at the overview, then follow the graph into the capabilities (what it does), the design constraints (why it stays this light), and the format itself (what it operates on). Runokf server .okfto walk the same bundle as an interactive graph.
It is deliberately light so it runs on the Ruby your OS already ships:
rack (the server is a mountable Rack app)
and webrick (unbundled from Ruby in 3.0);That range is not aspirational: CI runs the full test suite and RuboCop on every one of these on each push.
Project knowledge (why a service exists, what a metric really measures, the reasoning a schema encodes) lives scattered across wikis, code comments, and whoever happened to be in the room, and an agent re-derives it every session. OKF gives it one durable, diffable home, versioned next to the code it describes and read from the same file by people and agents alike. OKF is an open, vendor-neutral format (Google Cloud, 2026); this gem is the Ruby-native way to work with it.
Knowledge already has several homes near an agent, and each holds a different thing. None of the others is built for curated, durable team knowledge:
| OKF bundle (this) | CLAUDE.md / AGENTS.md |
Agent auto-memory | Wiki / Notion | |
|---|---|---|---|---|
| Holds | curated team knowledge | standing instructions | what one agent picked up | human docs |
| Versioned with the code | ✅ | ✅ | ❌ | ❌ |
| Portable across agents | ✅ plain Markdown + YAML | ⚠️ per-harness conventions | ❌ per-agent store | ⚠️ export needed |
| Typed and queryable | ✅ frontmatter + graph | ❌ prose | ❌ | ⚠️ partially |
| Reviewed in PRs | ✅ | ✅ | ❌ implicit | ⚠️ rarely |
| Scales past one context window | ✅ progressive disclosure(okf index + search) |
❌ loaded whole | ⚠️ partially | n/a |
| Checked by tooling | ✅ exit codes for CI(okf validate + lint) |
❌ | ❌ | ❌ |
The last two rows are this gem's job. Scaling past one context window is
progressive disclosure — okf index reads the map, okf search pulls only the
concepts a task needs, so the bundle is never loaded whole. And drift never
hides here: the other homes have no detector, but okf validate and lint turn
a bundle's drift into findings you can gate on in CI.
A bundle is just a directory; each concept is one Markdown file whose path is its id. This repo documents itself in OKF, so the tree below is real:
.okf/
├── index.md # progressive-disclosure map (root carries okf_version)
├── log.md # ISO-dated change history, newest first
├── overview.md
├── format/frontmatter.md
├── model/graph.md
└── capabilities/graph-server.md # one concept = one file
The only hard requirement is YAML frontmatter with a non-empty type; everything
else is optional and tolerated when missing. A concept (here the real
capabilities/graph-server.md, body trimmed) reads:
---
type: Capability
title: Interactive graph server (server)
description: A self-contained HTML knowledge graph served over HTTP, and a mountable Rack app.
resource: lib/okf/server/app.rb
tags: [server, graph, rack, diagram]
timestamp: 2026-07-11T12:00:00Z
---
# Overview
`okf server` boots an interactive view of the [graph](../model/graph.md) …
That bundle is this gem's own documentation. Clone the repo and run
okf server .okf to browse it as the graph diagrammed at the top of this file.
In Claude Code, the plugin is the fastest path: two commands install the whole toolchain (skill,
/okf:gem, and the curation hook). See Claude Code plugin. Everywhere else, install the gem:
| Ruby version | 2.4 | 2.5 | 2.6 | 2.7 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 4.0 |
|---|---|---|---|---|---|---|---|---|---|---|
| Tested/Supported | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
gem install okf
# or, in a project
bundle add okf
From a ch
okf-gem is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by serradura. okf-gem: The complete OKF harness (skills + CLI + server). It has 50 GitHub stars.
okf-gem's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/serradura/okf-gem" and add it to your Claude Code skills directory (see the Installation section above).
okf-gem is primarily written in Ruby. It is open-source under serradura on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh okf-gem against similar tools.
No comments yet. Be the first to share your thoughts!