How to Build OKF Bundles — Tools, Templates, and Step-by-Step Guide
Building an Open Knowledge Format bundle is simpler than you think. Whether you use a dedicated OKF builder tool or just a text editor, this guide walks you through the complete process — from your first okf.json to a published, validated bundle indexed on BundleDex.
What Is an OKF Builder?
An OKF builder is a tool, template, or process used to create Open Knowledge Format bundles. The term covers everything from full-featured CLI scaffolding tools to the simple act of writing markdown files in a text editor.
Building an OKF bundle involves:
- Defining the bundle manifest — Creating
index.mdwith YAML frontmatter (title, description, tags, version) - Writing concept documents — Adding markdown files that each cover one knowledge concept
- Structuring the bundle — Organizing files into directories (concepts, guides, references)
- Cross-linking concepts — Connecting related ideas with relative markdown links
- Validating conformance — Checking that the bundle follows the OKF specification
- Publishing — Pushing to GitHub and submitting to BundleDex for indexing
The beauty of the OKF format is its simplicity — you don't need any specialized software to build a bundle. But dedicated builder tools can accelerate the process significantly.
OKF Builder Tools Compared
Here are the most popular OKF builder tools organized by workflow preference:
Open Knowledge CLI
The official CLI for OKF. Use openknowledge new to scaffold a new bundle with proper directory structure, then openknowledge add to create concept documents with frontmatter templates.
okfgen
A code generator that creates OKF bundles from YAML or JSON configuration files. Perfect for teams that want to define bundles declaratively and generate them as part of build pipelines.
OKF Knowledge (Claude Code Skill)
Create OKF bundles from within Claude Code. Describe what you want to document, and the AI agent builds the bundle structure, writes concept documents, and validates everything.
OKFy
Converts existing documentation, README files, and knowledge bases into OKF-conformant bundles. Point it at a directory of markdown files and it auto-generates frontmatter and index manifests.
Text Editor + Git (Zero Tools)
The minimalist approach. Create an index.md, add concept files, organize them, and push to GitHub. No scaffolding, no generators — just files. This is how many of the top 565 bundles on BundleDex were created.
Which builder should you use? If you're new to OKF, start with a text editor and follow the step-by-step guide below. Once you understand the format, try Open Knowledge CLI or OKF Knowledge for faster iteration.
Step-by-Step: Creating Your First OKF Bundle
This section walks you through building an OKF bundle from scratch — no tools required beyond a text editor.
Step 1: Create the Bundle Directory
mkdir my-okf-bundle
cd my-okf-bundle Step 2: Create the index.md Manifest
Every OKF bundle needs an index.md file at the root. This is the entry point for AI agents and human readers:
---
title: My Knowledge Bundle
description: A practical OKF bundle covering domain concepts
tags: [developer-tools, documentation, best-practices]
version: "1.0.0"
author: Your Name
okf_version: "0.1"
---
# My Knowledge Bundle
This bundle contains structured knowledge about [your domain].
It is designed for AI agents and human readers alike.
## Contents
- [Getting Started](./getting-started.md)
- [Core Concepts](./concepts/core.md)
- [Advanced Usage](./guides/advanced.md)
- [API Reference](./references/api.md) Step 3: Add Concept Documents
Each concept document covers one topic. Create files with YAML frontmatter and markdown content:
---
title: Getting Started with My Domain
description: A beginner's introduction to the core concepts
tags: [tutorial, beginner, introduction]
---
## Overview
This guide covers the fundamentals of [your domain].
## Prerequisites
- Basic understanding of markdown
- Familiarity with Git
## Core Concepts
[Explain your domain concepts here]
## Next Steps
- See [Core Concepts](./concepts/core.md) for deeper dives
- Check the [Advanced Guide](./guides/advanced.md) for complex scenarios Step 4: Structure with Subdirectories
As your bundle grows, organize files into subdirectories following standard conventions:
my-okf-bundle/
├── index.md # Bundle manifest
├── log.md # Changelog (optional)
├── getting-started.md # Top-level concept
├── concepts/ # Core domain concepts
│ ├── architecture.md
│ ├── data-model.md
│ └── workflows.md
├── guides/ # How-to guides
│ ├── installation.md
│ └── troubleshooting.md
└── references/ # Reference docs
├── api.md
└── configuration.md Step 5: Cross-Link Related Concepts
Use relative markdown links to build a knowledge graph within your bundle:
# In guides/installation.md
## Prerequisites
Before installing, understand the [Architecture](../concepts/architecture.md)
and review the [System Requirements](../concepts/workflows.md).
For configuration details, see the [Configuration Reference](../references/configuration.md). Step 6: Validate Your Bundle
Before publishing, validate your OKF bundle to ensure it follows the spec:
# Using Open Knowledge CLI
openknowledge validate ./my-okf-bundle/
# Manual validation checklist
ls my-okf-bundle/index.md # Must exist with YAML frontmatter
head -5 my-okf-bundle/index.md # Check for title and description
find . -name "*.md" | wc -l # Count concept documents
grep -r "\\](" . # Check cross-links exist Step 7: Publish and Submit
Push your bundle to a public GitHub repository, then submit it to BundleDex for indexing:
git init
git add -A
git commit -m "Initial OKF bundle: My Knowledge Bundle"
gh repo create my-okf-bundle --public --push Templates to Get Started Faster
Instead of starting from an empty directory, use these templates to jump-start your OKF bundle:
Minimal OKF Bundle
A single index.md with frontmatter. Perfect for small documentation sets.
my-bundle/
├── index.md Standard OKF Bundle
Full structure with concepts, guides, and references directories. Best for most projects.
my-bundle/
├── index.md
├── log.md
├── concepts/
├── guides/
└── references/ API Documentation Bundle
Optimized for API reference, endpoints, authentication, and SDK docs.
my-bundle/
├── index.md
├── api/
│ ├── authentication.md
│ ├── endpoints.md
│ └── errors.md
├── sdks/
│ ├── python.md
│ └── javascript.md
└── changelog.md You can also clone any existing bundle on BundleDex and modify it. Browse the directory for inspiration from top bundles like iwe.
Validating Your OKF Bundle
Validation ensures your bundle is correctly structured and will work with AI agents. Here's what to check:
Automatic Validation
- Open Knowledge CLI — Run
openknowledge validate ./your-bundle/for automated checks - BundleDex submission — When you submit your bundle, we validate it automatically
- okf.md validator — Online validator at okf.md for quick checks
- okf-lint — Dedicated linter for OKF frontmatter and structure
Manual Validation Checklist
- ✅
index.mdexists at the bundle root with valid YAML frontmatter - ✅
index.mdhas at minimum atitlefield - ✅ All concept documents have YAML frontmatter with
title - ✅ YAML frontmatter uses
---delimiters correctly (not+++or other formats) - ✅ No broken internal links — every
](./path)points to an existing file - ✅ Files use
.mdextension (not.markdownor.mdown) - ✅ No large binary files or blobs in the bundle directory
- ✅ Bundle is a public GitHub repository
Pro tip: The full validation guide covers all checks in detail, with examples of common errors and how to fix them.
Publishing and Submitting Your Bundle
Once your bundle is built and validated, share it with the world:
- Push to GitHub — Make the repository public so AI agents can access it
- Add a README.md — Separate from
index.md, this helps human visitors understand the repo - Submit to BundleDex — Go to bundledex.net/submit and enter your GitHub URL
- Spread the word — Share on X, LinkedIn, or relevant AI communities
After approval, your bundle will appear in search results, the BundleDex API, and in /llms.txt — making it discoverable by AI agents worldwide.
Best Practices for Building OKF Bundles
Naming Conventions
- Use kebab-case for file names:
getting-started.md,api-reference.md - Keep directory names short:
concepts/,guides/,references/ - Use descriptive titles in frontmatter — they power search results
Content Quality
- Each concept document should be 100-500 words — complete but concise
- Start with a summary paragraph for quick context loading
- Use concrete examples over abstract descriptions
- Include code blocks for CLI commands, API calls, and configurations
Linking Strategy
- Every concept should link to 2-3 related concepts
- Use relative links (not absolute URLs) for cross-bundle portability
- Create a log.md for version history — helps agents understand changes
SEO for Your Bundle
- Write descriptive descriptions — they appear in BundleDex search and Google
- Tag with both broad and specific tags:
[ai-agents, documentation, okf] - Keep
index.mdinformative — it's the preview shown on BundleDex
Frequently Asked Questions
What is an OKF builder?
An OKF builder is any tool or process used to create Open Knowledge Format bundles. This includes CLI tools like Open Knowledge CLI and okfgen for scaffolding, visual editors like OWOX Model Canvas, agent-native skills like OKF Knowledge for Claude Code, and even just a text editor and Git. The term also refers to the practice of authoring and structuring OKF-conformant markdown bundles.
Do I need special tools to build an OKF bundle?
No. You can build an OKF bundle with just a text editor and Git. OKF bundles are plain markdown files with YAML frontmatter. Dedicated builder tools like Open Knowledge CLI, okfgen, and OKFy make the process faster by providing scaffolding, validation, and conversion features, but they are entirely optional. The OKF tutorial walks through the zero-tools approach.
How do I validate an OKF bundle after building it?
Use the Open Knowledge CLI (openknowledge validate ./your-bundle/), the online validator at okf.md, or follow the validation checklist. Manual checks include: index.md exists with YAML frontmatter, all concept docs have titles, internal links resolve, and the directory follows OKF conventions. BundleDex also validates bundles during submission.
Can I convert existing documentation to an OKF bundle?
Yes. OKFy (github.com/0dust/OKFy) converts existing markdown documents, README files, and knowledge bases into OKF format. The Open Knowledge CLI also supports batch conversion. For agent-assisted conversion, the OKF Knowledge Claude Code skill can create bundles from project documentation automatically.
What is the best OKF builder for beginners?
For complete beginners, start with a text editor (VS Code or Cursor) and follow the step-by-step guide above. Once you're comfortable with the format, try the Open Knowledge CLI for scaffolding or OKF Knowledge for AI-assisted creation. Browse OKF builder tools for more options.