/llm-wiki-okf:llm-wiki-okffrom llm-wiki-okf
Manages a persistent markdown knowledge base (OKF format) for LLM project memory. Consult before answering questions about architecture, design decisions, domain entities, or datasets. Also handles ingesting raw documents, updating pages, and linting the wiki.
Ships in llm-wiki-okf. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Persistent markdown knowledge base with two layers:
raw/ — immutable source documents. Read only.*.md — LLM-generated concept pages, one idea per file.Full format reference: references/okf-spec.md.
index.md is the mandatory entry point for every query — no exceptions. Never answer a
memory question from raw files, project files, or external sources before the wiki has been
consulted through its index.
~/.llm-wiki; per-project bundles live in ./.llm-wiki.
Follow AGENTS.md routing if present (query both global + local tiers when unsure).
Use okf_status.py --tier all for a quick overview of active tiers.index.md first. Always. Even if it looks short, or its <!-- okf:auto-index -->
section is empty.index.md — /notes/index.md, /sources/index.md,
/entities/index.md, /concepts/index.md. Subsection indexes list the actual pages.okf_search.py <query> for ranked
results across concept pages before falling back to raw grep.per /notes/project-overview.md, or with tier label
per global /entities/hanupratap-singh-chauhan.md / per local /notes/....raw/ then external sources.Common failure modes to avoid:
index.md, seeing an empty auto-index, and concluding the wiki is empty.okf_search.py first — ranked search uses weighted scoring,
not linear scan.Scripts live in two places depending on your platform:
~/.local/binUse the unified okf command for all operations:
okf init <bundle> # scaffold
okf ingest <source> # ingest a raw source
okf update <page> # bump timestamp after edit
okf truth <page> # atomic rewrite with provenance
okf archive <page> # archive with reversal summary
okf diff <page> # git diff for a page
okf lint <bundle> # validate format and links
okf search <query> # ranked search
okf status # bundle health
okf index <bundle> # regenerate indexes
okf dir [--tier all] # show resolved directories
okf now # current ISO timestamp
okf wire --agent <name> # wire into agent config
Each operation also has a standalone script (okf_init.py, okf_lint.py, etc.).
The okf_common.py module must be co-located with the script being run.
Find relevant pages for a query using ranked token scoring:
python3 scripts/okf_search.py <query> [--tier all|global|local] [--max-results N] [--json]
Use this whenever the index path doesn't surface a topic. Searches frontmatter (title, tags, description) and page body, ranking by relevance.
For a table-of-contents overview of all pages:
python3 scripts/okf_search.py --toc [--tier all]
Quick health overview of one or all tiers:
python3 scripts/okf_status.py [--tier all|global|local] [--json]
Shows page counts by type, number of raw source files, and the last logged change.
Scaffold a new wiki bundle:
python3 scripts/okf_init.py <bundle> [--title "My Wiki"]
Use --from-readme to infer the title and description from a README.md in the current directory:
python3 scripts/okf_init.py <bundle> --from-readme [--readme-path path/to/README.md]
This creates the raw/, sources/, notes/, entities/, and concepts/ directories plus initial index files.
Add a new raw source to the wiki. The script copies the source into raw/, creates a skeleton
source page with correct frontmatter, updates log.md, rebuilds indexes, lints, and commits:
python3 scripts/okf_ingest.py <source-file> [--title "Title"] [--slug my-slug] [--tier all|global|local] [--no-commit] [--dry-run]
After the script runs:
sources/<slug>.md page.Note pages for new concepts, linking each to at least one existing page.okf_update.py <page> on each page you edited to bump timestamps and log.If a new source contradicts an existing page, use okf_diff.py <page> to show the current state,
then flag the contradiction and ask before resolving.
After editing a page, bump its timestamp, log, re-index, lint, and commit:
python3 scripts/okf_update.py <page> [--message "custom log message"] [--no-commit]
Show a git diff for a page — use this before meaning changes to review what's there:
python3 scripts/okf_diff.py <page> [--previous N] [--since <commit>]
python3 scripts/okf_lint.py <bundle> [--tier all|global|local] [--json] [--strict-frontmatter]
Fix errors immediately; treat warnings as real problems.
--strict-frontmatter adds warnings when the yamlish parser may have silently dropped
content — useful for catching nested YAML, multiline scalars, or tab-indented lists
that the parser doesn't support.
Since v1.3.0, pages can carry a per-page ## timeline section for provenance.
The timeline records why content changed, not just that it changed.
okf update <page> --kind decision --summary "Switched to session cookies"
If the page has no ## timeline section, okf update --kind creates one.
For timeline entry kinds, see okf-spec.md.
For wholesale rewrites of a page's meaning, pipe the new body to stdin:
cat new-body.md | okf truth <page> --summary "Rewrote after security review"
This does one atomic write: replaces the body section, appends a kind: decision
timeline entry, bumps timestamp, reindexes, lints, and commits. Changing the
understanding and recording why happen together — they cannot come apart.
When a conclusion is overturned, archive the old page instead of deleting it:
okf archive <page> --reversal-summary "Superseded by session-cookies.md"
Sets status: archived, appends a kind: reversal timeline entry (if summary
given), and preserves the full page history. Archived pages are excluded from
okf search by default and exempt from orphan-link lint checks.
Show resolved bundle directories — where each tier lives, whether it's populated:
okf dir [--tier all|global|local] [--json]
Idempotently inject the wiki discipline into agent config files:
okf wire --agent claude cursor copilot # one or more
okf wire --agent all # all detected
Uses <!-- BEGIN okf --> / <!-- END okf --> markers so re-running upgrades
the block in place without touching the rest of the file.
type is required on every concept page: Source, Note, Index.sources is required on factual pages (Source, Note). Must point to raw/<file> that exists.[label](/path/to/file.md). Targets must exist. External URLs (https://...) are fine and are not checked.index.md is the directory entry point; log.md is the change history.status is optional on concept pages: active (default), draft, archived.## timeline section after the body (since v1.3.0).python3 scripts/okf_now.py rather than hand-writing one (avoids bad-timestamp errors).raw/, not from wiki text.sources.index.md do not count).okf update --kind decision --summary "..." for surgical edits, or okf truth for atomic rewrites. Never change the body without recording the reason.okf archive --reversal-summary "..." so the history survives.references/okf-spec.md (opens in a new tab)scripts/okf.py (opens in a new tab)scripts/okf_archive.py (opens in a new tab)scripts/okf_common.py (opens in a new tab)scripts/okf_diff.py (opens in a new tab)scripts/okf_dir.py (opens in a new tab)scripts/okf_index.py (opens in a new tab)scripts/okf_ingest.py (opens in a new tab)scripts/okf_init.py (opens in a new tab)scripts/okf_lint.py (opens in a new tab)scripts/okf_now.py (opens in a new tab)scripts/okf_search.py (opens in a new tab)scripts/okf_status.py (opens in a new tab)scripts/okf_update.py (opens in a new tab)scripts/okf_wire.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (hanupratap/llm-wiki-okf) — no native marketplace selected
npx claudepluginhub p/hanupratap-llm-wiki-okfOther plugins' skills for the same job