llm-wiki

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

LLM Wiki

LLM Wiki

Use this skill from any capable AI agent when the user asks to ingest notes into an LLM Wiki, maintain or query the wiki, lint wiki consistency, update wiki indexes/logs/cross-links, or refresh/consult a Graphify graph for the wiki.
When the user invokes only
llm-wiki
or otherwise provides no additional task details, do not show a workflow menu. Treat the bare invocation as the default bootstrap/refresh pipeline: resolve the wiki language, generate a raw Graphify map, then generate or update the wiki from
raw/
with help from that map.
当用户要求将笔记导入LLM Wiki、维护或查询Wiki、校验Wiki一致性、更新Wiki索引/日志/交叉链接,或者刷新/查看Wiki的Graphify图谱时,任何具备能力的AI Agent都可使用此技能。
当用户仅调用
llm-wiki
或未提供额外任务细节时,请勿显示工作流菜单。将这种无参数调用视为默认的引导/刷新流程:确定Wiki语言,生成原始Graphify图谱,然后借助该图谱从
raw/
目录生成或更新Wiki。

Safety contract

安全约定

  • Treat
    raw/
    as immutable source evidence: never edit, move, delete, normalize, or write generated files under it.
  • Treat
    wiki/
    as the reviewable compiled Markdown layer.
  • Treat
    graphify-out/
    as generated, reproducible graph output; use it to navigate and synthesize raw notes, but never cite it as canonical source content.
  • Do not install
    graphifyy
    , run
    graphify
    , call models/APIs, or generate a full wiki unless the user explicitly requests that execution step.
  • Before creating or updating
    wiki/
    pages, determine the target wiki language. If the user did not explicitly specify it in the current request or accepted page plan, open a short choice/input dialog when the agent UI supports it, or ask in chat, and wait for the user to choose or specify the language.
  • Remember the selected wiki language in
    wiki/config.md
    using
    language: <value>
    , and reuse it on later invocations unless the user overrides it.
  • Prefer small, reviewable wiki updates and record meaningful changes in
    wiki/log.md
    .
  • raw/
    视为不可修改的源证据:绝不编辑、移动、删除、标准化该目录下的内容,也不在此目录下写入生成的文件。
  • wiki/
    视为可审核的编译Markdown层。
  • graphify-out/
    视为生成的、可复现的图谱输出;使用它来导航和合成原始笔记,但绝不能将其作为权威源内容引用。
  • 除非用户明确请求执行该步骤,否则请勿安装
    graphifyy
    、运行
    graphify
    、调用模型/API或生成完整Wiki。
  • 在创建或更新
    wiki/
    页面之前,确定目标Wiki语言。如果用户在当前请求或已接受的页面规划中未明确指定,若Agent UI支持则打开简短的选择/输入对话框,否则在聊天中询问,等待用户选择或指定语言。
  • wiki/config.md
    中使用
    language: <value>
    记录所选的Wiki语言,后续调用时复用该设置,除非用户覆盖。
  • 优先进行小型、可审核的Wiki更新,并在
    wiki/log.md
    中记录有意义的变更。

Reference map

参考图谱

Read only the references needed for the current request:
  • references/wiki-schema.md
    — directory layout, frontmatter, page types, index/log rules, page-plan guardrails.
  • references/graphify.md
    — Graphify package/CLI names, safe run modes, output lifecycle, cost/network warnings.
  • references/ai-agent-integration.md
    — portable setup patterns for agents beyond the named Codex/Claude Code references.
  • references/codex.md
    — Codex installation and usage notes.
  • references/claude-code.md
    — Claude Code installation and usage notes.
  • references/first-pass-page-plan.md
    — initial page plan and sample style for the current
    <knowledge-repo>
    raw sources.
  • references/graphifyignore-proposal.md
    — documented ignore policy for any future root graph or audit mode.
