ultrabrain
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUltrabrain
Ultrabrain
Drive a personal, LLM-maintained wiki at . This skill is a thin trigger layer — the vault is self-contained and methodology rules live in , not here.
~/.ultrabrain/~/.ultrabrain/AGENTS.md管理存储在路径下的个人LLM维护维基。该技能是一个轻量触发层——知识库(vault)是独立封装的,方法规则存储在中,而非本文件内。
~/.ultrabrain/~/.ultrabrain/AGENTS.mdTrigger Contract
触发约定
Five operations. The first two are skill-side; the last three delegate to vault rules.
| Operation | Trigger examples |
|---|---|
| "bootstrap ultrabrain", "initialize vault", "設定 ultrabrain", or any other operation fires with no vault present |
| "記下來 X", "capture this", "save to vault", "存進 vault", or "capture <path-or-url>" |
| "ingest", "integrate raw", "整合 raw", "整理 vault" |
| description-driven for factual/technical/decision questions, or explicit: "查 vault", "search ultrabrain" |
| "lint vault", "健檢 vault", "check wiki" |
包含五种操作。前两种由技能侧处理;后三种委托给知识库规则执行。
| 操作 | 触发示例 |
|---|---|
| "bootstrap ultrabrain", "initialize vault", "設定 ultrabrain",或任何在知识库不存在时触发的操作 |
| "記下來 X", "capture this", "save to vault", "存進 vault",或 "capture <path-or-url>" |
| "ingest", "integrate raw", "整合 raw", "整理 vault" |
| 针对事实性/技术性/决策类问题的描述触发,或明确指令:"查 vault", "search ultrabrain" |
| "lint vault", "健檢 vault", "check wiki" |
Query skip clause
查询跳过规则
Before reading any vault file for , verify the user's question plausibly concerns retained knowledge. Skip the vault (answer normally) when the question is:
query- Small talk — greetings, thanks, session meta-questions.
- Context-local — answerable from the current session or open files ("what does this file do", "why did that fail").
- Execution requests — "write this", "run that", "refactor X". Vault holds facts, not tasks.
When classification is uncertain, default to skipping. Aggressive description triggering is balanced by this negative filter, not overridden.
在为操作读取任何知识库文件之前,请确认用户的问题确实与已存储的知识相关。当问题属于以下情况时,跳过知识库(正常回答即可):
query- 闲聊——问候、致谢、会话元问题。
- 上下文本地问题——可通过当前会话或打开的文件回答的问题(如“这个文件是做什么的”、“为什么会失败”)。
- 执行请求——“编写这个”、“运行那个”、“重构X”。知识库存储事实,而非任务。
当无法确定分类时,默认跳过。宽泛的描述触发机制会通过这个负面过滤器进行平衡,而非被覆盖。
Operations
操作说明
Full step-by-step lives in . Summary:
references/operations.md- creates
bootstrapwith~/.ultrabrain/(copied fromAGENTS.md),references/agents-template.md(one line:CLAUDE.md), empty@AGENTS.mdandindex.md, andlog.md/raw/directories. Refuses if the vault exists unlesswiki/is passed.--force - writes session or file content to
capturewith frontmatter. Resolves ambiguous "記下來" requests by proposing a scope and waiting for user confirmation. Never silently overwrites — collisions go to suffixed filenames or a user-chosen append.raw/YYYY-MM-DD-<slug>.md - loads
ingestand follows its~/.ultrabrain/AGENTS.mdsection to integrate unprocessedOperation: Ingestfiles intoraw/, moving processed raw towiki/.raw/.processed/ - loads
query, readsAGENTS.mdfirst, then follows the vault's query rules (index-first strict; no Grep fallback). Answers cite specific wiki pages. Falls back to general knowledge if the vault is empty, with an explicit note.index.md - loads
lintand produces a health report (contradictions, orphans, stale pages, index drift, missing cross-references). Never auto-fixes; asks the user which findings to address.AGENTS.md
Every operation appends one line to in the format .
log.mdISO-8601 OPERATION details完整的分步流程请查阅。概述如下:
references/operations.md- 操作会创建
bootstrap目录,并生成~/.ultrabrain/(从AGENTS.md复制)、references/agents-template.md(仅一行内容:CLAUDE.md)、空文件@AGENTS.md和index.md,以及log.md和raw/子目录。如果知识库已存在则会拒绝执行,除非传入wiki/参数。--force - 操作将会话或文件内容写入
capture文件,并添加前置元数据。对于模糊的“記下來”请求,会先提议一个范围并等待用户确认。绝不会静默覆盖文件——文件名冲突时会使用带后缀的文件名或询问用户选择追加方式。raw/YYYY-MM-DD-<slug>.md - 操作加载
ingest并遵循其中的「Operation: Ingest」章节,将未处理的~/.ultrabrain/AGENTS.md文件整合到raw/目录中,已处理的原始文件会移动到wiki/。raw/.processed/ - 操作加载
query,优先读取AGENTS.md,然后遵循知识库的查询规则(严格优先索引;不使用Grep回退)。回答时会引用具体的维基页面。如果知识库为空,则会回退到通用知识回答,并附上明确说明。index.md - 操作加载
lint并生成健康报告(包括矛盾内容、孤立页面、过期页面、索引偏差、缺失交叉引用等)。绝不会自动修复问题;会询问用户要处理哪些问题。AGENTS.md
每个操作都会向追加一行内容,格式为。
log.mdISO-8601 操作类型 详情Vault Contract
知识库约定
Vault location: .
~/.ultrabrain/AGENTS.mdAGENTS.mdingestquerylint~/.ultrabrain/CLAUDE.md@AGENTS.mdcdAGENTS.mdVault-side operations (, , ) halt if is missing. Ask the user to or restore the file.
ingestquerylintAGENTS.mdbootstrapThe skill treats the vault as read-only except for paths each operation is defined to touch (see ).
references/operations.md知识库位置:。
~/.ultrabrain/AGENTS.mdAGENTS.mdingestquerylint~/.ultrabrain/CLAUDE.md@AGENTS.mdAGENTS.md如果缺失,知识库侧操作(、、)会终止。此时需询问用户执行操作或恢复该文件。
AGENTS.mdingestquerylintbootstrap本技能将知识库视为只读,仅会修改各操作定义中允许触碰的路径(详见)。
references/operations.mdMethodology Swap
方法切换
The v1.0.0 default methodology is Karpathy's LLM-maintained-wiki pattern (see for the source and for the agent-readable rendering). To swap:
references/karpathy-original.mdreferences/agents-template.md- Replace with rules for a different methodology. Only requirement: the new template must define
references/agents-template.md,ingest, andquerybehaviors.lint - Run to wipe and rebuild the vault. Destructive — back up
bootstrap --forcefirst if you want to preserve source material for re-capture.~/.ultrabrain/raw/
v1.0.0版本的默认方法是Karpathy的LLM维护维基模式(原始来源请查阅,Agent可读版本请查阅)。切换方法步骤如下:
references/karpathy-original.mdreferences/agents-template.md- 将替换为其他方法的规则。唯一要求:新模板必须定义
references/agents-template.md、ingest和query的行为。lint - 执行命令清空并重建知识库。此操作具有破坏性——如果想保留原始材料以便重新记录,请先备份
bootstrap --force目录。~/.ultrabrain/raw/
Hooks
钩子
Two hooks are available but not auto-installed:
- — injects vault status (wiki count, unprocessed raw, last ingest) at session start so Claude is aware the vault is available.
SessionStart - — injects a reminder before context compaction to capture important session content before detail is lost.
PreCompact
On explicit user request ("install ultrabrain hooks"), follow to copy both hook scripts and merge the entries into using Read → diff → confirm → Edit discipline. Both hooks install as a bundle; either can be uninstalled individually later.
references/setup.md~/.claude/settings.json提供两个钩子,但不会自动安装:
- ——会话开始时注入知识库状态(维基页面数量、未处理原始内容、上次导入时间),让Claude知晓知识库可用。
SessionStart - ——上下文压缩前注入提醒,以便在细节丢失前记录重要的会话内容。
PreCompact
当用户明确请求(如“install ultrabrain hooks”)时,遵循中的步骤复制两个钩子脚本,并采用「读取→对比差异→确认→编辑」的流程将条目合并到中。两个钩子会作为一个包安装;之后可单独卸载任意一个钩子。
references/setup.md~/.claude/settings.jsonReferences
参考文件
- — verbatim source methodology + attribution
references/karpathy-original.md - — bootstrap copies this to
references/agents-template.md~/.ultrabrain/AGENTS.md - — full step-by-step for all five operations
references/operations.md - — hook install/uninstall (SessionStart + PreCompact)
references/setup.md - — vault status injection on session start
references/hooks/session-start.sh - — capture reminder before compaction
references/hooks/pre-compact.sh
- ——原始方法原文及署名信息
references/karpathy-original.md - ——bootstrap操作会将此文件复制到
references/agents-template.md~/.ultrabrain/AGENTS.md - ——所有五种操作的完整分步流程
references/operations.md - ——钩子安装/卸载(SessionStart + PreCompact)
references/setup.md - ——会话开始时注入知识库状态的脚本
references/hooks/session-start.sh - ——压缩前触发记录提醒的脚本
references/hooks/pre-compact.sh