brain-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrain 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 . 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按照解析图谱路径。如果解析后的文件夹为空或缺少核心文件,该技能将执行首次设置(如下)。否则,将向现有图谱添加新项目。
skills/_shared/path-resolution.mdFirst-Time Graph Setup
首次图谱设置
If the graph folder is empty or missing core files, initialize it:
- Create with minimal Logseq config:
logseq/config.edn
clojure
{:meta/version 1
:preferred-format "Markdown"
:journal/page-title-format "yyyy-MM-dd"
:journal/file-name-format "yyyy_MM_dd"}- Create — the master index page:
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- Create — for storing user preferences and conventions:
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._- Create — cross-project decision log:
pages/Decisions.md
markdown
type:: decisions
last-updated:: {{today}}
- ## Decision Log
- _Decisions that span multiple projects or are general in nature._- Create the directory with a
journals/file to ensure it persists in version control. Use.gitkeepvia Bash or createmkdir -pwith the Write tool. This directory must exist before brain-save can write journal entries — do not skip this step.journals/.gitkeep
Replace with the current date in format.
{{today}}yyyy-MM-ddConfirm to the user that the graph is ready and they can open it in Logseq.
After confirmation, write a journey-log entry per with the activity line: .
skills/_shared/journey-log.mdinitialized graph at <graphPath>如果图谱文件夹为空或缺少核心文件,请进行初始化:
- 创建文件,包含基础Logseq配置:
logseq/config.edn
clojure
{:meta/version 1
:preferred-format "Markdown"
:journal/page-title-format "yyyy-MM-dd"
:journal/file-name-format "yyyy_MM_dd"}- 创建——主索引页面:
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- 创建——用于存储用户偏好和约定:
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._- 创建——跨项目决策日志:
pages/Decisions.md
markdown
type:: decisions
last-updated:: {{today}}
- ## Decision Log
- _Decisions that span multiple projects or are general in nature._- 创建目录并添加
journals/文件,确保其在版本控制中保留。通过Bash执行.gitkeep命令,或使用Write工具创建mkdir -p文件。在brain-save能够写入日志条目之前,该目录必须存在——请勿跳过此步骤。journals/.gitkeep
将替换为格式的当前日期。
{{today}}yyyy-MM-dd向用户确认图谱已准备就绪,可在Logseq中打开。
确认后,按照写入一条旅程日志,活动内容为:。
skills/_shared/journey-log.mdinitialized 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"):
-
Determine the project name from the user's request.
-
Create the project page atusing the template from
pages/Projects___<ProjectName>.md. The triple underscorereferences/templates.mdis how Logseq represents the___namespace separator in filenames — so this page will appear as/in the Logseq sidebar.Projects/ProjectName -
Update— add a link to the new project under the Projects section:
pages/Index.md[[Projects/<ProjectName>]] — <brief description>
-
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 with the activity line: .
skills/_shared/journey-log.mdcreated project [[Projects/<ProjectName>]]当用户想要添加项目时(例如:"add MyProject to brain"、"init brain project GameDev"):
-
从用户请求中确定项目名称。
-
使用中的模板,在
references/templates.md路径下创建项目页面。三重下划线pages/Projects___<ProjectName>.md是Logseq在文件名中表示___命名空间分隔符的方式——因此该页面在Logseq侧边栏中会显示为/。Projects/ProjectName -
更新——在Projects部分下添加指向新项目的链接:
pages/Index.md[[Projects/<ProjectName>]] — <brief description>
-
向用户询问项目的简要描述和初始上下文(技术栈、仓库位置、关键信息)。填充Overview部分。
确认项目页面已创建,并提醒用户现在可以在工作会话中使用"save to brain",以及使用"load [project]"恢复上下文。
确认后,按照写入一条旅程日志,活动内容为:。
skills/_shared/journey-log.mdcreated project [[Projects/<ProjectName>]]Date Format
日期格式
Always use format for dates (e.g., ). This matches Logseq's journal format and sorts correctly.
yyyy-MM-dd2026-04-12日期始终使用格式(例如:)。这与Logseq的日志格式匹配,并且排序正确。
yyyy-MM-dd2026-04-12Important Notes
重要说明
- See "Logseq format invariants" for namespace separators, bullet format, properties, link syntax, and date format.
CLAUDE.md - When creating the directory, use Bash (
journals/) or the Write tool to ensure it exists — do not skip this step.mkdir -p
- 请查看中的"Logseq format invariants",了解命名空间分隔符、项目符号格式、属性、链接语法和日期格式的要求。
CLAUDE.md - 创建目录时,请使用Bash(
journals/)或Write工具确保其存在——请勿跳过此步骤。mkdir -p