仅读取当前请求所需的参考内容:
  • references/wiki-schema.md
    — 目录结构、前置元数据、页面类型、索引/日志规则、页面规划约束。
  • references/graphify.md
    — Graphify包/CLI名称、安全运行模式、输出生命周期、成本/网络警告。
  • references/ai-agent-integration.md
    — 除Codex/Claude Code之外的Agent通用可移植设置模式。
  • references/codex.md
    — Codex安装和使用说明。
  • references/claude-code.md
    — Claude Code安装和使用说明。
  • references/first-pass-page-plan.md
    — 针对当前
    <knowledge-repo>
    原始源的初始页面规划和示例样式。
  • references/graphifyignore-proposal.md
    — 针对未来根图谱或审计模式的已文档化忽略策略。

Workflow: bare invocation

工作流:无参数调用

Use this workflow when the user invokes the skill without any other instruction, for example just
llm-wiki
.
  1. Resolve the target wiki language:
    • if the user specified a language in the current request, use it;
    • otherwise read the remembered language from
      wiki/config.md
      when present;
    • otherwise, if
      wiki/index.md
      or existing maintained pages have a consistent
      language
      value, reuse it and write it to
      wiki/config.md
      ;
    • otherwise ask: "请选择或指定本次 wiki 使用的语种(例如 zh-CN、en、bilingual 或其他)" and wait for the answer.
  2. If the user selected a language and
    wiki/config.md
    is absent or stale, create/update it before other wiki writes.
  3. Run the guarded raw-map Graphify workflow: read
    raw/
    , write
    graphify-out/raw-map/
    , and keep
    raw/
    immutable. A bare
    llm-wiki
    invocation counts as a request for this default raw-map refresh, but still do not install
    graphifyy
    or bypass local cost/network safeguards.
  4. Generate or update the wiki from
    raw/
    , using
    graphify-out/raw-map/GRAPH_REPORT.md
    as a navigation and clustering aid when available.
  5. Update
    wiki/index.md
    and append
    wiki/log.md
    with the language, graph refresh status, changed pages, and verification.
  6. If Graphify is unavailable or cannot run safely, continue the wiki generation/update directly from
    raw/
    , record that graph generation was skipped, and explain the blocker in the final response.
当用户未提供任何其他指令仅调用该技能时(例如仅输入
llm-wiki
),使用此工作流:
  1. 确定目标Wiki语言:
    • 如果用户在当前请求中指定了语言,则使用该语言;
    • 否则,若
      wiki/config.md
      中存在已记录的语言,则读取复用;
    • 否则,若
      wiki/index.md
      或现有维护页面有一致的
      language
      值,则复用该值并写入
      wiki/config.md
    • 否则询问:"请选择或指定本次 wiki 使用的语种(例如 zh-CN、en、bilingual 或其他)" 并等待回复。
  2. 如果用户选择了语言且
    wiki/config.md
    不存在或已过期,在进行其他Wiki写入操作前创建/更新该文件。
  3. 运行受保护的原始图谱Graphify工作流:读取
    raw/
    目录,写入
    graphify-out/raw-map/
    目录,保持
    raw/
    目录不可修改。无参数调用
    llm-wiki
    视为请求执行此默认的原始图谱刷新,但仍请勿安装
    graphifyy
    或绕过本地成本/网络防护措施。
  4. raw/
    目录生成或更新Wiki,若可用则使用
    graphify-out/raw-map/GRAPH_REPORT.md
    作为导航和聚类辅助工具。
  5. 更新
    wiki/index.md
    并在
    wiki/log.md
    中追加记录语言、图谱刷新状态、变更页面和验证信息。
  6. 如果Graphify不可用或无法安全运行,直接从
    raw/
    目录继续Wiki生成/更新,记录图谱生成已跳过,并在最终回复中说明阻塞原因。

Workflow: ingest plan

