wiki-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Wiki Init

Wiki 初始化

Bootstrap a new LLM-maintained wiki at a user-specified path.
在用户指定路径搭建由LLM维护的新知识库。

Pre-flight

初始化检查

Check whether a
SCHEMA.md
already exists nearby. If yes, ask the user if they want to reinitialize or just continue with the existing wiki.
检查当前路径附近是否已存在
SCHEMA.md
文件。若存在,询问用户是要重新初始化还是继续使用现有知识库。

Process

操作流程

1. Gather configuration (one question at a time)

1. 收集配置信息(一次一个问题)

Ask:
  1. Where should the wiki live? (absolute path, e.g.
    ~/wikis/ml-research
    )
  2. What is the domain/purpose? (one sentence)
  3. What types of sources will you add? (papers, URLs, code files, transcripts, etc.)
  4. What categories should
    index.md
    use?
    • Research default:
      Sources | Entities | Concepts | Analyses
    • Codebase default:
      Modules | APIs | Decisions | Flows
      — see
      codebase.md
      in this skill's directory for detailed codebase guidance
    • Or specify custom
询问:
  1. 知识库的存储路径是哪里?(绝对路径,例如
    ~/wikis/ml-research
  2. 知识库的领域/用途是什么?(一句话描述)
  3. 你将添加哪些类型的源文件?(论文、URL链接、代码文件、文字记录等)
  4. index.md
    应使用哪些分类?
    • 研究领域默认分类:
      Sources | Entities | Concepts | Analyses
    • 代码库默认分类:
      Modules | APIs | Decisions | Flows
      — 如需详细的代码库指导,请查看本技能目录下的
      codebase.md
      文件
    • 或自定义分类

2. Create directory structure

2. 创建目录结构

<wiki-root>/
├── SCHEMA.md         ← conventions + absolute path (how other skills find the wiki)
├── raw/              ← immutable source documents (you add these, LLM never modifies)
├── wiki/
│   ├── index.md      ← content catalog: every page, one-line summary, by category
│   ├── log.md        ← append-only operation log
│   ├── overview.md   ← evolving synthesis of everything known
│   └── pages/        ← all wiki pages, flat, slug-named (NO subdirectories)
└── assets/           ← downloaded images, PDFs, attachments
Critical:
wiki/pages/
is flat. All pages live here as
<slug>.md
. No subdirectories. Slugs are lowercase, hyphen-separated.
<wiki-root>/
├── SCHEMA.md         ← 规范约定 + 绝对路径(供其他技能定位知识库)
├── raw/              ← 不可修改的源文档(由用户添加,LLM不会修改)
├── wiki/
│   ├── index.md      ← 内容目录:所有页面、单行摘要,按分类整理
│   ├── log.md        ← 仅追加的操作日志
│   ├── overview.md   ← 动态更新的全知识库内容总结
│   └── pages/        ← 所有知识库页面,扁平化存储,采用slug命名(无任何子目录)
└── assets/           ← 下载的图片、PDF、附件等
重点注意:
wiki/pages/
为扁平化结构。所有页面均以
<slug>.md
的形式存储于此,不设子目录。Slug采用小写字母,以连字符分隔。

3. Write
SCHEMA.md

3. 编写
SCHEMA.md
文件

markdown
undefined
markdown
undefined

Wiki Schema

知识库规范

Identity

基本信息

  • Path: <absolute path to wiki-root>
  • Domain: <user's domain description>
  • Source types: <list>
  • Created: <YYYY-MM-DD>
  • Path: <absolute path to wiki-root>
  • Domain: <user's domain description>
  • Source types: <list>
  • Created: <YYYY-MM-DD>

Page Frontmatter

页面前置元数据

Every wiki page must start with:

title: <page title> tags: [tag1, tag2] sources: [source-slug1] updated: YYYY-MM-DD

所有知识库页面必须以以下内容开头:

title: <page title> tags: [tag1, tag2] sources: [source-slug1] updated: YYYY-MM-DD

Cross-References

交叉引用

Use
[[slug]]
where slug = filename without
.md
. Example:
[[transformer-architecture]]
wiki/pages/transformer-architecture.md
使用
[[slug]]
进行交叉引用,其中slug为不带
.md
的文件名。 示例:
[[transformer-architecture]]
wiki/pages/transformer-architecture.md

Citations

引用规范

Cite every non-common-knowledge factual claim. "Common knowledge" = uncontroversial, undergraduate-level facts in this wiki's domain. Granularity is paragraph or claim, never per-sentence. If you cannot produce a citation in one of the forms below, find one, weaken the claim, or drop it.
Format: Markdown footnotes. Two citation kinds, three valid targets.
Quote citation (preferred):
The model uses 8 attention heads.[^1]

[^1]: [[attention-is-all-you-need]] §3.2.2 — "We employ h = 8 parallel attention layers"
Synthesis citation (when no single quote captures the claim):
The architecture is fundamentally an encoder-decoder with attention.[^2]

[^2]: [[attention-is-all-you-need]] §3.2-3.4 [synthesis] — encoder, decoder, and
      attention sections together describe the full multi-head architecture
Three rules for every footnote:
  1. The cited target is one of three forms:
    • [[source-slug]]
      — a source-type wiki page (preferred for sources you've ingested via
      wiki-ingest
      )
    • raw/<file>
      or
      assets/<file>
      — a path to a local file (for drive-by citations where a synthesis page isn't worth creating)
    • <URL>
      — a live URL, tweet, or ephemeral source (no local copy required)
    Never cite entity, concept, or analysis pages — those are syntheses, not sources.
  2. A locator is present:
    §<section>
    ,
    p.<n>
    ,
    [HH:MM:SS]
    for transcripts, URL anchor for web, or
    (YYYY-MM-DD)
    for dated posts.
  3. Either a verbatim quote, or the
    [synthesis]
    tag plus a description
    of what the cited range supports. No third option.
Drive-by citation examples:
[^3]: raw/scaling-laws.pdf p.7 — "loss scales as a power law in compute"
[^4]: https://twitter.com/user/status/123 (2026-04-15) — "<tweet text>"
所有非常识性的事实性声明必须添加引用。「常识」指本知识库领域内无争议的本科阶段知识。引用粒度为段落或单个声明,无需逐句引用。若无法以下列格式之一提供引用,请补充引用、弱化声明或删除该内容。
格式:Markdown脚注。分为两种引用类型,三种有效引用目标。
直接引用(优先使用):
该模型使用8个注意力头。[^1]

[^1]: [[attention-is-all-you-need]] §3.2.2 — "We employ h = 8 parallel attention layers"
整合引用(当无单个引文可支撑声明时使用):
该架构本质上是带有注意力机制的编码器-解码器结构。[^2]

[^2]: [[attention-is-all-you-need]] §3.2-3.4 [synthesis] — 编码器、解码器和注意力机制章节共同描述了完整的多头注意力架构
每条脚注需遵循三条规则:
  1. 引用目标必须为以下三种形式之一:
    • [[source-slug]]
      — 源文件类型的知识库页面(优先用于已通过
      wiki-ingest
      导入的源文件)
    • raw/<file>
      assets/<file>
      — 本地文件路径(用于临时引用,无需创建整合页面的场景)
    • <URL>
      — 在线链接、推文或临时源文件(无需本地副本)
    禁止引用实体、概念或分析类页面——这些属于整合内容,而非源文件。
  2. 必须包含定位信息:
    §<章节号>
    p.<页码>
    、音频/视频文字记录使用
    [HH:MM:SS]
    、网页使用URL锚点、带日期的帖子使用
    (YYYY-MM-DD)
  3. **必须包含逐字引用内容,或带有
    [synthesis]
    标签并描述引用范围所支撑的内容。**无其他选项。
临时引用示例:
[^3]: raw/scaling-laws.pdf p.7 — "loss scales as a power law in compute"
[^4]: https://twitter.com/user/status/123 (2026-04-15) — "<tweet text>"

Log Entry Format

日志条目格式

[YYYY-MM-DD] <operation> | <title>

[YYYY-MM-DD] <operation> | <title>

Operations: init, ingest, query, update, lint, audit
操作类型:init, ingest, query, update, lint, audit

Index Categories

索引分类

<one per line, matching the user's chosen taxonomy>
<每行一个,与用户选择的分类体系一致>

Conventions

规范约定

  • raw/ is immutable — skills never modify it
  • log.md is append-only — never rewritten, only appended
  • index.md is updated on every operation that adds or changes pages
  • All pages live flat in wiki/pages/ — no subdirectories
  • overview.md reflects the current synthesis across all sources <if codebase domain>
  • README boundary: wiki pages must not duplicate README content. Extract structural signals; link to the README for operational content (setup, contributing, running). When ingesting any README, also evaluate it for gaps and suggest edits. </if>
undefined
  • raw/目录不可修改——任何技能都不得修改该目录内容
  • log.md仅允许追加内容——不得重写,只能追加
  • 每次添加或修改页面的操作都会更新index.md
  • 所有页面均扁平化存储在wiki/pages/——无任何子目录
  • overview.md反映当前所有源文件的整合内容 <若为代码库领域>
  • README边界:知识库页面不得重复README内容。提取结构化信息;对于操作类内容(安装、贡献、运行),请链接至README。导入任何README文件时,还需评估其内容缺口并建议修改。 </if>
undefined

4. Write
wiki/index.md

4. 编写
wiki/index.md
文件

markdown
undefined
markdown
undefined

Wiki Index — <domain>

知识库索引 — <domain>

<for each category>
<针对每个分类>

<Category Name>

<分类名称>

<!-- entries added by wiki-ingest -->
undefined
<!-- 由wiki-ingest添加条目 -->
undefined

5. Write
wiki/log.md

5. 编写
wiki/log.md
文件

markdown
undefined
markdown
undefined

Wiki Log

知识库操作日志

Append-only. Format:
## [YYYY-MM-DD] <operation> | <title>
Recent entries:
grep "^## \[" log.md | tail -10

仅允许追加内容。格式:
## [YYYY-MM-DD] <操作类型> | <标题>
查看最近条目:
grep "^## \[" log.md | tail -10

[<today>] init | <domain>

[<today>] init | <domain>

undefined
undefined

6. Write
wiki/overview.md

6. 编写
wiki/overview.md
文件

markdown
---
title: Overview
tags: [overview, synthesis]
sources: []
updated: <today>
---
markdown
---
title: Overview
tags: [overview, synthesis]
sources: []
updated: <today>
---

<Domain> — Overview

<Domain> — 概述

Evolving synthesis of everything in the wiki. Updated by wiki-ingest when sources shift the understanding.
本知识库所有内容的动态整合总结。当源文件更新导致认知变化时,由wiki-ingest自动更新。

Current Understanding

当前认知

No sources ingested yet.
尚未导入任何源文件。

Open Questions

待解决问题

Add questions here as they arise.
如有问题,请在此处添加。

Key Entities / Concepts

核心实体/概念

Populated as pages are created.
undefined
随页面创建自动填充。
undefined

7. Confirm

7. 完成确认

Tell the user:
  • Wiki initialized at
    <path>
  • Add sources to
    raw/
    manually, or run
    wiki-ingest
    directly with a URL or file path
  • Run
    wiki-lint
    periodically to keep the wiki healthy
  • SCHEMA.md
    is how all other skills locate this wiki — do not move or delete it
告知用户:
  • 知识库已在
    <path>
    完成初始化
  • 可手动将源文件添加至
    raw/
    目录,或直接运行
    wiki-ingest
    并传入URL链接或文件路径
  • 定期运行
    wiki-lint
    以保持知识库的规范性
  • SCHEMA.md
    是其他技能定位本知识库的依据——请勿移动或删除该文件