一键导入
kb-init
Scaffold a new OKF knowledge bundle in this project — run when starting a wiki or adding a bundle under knowledge/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold a new OKF knowledge bundle in this project — run when starting a wiki or adding a bundle under knowledge/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Portable OKF knowledge bundle for coding-agent memory and LLM wikis. Use when the user wants to start a wiki, ingest a source, query project knowledge with citations, lint for drift, or visualize connections; whenever a repo has a knowledge/ bundle that should inform the task; and when another kb-* skill needs the shared spec, glossary, templates, or trust model.
Ingest a source into the knowledge bundle. Use when the user wants to capture, ingest, file, process, or "add this" — a note, transcript, email, PDF, image, web page, or any raw source — into a knowledge/ bundle, or drops content for processing. Reads the source once, extracts its signal, and integrates it across the bundle under the trust model so knowledge compounds instead of being re-derived per query.
Health-check a knowledge bundle for conformance and drift; optionally auto-fix safe issues.
Answer from the knowledge bundle. Use when the user asks what they/the project know about something, wants to look something up, explore connections, or compare things that live in a knowledge/ bundle — and when any task would be informed by an existing bundle, consult it here before answering from scratch. Navigates by progressive disclosure and files valuable answers back so the bundle compounds.
Render a knowledge bundle as an interactive graph — native UI where the host supports it, otherwise a self-contained HTML artifact.
| name | kb-init |
| description | Scaffold a new OKF knowledge bundle in this project — run when starting a wiki or adding a bundle under knowledge/. |
| disable-model-invocation | true |
Scaffold a conformant bundle per kb. Your unique work is the schema layer (step 2) and adapting the seed (step 3).
Read ../kb/reference/glossary.md if the terms below are unfamiliar.
Default to a bundle at knowledge/. Accept overrides from the user's request:
docs/kb) → scaffold there instead.ci bundle") → scaffold at knowledge/<name>/ and treat knowledge/
as a multi-bundle folder: ensure a top-level knowledge/index.md exists that catalogs the
bundles (create it if missing; add this bundle to it).If the target directory already contains a bundle (a root index.md), stop and report it — do not
overwrite. Offer kb-ingest instead.
Completion criterion: the target path and bundle name are fixed, and confirmed not to collide with an existing bundle.
The scaffold is deterministic; the schema layer needs judgment, so gather it first. Inspect the workspace for signal (README, existing docs, the code, any notes the user points at) and ask the user only what you still can't infer:
type vocabulary (e.g. person, deal, metric; or character, chapter, theme).Keep it short — a few types and a one-line routing rule is enough to start; the schema layer co-evolves later.
Completion criterion: you can name the bundle's initial type values, its raw sources, and a
one-line ingest routing rule.
Copy ../kb/example-bundle/ into the target, then adapt every seed artifact:
| Artifact | Action |
|---|---|
index.md | Keep okf_version: "0.1" frontmatter; replace the body with this bundle's title and section list. |
log.md | Start fresh with a single dated **Creation** entry. |
spec/types.md | Replace example types with the domain's type vocabulary from step 2. |
spec/conventions.md | Replace with folder taxonomy, naming, ingest routing rule, and a trust-model pointer. |
concepts/* | Remove example entities (customers, orders); leave concepts/ empty or create domain starter folders. |
knowledge/index.md | If multi-bundle (step 1): create or update the catalog entry for this bundle. |
Use ../kb/templates/ for any new concept/index/log files.
Completion criterion: the bundle exists on disk; every row above is accounted for; spec/types.md
and spec/conventions.md describe this project (not the example's orders/customers); multi-bundle
catalog updated if applicable.
Run kb-lint if available; otherwise verify the bundle is conformant per kb (SPEC §9 — the one hard rule).
Completion criterion: zero conformance errors.
Tell the user the bundle is ready, where it lives, and the two next moves:
kb-ingest to add knowledge, kb-query to ask it
questions. If this project uses CLAUDE.md/AGENTS.md, offer to add a one-line pointer so agents
read the bundle's root index.md before relevant tasks.