brain-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Brain Init

Brain 初始化

Initialize the Claude Brain Logseq graph or add a new project page to an existing graph.
初始化Claude Brain Logseq图谱,或向现有图谱添加新的项目页面。

Prerequisites

前提条件

Resolve the graph path per
skills/_shared/path-resolution.md
. If the resolved folder is empty or missing core files, this skill performs first-time setup (below). Otherwise it adds a new project to the existing graph.
按照
skills/_shared/path-resolution.md
解析图谱路径。如果解析后的文件夹为空或缺少核心文件,该技能将执行首次设置(如下)。否则,将向现有图谱添加新项目。

First-Time Graph Setup

首次图谱设置

If the graph folder is empty or missing core files, initialize it:
  1. Create
    logseq/config.edn
    with minimal Logseq config:
clojure
{:meta/version 1
 :preferred-format "Markdown"
 :journal/page-title-format "yyyy-MM-dd"
 :journal/file-name-format "yyyy_MM_dd"}
  1. Create
    pages/Index.md
    — the master index page:
markdown
type:: index
description:: Master index of Claude's brain — all projects and key pages

- ## Projects
  - _No projects yet. Use "init brain project [name]" to add one._
- ## Quick Links
  - [[Meta]] — preferences, working style, conventions
  - [[Decisions]] — cross-project decision log
  1. Create
    pages/Meta.md
    — for storing user preferences and conventions:
markdown
type:: meta
last-updated:: {{today}}

- ## User Preferences
  - _Add preferences as they emerge from working sessions._
- ## Conventions
  - _Add naming conventions, coding style preferences, etc._
- ## Tools & Stack
  - _Add commonly used tools, languages, frameworks._
  1. Create
    pages/Decisions.md
    — cross-project decision log:
markdown
type:: decisions
last-updated:: {{today}}

- ## Decision Log
  - _Decisions that span multiple projects or are general in nature._
  1. Create the
    journals/
    directory with a
    .gitkeep
    file to ensure it persists in version control. Use
    mkdir -p
    via Bash or create
    journals/.gitkeep
    with the Write tool. This directory must exist before brain-save can write journal entries — do not skip this step.
Replace
{{today}}
with the current date in
yyyy-MM-dd
format.
Confirm to the user that the graph is ready and they can open it in Logseq.
After confirmation, write a journey-log entry per
skills/_shared/journey-log.md
with the activity line:
initialized graph at <graphPath>
.
如果图谱文件夹为空或缺少核心文件,请进行初始化:
  1. 创建
    logseq/config.edn
    文件,包含基础Logseq配置:
clojure
{:meta/version 1
 :preferred-format "Markdown"
 :journal/page-title-format "yyyy-MM-dd"
 :journal/file-name-format "yyyy_MM_dd"}
  1. 创建
    pages/Index.md
    ——主索引页面:
markdown
type:: index
description:: Master index of Claude's brain — all projects and key pages

- ## Projects
  - _No projects yet. Use "init brain project [name]" to add one._
- ## Quick Links
  - [[Meta]] — preferences, working style, conventions
  - [[Decisions]] — cross-project decision log
  1. 创建
    pages/Meta.md
    ——用于存储用户偏好和约定:
markdown
type:: meta
last-updated:: {{today}}

- ## User Preferences
  - _Add preferences as they emerge from working sessions._
- ## Conventions
  - _Add naming conventions, coding style preferences, etc._
- ## Tools & Stack
  - _Add commonly used tools, languages, frameworks._
  1. 创建
    pages/Decisions.md
    ——跨项目决策日志:
markdown
type:: decisions
last-updated:: {{today}}

- ## Decision Log
  - _Decisions that span multiple projects or are general in nature._
  1. 创建
    journals/
    目录并添加
    .gitkeep
    文件,确保其在版本控制中保留。通过Bash执行
    mkdir -p
    命令,或使用Write工具创建
    journals/.gitkeep
    文件。在brain-save能够写入日志条目之前,该目录必须存在——请勿跳过此步骤。
{{today}}
替换为
yyyy-MM-dd
格式的当前日期。
向用户确认图谱已准备就绪,可在Logseq中打开。
确认后,按照
skills/_shared/journey-log.md
写入一条旅程日志,活动内容为:
initialized graph at <graphPath>

Adding a New Project

添加新项目

When the user wants to add a project (e.g., "add MyProject to brain", "init brain project GameDev"):
  1. Determine the project name from the user's request.
  2. Create the project page at
    pages/Projects___<ProjectName>.md
    using the template from
    references/templates.md
    . The triple underscore
    ___
    is how Logseq represents the
    /
    namespace separator in filenames — so this page will appear as
    Projects/ProjectName
    in the Logseq sidebar.
  3. Update
    pages/Index.md
    — add a link to the new project under the Projects section:
    • [[Projects/<ProjectName>]] — <brief description>
  4. Ask the user for a brief description and any initial context for the project (tech stack, repo location, key info). Populate the Overview section.
Confirm the project page was created and remind the user they can now use "save to brain" during work sessions and "load [project]" to restore context.
After confirmation, write a journey-log entry per
skills/_shared/journey-log.md
with the activity line:
created project [[Projects/<ProjectName>]]
.
当用户想要添加项目时(例如:"add MyProject to brain"、"init brain project GameDev"):
  1. 从用户请求中确定项目名称。
  2. 使用
    references/templates.md
    中的模板,在
    pages/Projects___<ProjectName>.md
    路径下创建项目页面。三重下划线
    ___
    是Logseq在文件名中表示
    /
    命名空间分隔符的方式——因此该页面在Logseq侧边栏中会显示为
    Projects/ProjectName
  3. 更新
    pages/Index.md
    ——在Projects部分下添加指向新项目的链接:
    • [[Projects/<ProjectName>]] — <brief description>
  4. 向用户询问项目的简要描述和初始上下文(技术栈、仓库位置、关键信息)。填充Overview部分。
确认项目页面已创建,并提醒用户现在可以在工作会话中使用"save to brain",以及使用"load [project]"恢复上下文。
确认后,按照
skills/_shared/journey-log.md
写入一条旅程日志,活动内容为:
created project [[Projects/<ProjectName>]]

Date Format

日期格式

Always use
yyyy-MM-dd
format for dates (e.g.,
2026-04-12
). This matches Logseq's journal format and sorts correctly.
日期始终使用
yyyy-MM-dd
格式(例如:
2026-04-12
)。这与Logseq的日志格式匹配,并且排序正确。

Important Notes

重要说明

  • See
    CLAUDE.md
    "Logseq format invariants" for namespace separators, bullet format, properties, link syntax, and date format.
  • When creating the
    journals/
    directory, use Bash (
    mkdir -p
    ) or the Write tool to ensure it exists — do not skip this step.
  • 请查看
    CLAUDE.md
    中的"Logseq format invariants",了解命名空间分隔符、项目符号格式、属性、链接语法和日期格式的要求。
  • 创建
    journals/
    目录时,请使用Bash(
    mkdir -p
    )或Write工具确保其存在——请勿跳过此步骤。