wiki-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesewiki-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 as dry-run first, then ask the user to confirm the suggested wiki location and index before
install.--write - "migrar para o formato novo" -> run as dry-run first, then ask the user to confirm the suggested wiki location and index before
migrate.--write - "corrigir qmd", "managed qmd", "patch qmd" -> run , then explain or run QMD fix only with explicit write/network approval.
doctor
使用该Skill将仓库初始化或迁移至wiki + QMD + agent钩子模式。
用户可能使用自然语言表达需求,需按以下方式识别意图:
- "como esta a estrutura?", "preciso migrar?", "doctor", "qmd esta ok?" -> 执行命令。
doctor - "instala", "prepara esse repo", "configura hooks" -> 先以试运行(dry-run)模式执行,然后在执行
install前,询问用户确认建议的wiki位置和索引。--write - "migrar para o formato novo" -> 先以试运行(dry-run)模式执行,然后在执行
migrate前,询问用户确认建议的wiki位置和索引。--write - "corrigir qmd", "managed qmd", "patch qmd" -> 执行,仅在获得明确的写入/网络权限后,再解释或执行QMD修复操作。
doctor
Workflow
工作流程
- Run first.
scripts/wiki-init.ts doctor --project <path> - Read the report: wiki layout, AGENTS/CLAUDE, harnesses, hooks, drift, QMD status.
- For changes, run or
installwithoutmigrateand show the planned file actions plus the suggested topology.--write - 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.
- Only run with after passing explicit
--writeand--wiki. The script blocks writes without those flags.--index - Re-run after writes.
doctor - If the target project needs an index, initialize QMD with the generated wrapper: , then
<wrapper> collection add <wiki-path> --name knowledge-base --mask "**/*.md"and<wrapper> update.<wrapper> embed - Run before changing reusable templates or scripts.
scripts/validate-wiki-init.ts
- 首先执行。
scripts/wiki-init.ts doctor --project <path> - 读取报告内容:wiki布局、AGENTS/CLAUDE配置、工具集、钩子、偏差情况、QMD状态。
- 若需要变更,先不带参数执行
--write或install,展示计划的文件操作以及建议的拓扑结构。migrate - 用通俗易懂的语言询问用户确认wiki的存放位置和将使用的QMD索引,无需用户知晓预设名称。
- 仅在传入明确的和
--wiki参数后,方可带--index参数执行脚本。脚本在缺少这些标志时会阻止写入操作。--write - 写入完成后重新执行。
doctor - 若目标项目需要索引,使用生成的包装器初始化QMD:,随后执行
<wrapper> collection add <wiki-path> --name knowledge-base --mask "**/*.md"和<wrapper> update。<wrapper> embed - 在修改可复用模板或脚本前,先执行。
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 .
--writeCommon 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 --writePresets
预设配置
Use for the supported project shapes: local wiki, central sibling wiki, multi-repo org wiki, and docs-only migration.
references/presets.md参考获取支持的项目形态:本地wiki、中央同级wiki、多仓库组织wiki,以及仅文档迁移。
references/presets.mdBoundaries
边界限制
- 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 . 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.
bunx - Keep templates inside this skill directory.
- 请勿自动摄取wiki内容。钩子仅触发信号,由agent进行语义层面的决策。
- 未经用户明确许可,请勿全局修补或安装QMD。
- 优先为QMD使用受管理的项目包装器,而非shell别名或。包装器必须附带来源清单,记录被包装的二进制文件、版本、补丁报告、语言以及嵌入模型。该操作默认无网络连接,不会自动克隆/更新QMD。
bunx - 模板需保存在当前Skill目录内。