second-brain

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Second Brain — Onboarding Wizard

第二大脑——入门向导

Set up a new Obsidian knowledge base using the LLM Wiki pattern. The LLM acts as librarian — reading raw sources, compiling them into a structured interlinked wiki, and maintaining it over time.
使用LLM Wiki模式搭建新的Obsidian知识库。LLM将担任图书管理员的角色:读取原始资源,将其整理为结构化的互联维基,并进行长期维护。

Wizard Flow

向导流程

Guide the user through these 5 steps. Ask ONE question at a time. Each step has a sensible default — the user can accept it or provide their own value.
引导用户完成以下5个步骤。每次只提问一个问题。每个步骤都有合理的默认值,用户可以选择直接采用,也可以提供自定义值。

Step 1: Vault Name

步骤1:Vault名称

Ask:
"What would you like to name your knowledge base? This will be the folder name." Default:
second-brain
Accept any user-provided name. This becomes the folder name and the title in the agent config.
提问:
"你想给你的知识库起什么名字?这将作为文件夹名称。" 默认值:
second-brain
接受用户提供的任意名称。该名称将作为文件夹名,以及Agent配置中的标题。

Step 2: Vault Location

步骤2:Vault存储位置

Ask:
"Where should I create it? Give me a path, or I'll use the default." Default:
~/Documents/
Accept any absolute or relative path. Resolve
~
to the user's home directory. The final vault path is
{location}/{vault-name}/
.
提问:
"我应该在哪里创建这个知识库?请提供路径,否则我将使用默认路径。" 默认值:
~/Documents/
接受任意绝对路径或相对路径,将
~
解析为用户的主目录。最终的vault路径为
{location}/{vault-name}/

Step 3: Domain / Topic

步骤3:领域/主题

Ask:
"What's this knowledge base about? This helps me set up relevant tags and describe the vault's purpose."
Examples: "AI research", "competitive intelligence on fintech startups", "personal health and fitness"
Accept free text. Use this to:
  • Write a one-line domain description for the agent config
  • Generate 5-8 suggested domain-specific tags
提问:
"这个知识库的主题是什么?这将帮助我设置相关标签,描述vault的用途。"
示例:"AI研究", "金融科技初创公司竞争情报", "个人健康与健身"
接受自由文本输入,将该内容用于:
  • 为Agent配置编写一行领域描述
  • 生成5-8个与领域相关的推荐标签

Step 4: Agent Config

步骤4:Agent配置

Auto-detect which agent is running this skill. State it clearly:
"I'm running in [Agent Name], so I'll generate a [config file] for this vault."
Then ask:
"Do you use any other AI agents you'd like config files for? Options: Claude Code, Codex, Cursor, Gemini CLI — or skip."
Skip the agent that was auto-detected. Generate configs for all selected agents.
Agent detection logic:
  • If the
    CLAUDE.md
    convention is being used or the Skill tool is Claude Code's → Claude Code
  • If the environment indicates Codex → Codex
  • If
    .cursor/
    exists in the working directory → Cursor
  • If
    GEMINI.md
    convention is being used → Gemini CLI
  • If unsure, ask the user which agent they're using
自动检测运行本技能的Agent,并清晰告知用户:
"我当前运行在**[Agent名称]中,因此我将为这个vault生成[配置文件]**。"
然后提问:
"你是否还有其他使用的AI Agent需要生成对应的配置文件?可选选项:Claude Code, Codex, Cursor, Gemini CLI,也可以跳过。"
跳过已自动检测到的Agent,为所有用户选中的Agent生成配置。
Agent检测逻辑:
  • 如果使用了
    CLAUDE.md
    规范,或者本技能工具属于Claude Code → Claude Code
  • 如果环境标识为Codex → Codex
  • 如果工作目录中存在
    .cursor/
    文件夹 → Cursor
  • 如果使用了
    GEMINI.md
    规范 → Gemini CLI
  • 如果无法确定,询问用户正在使用的Agent

Step 5: Optional CLI Tools

步骤5:可选CLI工具

Ask:
"These tools extend what the LLM can do with your vault. All optional but recommended:"
  1. summarize — summarize links, files, and media from the CLI
  2. qmd — local search engine for your wiki (helpful as it grows)
  3. agent-browser — browser automation for web research
"Install all, pick specific ones (e.g. '1 and 3'), or skip?"
提问:
"以下工具可以扩展LLM对你的vault的处理能力。所有工具都是可选的,但推荐安装:"
  1. summarize — 通过CLI为链接、文件和媒体生成摘要
  2. qmd — 你的维基的本地搜索引擎,知识库规模扩大后非常实用
  3. agent-browser — 用于网页研究的浏览器自动化工具
"是全部安装,选择特定工具(例如“1和3”),还是跳过?"

Post-Wizard: Scaffold the Vault

向导完成后:搭建Vault基础结构

After collecting all answers, execute these steps in order:
收集完所有答案后,按顺序执行以下步骤:

1. Create directory structure

1. 创建目录结构

Run the onboarding script, passing the full vault path:
bash <skill-directory>/scripts/onboarding.sh <vault-path>
This creates all directories and the initial
wiki/index.md
and
wiki/log.md
files.
运行入门脚本,传入完整的vault路径:
bash <skill-directory>/scripts/onboarding.sh <vault-path>
该命令会创建所有目录,以及初始的
wiki/index.md
wiki/log.md
文件。