工作流:导入规划

  1. Identify the requested source set. For new or large sets, list proposed wiki pages before writing.
  2. Determine the target wiki language before any wiki write. If it is not explicit, first reuse
    wiki/config.md
    ; if no remembered language exists, ask: "请选择或指定本次 wiki 使用的语种(例如 zh-CN、en、bilingual 或其他)" and do not proceed with wiki writes until the user answers.
  3. Read selected
    raw/*.md
    files as evidence only; do not alter them.
  4. If an approved raw Graphify map exists under
    graphify-out/raw-map/
    , use it as a navigation and clustering aid before mapping raw sources; otherwise map directly from selected raw files.
  5. Map each raw source to at least one
    wiki/sources/*.md
    page and at most a small justified set of concept/workflow pages.
  6. Draft source pages in the chosen wiki language, with provenance and
    language
    in frontmatter plus concise claim summaries.
  7. Draft concept/workflow pages in the chosen wiki language only when they synthesize multiple sources or encode reusable procedure.
  8. Update
    wiki/index.md
    and append an entry to
    wiki/log.md
    for accepted writes.
  9. Stop before full wiki generation unless execution scope explicitly allows it.
  1. 识别请求的源集合。对于新的或大型集合,在写入前列出拟议的Wiki页面。
  2. 在进行任何Wiki写入操作前确定目标Wiki语言。若未明确指定,首先复用
    wiki/config.md
    中的设置;若没有已记录的语言,则询问:"请选择或指定本次 wiki 使用的语种(例如 zh-CN、en、bilingual 或其他)",在用户回复前请勿继续Wiki写入操作。
  3. 仅读取选定的
    raw/*.md
    文件作为证据;请勿修改它们。
  4. 如果
    graphify-out/raw-map/
    目录下存在已批准的原始Graphify图谱,在映射原始源之前将其用作导航和聚类辅助工具;否则直接从选定的原始文件进行映射。
  5. 将每个原始源映射到至少一个
    wiki/sources/*.md
    页面,最多映射到一组少量合理的概念/工作流页面。
  6. 以选定的Wiki语言起草源页面,前置元数据中包含来源信息和
    language
    字段,加上简洁的内容摘要。
  7. 仅当需要合成多个源或编码可复用流程时,才以选定的Wiki语言起草概念/工作流页面。
  8. 更新
    wiki/index.md
    并在
    wiki/log.md
    中追加已接受写入操作的记录。
  9. 除非执行范围明确允许,否则在完整Wiki生成前停止操作。

Workflow: query

工作流:查询

  1. Prefer
    wiki/index.md
    and relevant
    wiki/**/*.md
    pages for answered/cited knowledge. Use
    graphify-out/raw-map/GRAPH_REPORT.md
    when present as a navigation and synthesis aid for raw-backed gaps; use
    graphify-out/wiki/GRAPH_REPORT.md
    only to navigate an existing wiki.
  2. Cite wiki pages and their raw provenance; do not cite Graphify output as source of truth.
  3. After answering, decide whether the result contains durable knowledge: a reusable synthesis, comparison, decision, source map, or workflow clarification that future queries should find.
  4. If durable knowledge was produced, do not leave it only in chat history:
    • for ordinary query prompts, offer a scoped wiki update with a proposed page title/path and the provenance that would be filed;
    • when the user requested wiki maintenance, compounding, or autonomous execution, perform the scoped update instead of merely offering it, but first apply the wiki-language gate if the target language was not explicit.
  5. For accepted or performed durable updates, write the synthesis into the smallest suitable
    wiki/
    page, update
    wiki/index.md
    when navigation changes, and append a
    wiki/log.md
    entry.
  1. 优先使用
    wiki/index.md
    和相关的
    wiki/**/*.md
    页面获取可引用的知识。若存在
    graphify-out/raw-map/GRAPH_REPORT.md
    ,则将其用作导航和合成辅助工具以填补原始源相关的空白;仅使用
    graphify-out/wiki/GRAPH_REPORT.md
    导航现有Wiki。
  2. 引用Wiki页面及其原始来源;请勿将Graphify输出视为事实来源。
  3. 回答后,判断结果是否包含持久化知识:即可复用的合成内容、对比信息、决策、源映射或工作流说明,这些内容应能被未来的查询检索到。
  4. 如果生成了持久化知识,请勿仅将其留在聊天历史中:
    • 对于普通查询请求,提议进行范围明确的Wiki更新,提供拟议的页面标题/路径及将归档的来源信息;
    • 当用户请求Wiki维护、合并或自主执行时,直接执行范围明确的更新而非仅提供提议,但如果目标语言未明确,需先通过语言验证步骤。
  5. 对于已接受或已执行的持久化更新,将合成内容写入最合适的最小
    wiki/
    页面,若导航发生变化则更新
    wiki/index.md
    ,并在
    wiki/log.md
    中追加记录。

