一键导入
knowledge-base
Look up, record, and manage knowledge base content. Use when the user asks to find information, record something, or work with the knowledge base.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Look up, record, and manage knowledge base content. Use when the user asks to find information, record something, or work with the knowledge base.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | knowledge-base |
| description | Look up, record, and manage knowledge base content. Use when the user asks to find information, record something, or work with the knowledge base. |
| user-invocable | true |
| allowed-tools | ["Bash(${CLAUDE_SKILL_DIR}/scripts/*)"] |
You have access to a knowledge base at $KNOWLEDGE_BASE. It contains curated
articles, source documents, and pending observations. All interaction goes
through scripts in $KNOWLEDGE_BASE/scripts/.
Start by searching, not browsing.
Search first. ${CLAUDE_SKILL_DIR}/scripts/search "<query>" returns matches across
knowledge articles, source documents, and pending observations. Output
format: <file> | <section> | <matched line>.
Narrow with toc. If search gives too many results or you need to
explore a topic area, use ${CLAUDE_SKILL_DIR}/scripts/toc to scan section names.
toc --depth 1 — just topic names (one line per file)toc --depth 2 — H2 section names (the primary content units)toc --depth 3 — H3 subsections with dot numbers (1.1, 1.2)toc --path knowledge/some-dir/ — scope to a subdirectorytoc --dirs — show the file/directory treeLoad a section. ${CLAUDE_SKILL_DIR}/scripts/section --file <path> --number N loads one
H2. Use --number N.M for an H3 subsection. Use --heading "text" for
a case-insensitive substring match on any heading level.
Always load the minimum content needed. Do NOT read entire knowledge files. The toc → section hierarchy is the compression scheme — scan the index, then load only what's relevant.
When you learn something non-obvious during a task — the user corrects you, states a preference, shares domain knowledge, or you discover something unexpected — capture it immediately:
${CLAUDE_SKILL_DIR}/scripts/observe --title "<one-line summary>" --body "<details>"
KNOWLEDGE_OBSERVE=1 is set in your environment.
Check before calling. Subagents do not get this variable.Don't observe ephemeral state ("the build is broken right now") or things already captured in the knowledge base.
When you notice a gap — a system, person, or process referenced but not covered in the knowledge base — flag it:
${CLAUDE_SKILL_DIR}/scripts/ask --title "Who owns the feature-flag service?" --context knowledge/deploys/canary.md
--context is optional. Links the question to a knowledge area.--body adds detail about why the gap matters.Questions are reviewed during curation passes.
Knowledge articles have a verified date in frontmatter. Compare it against
today and the type of content:
| Content type | Stale after |
|---|---|
| People, roles, org structure | ~2 weeks |
| Active initiatives, project status | ~2 weeks |
| Processes and workflows | ~2 months |
| Domain rules, system behavior | ~6 months |
If an article's verified date exceeds these thresholds, treat its claims
with skepticism and verify against live sources before acting on them.
All scripts are at ${CLAUDE_SKILL_DIR}/scripts/<name>.
| Script | Purpose |
|---|---|
search "<query>" | Search all content |
toc [--depth N] [--path DIR] [--flat] [--dirs] | List topics and sections |
section --file FILE (--number N | --heading TEXT) | Extract a section |
observe --title "..." --body "..." | Record an observation |
pending [--full] [--count] | List uncurated observations |
ask --title "..." [--context FILE] [--body "..."] | Record a question |
questions [--path DIR] [--file F] [--full] [--all] | List open questions |
resolve --file F [--answer "..."] | Resolve a question |
archive FILENAME [--all] | Move observations to archived |
stale [--days N] [--path DIR] | List articles needing re-verification |
init [--path DIR] | Initialize an empty content repo |
status | Summary stats |
context | Compact summary for session injection |