2. Generate agent config file(s)

2. 生成Agent配置文件

For each selected agent, read the corresponding template from
<skill-directory>/references/agent-configs/
:
AgentTemplateOutput FileOutput Location
Claude Code
claude-code.md
CLAUDE.md
Vault root
Codex
codex.md
AGENTS.md
Vault root
Cursor
cursor.md
second-brain.mdc
<vault>/.cursor/rules/
Gemini CLI
gemini.md
GEMINI.md
Vault root
For each template, replace the placeholders:
  • {{VAULT_NAME}}
    → the vault name from Step 1
  • {{DOMAIN_DESCRIPTION}}
    → a one-line description derived from Step 3
  • {{DOMAIN_TAGS}}
    → generate 5-8 domain-relevant tags as a bullet list based on the domain from Step 3
  • {{WIKI_SCHEMA}}
    → read
    <skill-directory>/references/wiki-schema.md
    and insert everything from
    ## Architecture
    onward
Write the generated config to the vault.
对于每个选中的Agent,从
<skill-directory>/references/agent-configs/
读取对应的模板:
Agent模板输出文件输出位置
Claude Code
claude-code.md
CLAUDE.md
Vault根目录
Codex
codex.md
AGENTS.md
Vault根目录
Cursor
cursor.md
second-brain.mdc
<vault>/.cursor/rules/
Gemini CLI
gemini.md
GEMINI.md
Vault根目录
对于每个模板,替换以下占位符:
  • {{VAULT_NAME}}
    → 步骤1中得到的vault名称
  • {{DOMAIN_DESCRIPTION}}
    → 从步骤3的输入衍生的一行领域描述
  • {{DOMAIN_TAGS}}
    → 根据步骤3的领域生成5-8个相关标签,以无序列表形式呈现
  • {{WIKI_SCHEMA}}
    → 读取
    <skill-directory>/references/wiki-schema.md
    ,插入从
    ## Architecture
    开始的所有内容
将生成的配置写入vault对应的位置。

3. Update wiki/log.md

3. 更新wiki/log.md

Append the setup entry:
undefined
追加设置记录:
undefined

[YYYY-MM-DD] setup | Vault initialized

[YYYY-MM-DD] setup | Vault初始化完成

Created vault "{{VAULT_NAME}}" for {{DOMAIN_DESCRIPTION}}. Agent configs: {{list of generated config files}}.
undefined
为{{DOMAIN_DESCRIPTION}}创建了vault "{{VAULT_NAME}}"。 已生成的Agent配置:{{生成的配置文件列表}}。
undefined

4. Install CLI tools (if selected)

4. 安装CLI工具(如果用户选择)

For each tool the user selected in Step 5, run the install command:
  • summarize:
    npm i -g @steipete/summarize
  • qmd:
    npm i -g @tobilu/qmd
  • agent-browser:
    npm i -g agent-browser && agent-browser install
After each install, verify with
<tool> --version
. Report success or failure for each.
对于用户在步骤5中选中的每个工具,运行对应的安装命令:
  • summarize:
    npm i -g @steipete/summarize
  • qmd:
    npm i -g @tobilu/qmd
  • agent-browser:
    npm i -g agent-browser && agent-browser install
每次安装完成后,通过
<tool> --version
验证安装结果,向用户报告每个工具的安装成功或失败状态。

5. Print summary

5. 打印汇总信息

Show the user:
  1. What was created — directory tree and config files
  2. Required next step — install the Obsidian Web Clipper browser extension:
    Install the Obsidian Web Clipper to easily save web articles into your vault: https://chromewebstore.google.com/detail/obsidian-web-clipper/cnjifjpddelmedmihgijeibhnjfabmlf
  3. How to start — open the vault folder in Obsidian, clip an article to
    raw/
    , then run
    /second-brain-ingest
向用户展示以下内容:
  1. 已创建的内容 — 目录结构和配置文件
  2. 必填后续步骤 — 安装Obsidian Web Clipper浏览器扩展:
    安装Obsidian网页剪藏插件,可轻松将网页文章保存到你的vault中: https://chromewebstore.google.com/detail/obsidian-web-clipper/cnjifjpddelmedmihgijeibhnjfabmlf
  3. 使用入门 — 在Obsidian中打开vault文件夹,将一篇文章剪藏到
    raw/
    目录,然后运行
    /second-brain-ingest
    命令

Reference Files

参考文件

These files are bundled with this skill and available at
<skill-directory>/references/
:
  • wiki-schema.md
    — canonical wiki rules (single source of truth for all agent configs)
  • tooling.md
    — CLI tool details, install commands, and verification steps
  • agent-configs/claude-code.md
    — CLAUDE.md template
  • agent-configs/codex.md
    — AGENTS.md template
  • agent-configs/cursor.md
    — Cursor rules template
  • agent-configs/gemini.md
    — GEMINI.md template
这些文件随本技能打包,可在
<skill-directory>/references/
路径下获取:
  • wiki-schema.md
    — 标准维基规则(所有Agent配置的唯一可信源)
  • tooling.md
    — CLI工具详情、安装命令和验证步骤
  • agent-configs/claude-code.md
    — CLAUDE.md模板
  • agent-configs/codex.md
    — AGENTS.md模板
  • agent-configs/cursor.md
    — Cursor规则模板
  • agent-configs/gemini.md
    — GEMINI.md模板