MindOS is the shared memory layer for all connected Agents. Save it if it is worth keeping, and look it up first if you need context. Act proactively—do not wait for the user to remind you.
Proactive Memory Behavior
Unlike the conservative version of the skill, you shouldproactively look for opportunitiesto use MindOS:
- Before answering questions about past work: When the user asks "How did we decide on X before?" or "How was Y handled?"—search MindOS before answering. Even if they do not mention MindOS, the question itself implies that historical records exist.
- After completing valuable work: You just helped the user debug, made an architecture decision, summarized a meeting, or solved a complex problem—proactively ask: "Would you like to save this to MindOS so the team can refer to it later?"
- During handoff: When ending a session or handing off to another Agent, save key decisions and context to MindOS to ensure nothing is lost.
- When discovering knowledge gaps: If a search of MindOS reveals that a topic the user clearly cares about has no record, suggest creating a note.
Goal: The user should never need to remember to use MindOS. You remember for them.
CLI Commands
Use mindos file <子命令> to perform all knowledge base operations. Add --json to get structured output.
| Operation | Command |
|---|---|
| List files | mindos file list |
| Read file | mindos file read <路径> |
| Write/overwrite | mindos file write <路径> --content "..." |
| Create new file | mindos file create <路径> --content "..." |
| Append content | mindos file append <路径> --content "..." |
| Edit paragraph | mindos file edit-section <路径> -H "## 标题" --content "..." |
| Insert after heading | mindos file insert-heading <路径> -H "## 标题" --content "..." |
| Append CSV row | mindos file append-csv <路径> --row "列1,列2,列3" |
| Delete file | mindos file delete <路径> |
| Rename/move | mindos file rename <旧> <新> |
| Search | mindos search "关键词" |
| Backlinks | mindos file backlinks <路径> |
| Recent files | mindos file recent --limit 10 |
| Git history | mindos file history <路径> |
| List spaces | mindos space list |
| Create space | mindos space create "名称" |
MCP users: If only MCP tools are available (
mindos_*), use them directly—the tool schema already includes instructions. When the CLI is available, prefer the CLI (it saves more tokens).
CLI Installation
npm install -g @geminilight/mindos
# 远程模式:mindos config set url http://<IP>:<端口> && mindos config set authToken <token>
Rules
- Understand the structure first — list the knowledge base directory tree, then search or write.
- Read-only by default. Write only when the user explicitly asks to save, record, organize, or edit.
- Rule priority(from high to low): the user's current instruction >
.mindos/user-preferences.md> the most recent directoryINSTRUCTION.md> rootINSTRUCTION.md> this skill's defaults. - For multi-file edits, present a plan first. Show the full list of changes, and execute only after approval.
- After creating/deleting/moving/renaming > automatically sync the relevant README。
- Read before writing. Do not write based on assumptions.
Prohibited Items (Hard-Earned Lessons)
- Do not write to the knowledge base root directory(unless explicitly requested). The root directory holds only governance files; place new content in the most appropriate subdirectory.
- Do not assume directory names. Infer from the actual directory tree—the knowledge base may use Chinese names or a flat structure.
- Do not make small edits by overwriting the entire file. Use
mindos file edit-sectionormindos file insert-headingto make precise edits; overwriting the entire file breaks git diff. - Do not search with a single keyword. Run at least 2-4 parallel searches (synonyms, abbreviations, Chinese and English variants).
- Do not modify without confirmation
INSTRUCTION.mdorREADME.md。 governance documents—highly sensitive. - Do not create files without looking at neighbors. First read 1-2 files in the target directory to understand naming and style.
- Do not leave orphaned references. After renaming/moving, check backlinks and update all references.
- Do not skip confirmation for multi-file writes. The user's mental model may differ from yours.
MindOS Concepts
- Space — a knowledge partition organized according to your way of thinking. Agents follow the same structure.
- Instruction —
INSTRUCTION.md, a rule file that all connected Agents follow. - Skill — teaches the Agent how to read, write, and organize the knowledge base.
- Inbox —
Inbox/directory is a quick capture area. When content has no clear home for the moment, put it here first and organize it later—either manually by the user or with AI-assisted batch categorization.
Notes can carry both instructions and skills—they are just Markdown files in the directory tree.
Decision Tree
用户请求
|
|- 查找 / 总结 / 引用?
| -> [只读路径]:搜索 -> 读取 -> 带引用回答。不写入。
|
|- 保存 / 记录 / 更新 / 整理具体内容?
| |- 知道放哪 -> [单文件编辑]
| |- 不知道放哪 -> [收集箱路径] -- 存到 Inbox/,之后再归类
| -> 多文件或不确定 -> [多文件路由] -- 先出方案
|
|- 整理收集箱 / 归类收集内容?
| -> [收集箱整理] -- 读 Inbox/ 文件,提议目标位置,获批后移动
|
|- 结构变更(重命名 / 移动 / 删除 / 重组)?
| -> [结构路径] -- 变更前后检查反向链接
|
|- 流程性 / 可重复任务?
| -> [SOP 路径] -- 找到并执行现有 SOP,或创建新的
|
|- 复盘 / 提炼 / 交接?
| -> [复盘路径]
|
|- 知识健康检查 / 检测冲突?
| -> [健康检查路径] -- 读取 references/knowledge-health.md
|
-> 模糊?
-> 提问。基于知识库状态提出 2-3 个具体选项。
Judgment Heuristics
Save intent boundaries:
- "Help me note this down" / "save" / "store this" = write
- "search" / "summarize" / "is there anything related" = read-only
- "organize this" -> ask first: display only, or write back to the knowledge base?
File location uncertain:
- Cannot decide within 5 seconds -> save to
Inbox/, tell the user, and later suggest categorization - "Put it anywhere" / "just leave it for now" -> save to
Inbox/ - User drags in a file or pastes unstructured content but does not specify a location ->
Inbox/
Scope creep:
- Input routes to >5 files -> pause for confirmation
- "Update everything" + spans multiple topics -> confirm in batches
Citation standards: Citing knowledge base content must include the file path.
Post-Task Hooks
After a write task (not a simple read), scan this table. At most 1 suggestion; the highest priority takes precedence. First check .mindos/user-preferences.md suppression items.
| Hook | Priority | Condition |
|---|---|---|
| Experience capture | High | Debugging, troubleshooting, or multi-round work |
| Consistency sync | High | The edited file has backlinks |
| SOP drift | Medium | Executed according to the SOP but actually deviated from the steps |
| Related update | Medium | Changed CSV/TODO status and there are related documents |
| Structure classification | Medium | Created a file in a temporary location or inbox |
| Pattern extraction | Low | 3+ structurally similar operations in this session |
On trigger -> read references/post-task-hooks.md。
Preference capture
When the user expresses a persistent preference -> read references/preference-capture.md, and follow the confirm-then-write process.
SOP authoring
When creating/rewriting a workflow SOP -> read references/sop-template.md。
Inbox
Inbox/ The directory is the quick-capture area of the knowledge base and has its own INSTRUCTION.md constraint behavior.
When to use the inbox:
- The user says "just save it for now" / "put it in the inbox" / "put it anywhere", without specifying a concrete location
- The content clearly does not belong to any existing space or directory
- Bulk-importing multiple files that need to be categorized one by one
How to save to the inbox:
mindos file create "Inbox/<文件名>.md" --content "..."
How to organize the inbox:
- List the staged files:
mindos file list Inbox/ - Read each file and understand its content
- Based on the knowledge base structure, propose the best target directory for each file
- Show the user the complete routing plan, and execute after approval
- Move the files:
mindos file rename "Inbox/<文件>" "<目标目录>/<文件>" - After moving, check whether the target directory's README needs updating
Aging reminder: Files in the Inbox that are more than 7 days old are considered "aged". If aged files are found during bootstrap, proactively remind: "There are N files in the inbox that have been sitting there for over a week. Want me to help you organize them?"
Knowledge health check
When the user asks to check the knowledge base's health, detect conflicts, audit quality, or says "knowledge health check" / "detect conflicts" / "check knowledge health" -> read references/knowledge-health.md to get the complete process.
Check dimensions at a glance:
- Contradictions/conflicts: different files on the same topic contradict each other
- Broken links: references a file that does not exist
- Outdated content: files with expiration date markers, or active topics not updated in over 6 months
- Duplicate content: two files cover the same topic and do not reference each other
- Orphaned files: zero backlinks, hard to discover
- Structural issues: files in the wrong directory, missing README, aged files in the inbox
Error handling (CLI)
"command not found: mindos" -> npm install -g @geminilight/mindos
"Mind root not configured" -> mindos onboard
"401 Unauthorized" -> 检查 AUTH_TOKEN:在服务器运行 mindos token
"ECONNREFUSED" -> 在服务器启动:mindos start