Wiki logo

Wiki

Community
ChavesLiu
wiki

知识库管理工具。收录素材、查询知识、健康检查、重置删除。 TRIGGER when: 用户提到「收录」「加到知识库」「ingest」,或提出知识库中可能有答案的问题(如「XX 是什么」「对比 XX 和 YY」「整理 XX 的信息」),或要求「检查知识库」「lint」,或要求「清空」「删除」「重置」知识库内容,或给出对知识库操作方式的反馈/偏好。 DO NOT TRIGGER when: 问题与知识库无关(纯代码任务、文件操作、通用对话),或用户明确说不需要查知识库。

Overview

PublisherChavesLiu
Repositorysecond-brain-skill
Skill namewiki
Stars
71
Forks
14
Bundled files
13
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 13 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ChavesLiu on GitHub. Read the source before you install it.

Installation

Install the Wiki AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ChavesLiu/second-brain-skill/tree/main/skills/wiki
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ChavesLiu/second-brain-skill.git /tmp/second-brain-skill
mkdir -p .claude/skills
cp -r /tmp/second-brain-skill/skills/wiki .claude/skills/wiki
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Wiki in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Wiki on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Wiki is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Second Brain Skill

知识库的统一管理入口。支持命令式调用(/wiki <cmd>)和自然语言触发。

自然语言路由

当 skill 被自然语言触发(非 /wiki 命令格式)时,先判断意图再映射子命令:

用户意图映射子命令示例
收录/添加素材ingest"收录这篇文章"、"把 raw 里的新文件加到知识库"
提问/查询/对比/整理query"Memex 是什么"、"对比 RAG 和 Wiki 模式"、"整理一下 XX 的信息"
反馈/偏好/纠正query(走反馈分支)"回答要标注来源"、"你上次说错了"
检查/审计lint"检查下知识库有没有问题"
删除/清空/重置wipe"删掉 XX 相关的页面"、"重置知识库"
初始化init"创建一个新的知识库"

确定子命令后,将用户原始输入作为 args,进入下方执行步骤。

执行步骤

1. 运行路由脚本

运行 python <skill-dir>/scripts/router.py <子命令> [参数] 获取路由结果(JSON)。

<skill-dir> 为本文件所在目录的绝对路径。对于自然语言触发,先按上表映射出子命令再调用。

2. 根据路由结果执行

根据 JSON 中的 status 字段分支:

status: "ok" — 正常执行
路由结果字段:
  subcommand  — 子命令名
  args        — 子命令参数
  workflow    — 工作流文件路径(相对于 skill 目录)
  schema      — SCHEMA.md 路径(需要时非 null)
  kb          — 知识库信息(id, name, root, wiki, raw, lang)
  skill_dir   — skill 目录绝对路径
  multiple_kbs — 是否有多个知识库(可选)
  kb_list     — 知识库列表(可选,multiple_kbs 时出现)

执行顺序:

  1. 如果 schema 非 null → 读取 <skill_dir>/<schema> 了解页面规范
  2. 如果 <kb.wiki>/conventions.md 存在 → 读取,作为本次操作的额外约束(用户对该知识库的操作偏好)
  3. 读取 <skill_dir>/<workflow> 获取工作流
  4. 用 kb 中的路径(root、wiki、raw)和语言(lang)替换 workflow 中的 KB_ROOT、KB_WIKI、KB_RAW、KB_LANG
  5. 按工作流执行,args 作为子命令参数传入,遵守 conventions.md 中的约定
  6. 如果 multiple_kbs 为 true,先告知用户当前使用的是哪个知识库(kb.name),提示可在 registries.json 中修改 default
status: "select" — 需要用户选择知识库

用 AskUserQuestion 展示 kb_list 让用户选择,然后用选中的知识库信息继续执行。选择后更新 registries.json 的 default 字段。

status: "no_kb" — 无知识库

输出: ⚠️ {message}

status: "error" — 错误

输出错误信息。

subcommand: "help" — 帮助

直接输出:

Second Brain — LLM 驱动的知识库管理工具

命令:
  /wiki init                  创建并注册一个新的知识库
  /wiki ingest [文件名]       收录 raw/ 中的新素材(不指定则收录全部)
  /wiki query <问题>          基于知识库回答问题
  /wiki lint                  知识库健康检查
  /wiki wipe [子命令]         重置/删除(all | <关键词> | trash | restore | empty-trash)
  /wiki test                  自动化测试
  /wiki help                  显示本帮助

首次使用请先运行 /wiki init

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Wiki AI skill do?

知识库管理工具。收录素材、查询知识、健康检查、重置删除。 TRIGGER when: 用户提到「收录」「加到知识库」「ingest」,或提出知识库中可能有答案的问题(如「XX 是什么」「对比 XX 和 YY」「整理 XX 的信息」),或要求「检查知识库」「lint」,或要求「清空」「删除」「重置」知识库内容,或给出对知识库操作方式的反馈/偏好。 DO NOT TRIGGER when: 问题与知识库无关(纯代码任务、文件操作、通用对话),或用户明确说不需要查知识库。

Why use Wiki on TypingMind?

Because you install it once and use it with any model. Wiki is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Wiki in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ChavesLiu/second-brain-skill/tree/main/skills/wiki. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Wiki?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Wiki?

As many as you like. As long as a model supports skills, you can use Wiki with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Wiki AI skill free?

Yes. It is published on GitHub by ChavesLiu under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