wiki-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWiki Init
Wiki 初始化
Bootstrap a new LLM-maintained wiki at a user-specified path.
在用户指定路径搭建由LLM维护的新知识库。
Pre-flight
初始化检查
Check whether a already exists nearby. If yes, ask the user if they want to reinitialize or just continue with the existing wiki.
SCHEMA.md检查当前路径附近是否已存在文件。若存在,询问用户是要重新初始化还是继续使用现有知识库。
SCHEMA.mdProcess
操作流程
1. Gather configuration (one question at a time)
1. 收集配置信息(一次一个问题)
Ask:
- Where should the wiki live? (absolute path, e.g. )
~/wikis/ml-research - What is the domain/purpose? (one sentence)
- What types of sources will you add? (papers, URLs, code files, transcripts, etc.)
- What categories should use?
index.md- Research default:
Sources | Entities | Concepts | Analyses - Codebase default: — see
Modules | APIs | Decisions | Flowsin this skill's directory for detailed codebase guidancecodebase.md - Or specify custom
- Research default:
询问:
- 知识库的存储路径是哪里?(绝对路径,例如)
~/wikis/ml-research - 知识库的领域/用途是什么?(一句话描述)
- 你将添加哪些类型的源文件?(论文、URL链接、代码文件、文字记录等)
- 应使用哪些分类?
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, attachmentsCritical: is flat. All pages live here as . No subdirectories. Slugs are lowercase, hyphen-separated.
wiki/pages/<slug>.md<wiki-root>/
├── SCHEMA.md ← 规范约定 + 绝对路径(供其他技能定位知识库)
├── raw/ ← 不可修改的源文档(由用户添加,LLM不会修改)
├── wiki/
│ ├── index.md ← 内容目录:所有页面、单行摘要,按分类整理
│ ├── log.md ← 仅追加的操作日志
│ ├── overview.md ← 动态更新的全知识库内容总结
│ └── pages/ ← 所有知识库页面,扁平化存储,采用slug命名(无任何子目录)
└── assets/ ← 下载的图片、PDF、附件等重点注意:为扁平化结构。所有页面均以的形式存储于此,不设子目录。Slug采用小写字母,以连字符分隔。
wiki/pages/<slug>.md3. Write SCHEMA.md
SCHEMA.md3. 编写SCHEMA.md
文件
SCHEMA.mdmarkdown
undefinedmarkdown
undefinedWiki 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 where slug = filename without .
Example: →
[[slug]].md[[transformer-architecture]]wiki/pages/transformer-architecture.md使用进行交叉引用,其中slug为不带的文件名。
示例: →
[[slug]].md[[transformer-architecture]]wiki/pages/transformer-architecture.mdCitations
引用规范
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 architectureThree rules for every footnote:
-
The cited target is one of three forms:
- — a source-type wiki page (preferred for sources you've ingested via
[[source-slug]])wiki-ingest - or
raw/<file>— a path to a local file (for drive-by citations where a synthesis page isn't worth creating)assets/<file> - — a live URL, tweet, or ephemeral source (no local copy required)
<URL>
Never cite entity, concept, or analysis pages — those are syntheses, not sources. -
A locator is present:,
§<section>,p.<n>for transcripts, URL anchor for web, or[HH:MM:SS]for dated posts.(YYYY-MM-DD) -
Either a verbatim quote, or thetag plus a description of what the cited range supports. No third option.
[synthesis]
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] — 编码器、解码器和注意力机制章节共同描述了完整的多头注意力架构每条脚注需遵循三条规则:
-
引用目标必须为以下三种形式之一:
- — 源文件类型的知识库页面(优先用于已通过
[[source-slug]]导入的源文件)wiki-ingest - 或
raw/<file>— 本地文件路径(用于临时引用,无需创建整合页面的场景)assets/<file> - — 在线链接、推文或临时源文件(无需本地副本)
<URL>
禁止引用实体、概念或分析类页面——这些属于整合内容,而非源文件。 -
必须包含定位信息:、
§<章节号>、音频/视频文字记录使用p.<页码>、网页使用URL锚点、带日期的帖子使用[HH:MM:SS]。(YYYY-MM-DD) -
**必须包含逐字引用内容,或带有标签并描述引用范围所支撑的内容。**无其他选项。
[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>
undefined4. Write wiki/index.md
wiki/index.md4. 编写wiki/index.md
文件
wiki/index.mdmarkdown
undefinedmarkdown
undefinedWiki Index — <domain>
知识库索引 — <domain>
<for each category>
<针对每个分类>
<Category Name>
<分类名称>
<!-- entries added by wiki-ingest -->
undefined<!-- 由wiki-ingest添加条目 -->
undefined5. Write wiki/log.md
wiki/log.md5. 编写wiki/log.md
文件
wiki/log.mdmarkdown
undefinedmarkdown
undefinedWiki Log
知识库操作日志
Append-only. Format:
Recent entries:
## [YYYY-MM-DD] <operation> | <title>grep "^## \[" log.md | tail -10仅允许追加内容。格式:
查看最近条目:
## [YYYY-MM-DD] <操作类型> | <标题>grep "^## \[" log.md | tail -10[<today>] init | <domain>
[<today>] init | <domain>
undefinedundefined6. Write wiki/overview.md
wiki/overview.md6. 编写wiki/overview.md
文件
wiki/overview.mdmarkdown
---
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随页面创建自动填充。
undefined7. Confirm
7. 完成确认
Tell the user:
- Wiki initialized at
<path> - Add sources to manually, or run
raw/directly with a URL or file pathwiki-ingest - Run periodically to keep the wiki healthy
wiki-lint - is how all other skills locate this wiki — do not move or delete it
SCHEMA.md
告知用户:
- 知识库已在完成初始化
<path> - 可手动将源文件添加至目录,或直接运行
raw/并传入URL链接或文件路径wiki-ingest - 定期运行以保持知识库的规范性
wiki-lint - 是其他技能定位本知识库的依据——请勿移动或删除该文件
SCHEMA.md