Workflow: lint

工作流:校验

Check for:
  • source pages missing raw provenance;
  • raw sources not represented in
    wiki/sources/
    ;
  • orphan or duplicate concept pages;
  • over-fragmented pages that should be merged;
  • stale
    wiki/index.md
    entries;
  • missing
    wiki/log.md
    entries for wiki maintenance;
  • contradictions between summaries and raw provenance.
Report proposed fixes before large rewrites.
检查以下内容:
  • 缺少原始来源信息的源页面;
  • 未在
    wiki/sources/
    中体现的原始源;
  • 孤立或重复的概念页面;
  • 过于碎片化、应合并的页面;
  • wiki/index.md
    中的过期条目;
  • Wiki维护操作对应的
    wiki/log.md
    条目缺失;
  • 摘要与原始来源之间的矛盾。
在进行大规模重写前报告拟议的修复方案。

Workflow: Graphify refresh

工作流:Graphify刷新

  1. Load
    references/graphify.md
    before any graph action.
  2. Confirm Graphify availability with
    graphify --help
    only; do not install or run graph builds without explicit approval.
  3. Default planning mode is raw-map: read
    raw/
    , write
    graphify-out/raw-map/
    , then use that generated graph to cluster sources and draft better
    wiki/
    pages.
  4. Wiki-refresh mode is secondary: read
    wiki/
    , write
    graphify-out/wiki/
    when the maintained wiki already exists and needs navigation review.
  5. Raw-audit mode is explicit and isolated: read
    raw/
    , write
    graphify-out/raw-audit/
    for source coverage or audit tasks beyond normal wiki generation.
  6. Never use a mixed/root graph by default. It requires a validated ignore policy and explicit confirmation.
  7. After an approved refresh, summarize
    GRAPH_REPORT.md
    as a non-canonical navigation aid and append the refresh to
    wiki/log.md
    when wiki logging is in scope.
  1. 在执行任何图谱操作前加载
    references/graphify.md
  2. 仅通过
    graphify --help
    确认Graphify的可用性;未经明确批准,请勿安装或运行图谱构建。
  3. 默认规划模式为原始图谱:读取
    raw/
    目录,写入
    graphify-out/raw-map/
    目录,然后使用生成的图谱对源进行聚类并起草更优质的
    wiki/
    页面。
  4. Wiki刷新模式为次要模式:当已维护的Wiki已存在且需要导航审核时,读取
    wiki/
    目录,写入
    graphify-out/wiki/
    目录。
  5. 原始审计模式为明确且独立的模式:读取
    raw/
    目录,写入
    graphify-out/raw-audit/
    目录,用于常规Wiki生成之外的源覆盖或审计任务。
  6. 默认情况下绝不使用混合/根图谱。这需要经过验证的忽略策略和明确确认。
  7. 经过批准的刷新完成后,将
    GRAPH_REPORT.md
    总结为非权威的导航辅助工具,若涉及Wiki日志记录,则在
    wiki/log.md
    中追加刷新记录。

Optional helpers

可选辅助工具

  • scripts/install_skill.py --help
    and
    --dry-run
    show Codex, Claude Code, or generic agent install targets without writing.
  • scripts/install_skill.py --dry-run --platform generic-agent --target <agent-skill-dir>
    previews a copy/symlink install for other agents.
  • scripts/run_graphify.py --help
    and
    --dry-run --mode raw-map
    validate intended raw-to-graph paths without running Graphify; run it from the knowledge repository root or pass
    --repo-root <knowledge-repo>
    when the skill is installed elsewhere.
  • scripts/install_skill.py --help
    --dry-run
    可显示Codex、Claude Code或通用Agent的安装目标,而不会写入内容。
  • scripts/install_skill.py --dry-run --platform generic-agent --target <agent-skill-dir>
    可预览针对其他Agent的复制/符号链接安装。
  • scripts/run_graphify.py --help
    --dry-run --mode raw-map
    可验证预期的原始文件到图谱的路径,而无需运行Graphify;请从知识库根目录运行该脚本,或当技能安装在其他位置时传递
    --repo-root <knowledge-repo>
    参数。