wiki-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

wiki-init

wiki-init

Use this skill to initialize or migrate a repo into the wiki + QMD + agent hook pattern.
The user may use natural language. Route intent like this:
  • "como esta a estrutura?", "preciso migrar?", "doctor", "qmd esta ok?" -> run
    doctor
    .
  • "instala", "prepara esse repo", "configura hooks" -> run
    install
    as dry-run first, then ask the user to confirm the suggested wiki location and index before
    --write
    .
  • "migrar para o formato novo" -> run
    migrate
    as dry-run first, then ask the user to confirm the suggested wiki location and index before
    --write
    .
  • "corrigir qmd", "managed qmd", "patch qmd" -> run
    doctor
    , then explain or run QMD fix only with explicit write/network approval.
使用该Skill将仓库初始化或迁移至wiki + QMD + agent钩子模式。
用户可能使用自然语言表达需求,需按以下方式识别意图:
  • "como esta a estrutura?", "preciso migrar?", "doctor", "qmd esta ok?" -> 执行
    doctor
    命令。
  • "instala", "prepara esse repo", "configura hooks" -> 先以试运行(dry-run)模式执行
    install
    ,然后在执行
    --write
    前,询问用户确认建议的wiki位置和索引。
  • "migrar para o formato novo" -> 先以试运行(dry-run)模式执行
    migrate
    ,然后在执行
    --write
    前,询问用户确认建议的wiki位置和索引。
  • "corrigir qmd", "managed qmd", "patch qmd" -> 执行
    doctor
    ,仅在获得明确的写入/网络权限后,再解释或执行QMD修复操作。

Workflow

工作流程

  1. Run
    scripts/wiki-init.ts doctor --project <path>
    first.
  2. Read the report: wiki layout, AGENTS/CLAUDE, harnesses, hooks, drift, QMD status.
  3. For changes, run
    install
    or
    migrate
    without
    --write
    and show the planned file actions plus the suggested topology.
  4. Ask the user in plain language to confirm where the wiki will live and what QMD index will be used. Do not require the user to know the preset name.
  5. Only run with
    --write
    after passing explicit
    --wiki
    and
    --index
    . The script blocks writes without those flags.
  6. Re-run
    doctor
    after writes.
  7. If the target project needs an index, initialize QMD with the generated wrapper:
    <wrapper> collection add <wiki-path> --name knowledge-base --mask "**/*.md"
    , then
    <wrapper> update
    and
    <wrapper> embed
    .
  8. Run
    scripts/validate-wiki-init.ts
    before changing reusable templates or scripts.
  1. 首先执行
    scripts/wiki-init.ts doctor --project <path>
  2. 读取报告内容:wiki布局、AGENTS/CLAUDE配置、工具集、钩子、偏差情况、QMD状态。
  3. 若需要变更,先不带
    --write
    参数执行
    install
    migrate
    ,展示计划的文件操作以及建议的拓扑结构。
  4. 用通俗易懂的语言询问用户确认wiki的存放位置和将使用的QMD索引,无需用户知晓预设名称。
  5. 仅在传入明确的
    --wiki
    --index
    参数后,方可带
    --write
    参数执行脚本。脚本在缺少这些标志时会阻止写入操作。
  6. 写入完成后重新执行
    doctor
  7. 若目标项目需要索引,使用生成的包装器初始化QMD:
    <wrapper> collection add <wiki-path> --name knowledge-base --mask "**/*.md"
    ,随后执行
    <wrapper> update
    <wrapper> embed
  8. 在修改可复用模板或脚本前,先执行
    scripts/validate-wiki-init.ts

Script

脚本

Primary script:
sh
bun skills/wiki-init/scripts/wiki-init.ts doctor --project .
QMD-focused alias:
sh
bun skills/wiki-init/scripts/qmd-doctor.ts --project .
The script is intentionally dry-run by default. It writes only with
--write
.
Common examples:
sh
bun skills/wiki-init/scripts/wiki-init.ts doctor --project /path/to/project
bun test skills/wiki-init/scripts/wiki-init.test.ts
bun skills/wiki-init/scripts/wiki-init.ts migrate --project /path/to/project --wiki ../knowledge-base --index my-index
bun skills/wiki-init/scripts/wiki-init.ts install --project /path/to/project
bun skills/wiki-init/scripts/wiki-init.ts install --project /path/to/project --wiki ../knowledge-base --index my-project --harness claude,codex --write
主脚本:
sh
bun skills/wiki-init/scripts/wiki-init.ts doctor --project .
QMD专用别名:
sh
bun skills/wiki-init/scripts/qmd-doctor.ts --project .
脚本默认处于试运行(dry-run)模式,仅在添加
--write
参数时才会执行写入操作。
常见示例:
sh
bun skills/wiki-init/scripts/wiki-init.ts doctor --project /path/to/project
bun test skills/wiki-init/scripts/wiki-init.test.ts
bun skills/wiki-init/scripts/wiki-init.ts migrate --project /path/to/project --wiki ../knowledge-base --index my-index
bun skills/wiki-init/scripts/wiki-init.ts install --project /path/to/project
bun skills/wiki-init/scripts/wiki-init.ts install --project /path/to/project --wiki ../knowledge-base --index my-project --harness claude,codex --write

Presets

预设配置

Use
references/presets.md
for the supported project shapes: local wiki, central sibling wiki, multi-repo org wiki, and docs-only migration.
参考
references/presets.md
获取支持的项目形态:本地wiki、中央同级wiki、多仓库组织wiki,以及仅文档迁移。

Boundaries

边界限制

  • Do not auto-ingest wiki content. Hooks only raise signal; the agent decides semantically.
  • Do not patch or install QMD globally without explicit user approval.
  • Prefer a managed project wrapper for QMD over shell aliases or
    bunx
    . The wrapper must be accompanied by a provenance manifest recording the wrapped binary, version, patch report, language, and embedding model. This is intentionally no-network and does not clone/update QMD automatically.
  • Keep templates inside this skill directory.
  • 请勿自动摄取wiki内容。钩子仅触发信号,由agent进行语义层面的决策。
  • 未经用户明确许可,请勿全局修补或安装QMD。
  • 优先为QMD使用受管理的项目包装器,而非shell别名或
    bunx
    。包装器必须附带来源清单,记录被包装的二进制文件、版本、补丁报告、语言以及嵌入模型。该操作默认无网络连接,不会自动克隆/更新QMD。
  • 模板需保存在当前Skill目录内。