微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🧠

结构化知识管理的认知复利系统

second-brain · vv0.1.4
可以安装,但有提示 HAS_SCRIPTS
效率 安全 A 级 作者 christinetyip 公开目录收录
631 下载 212 安装 1.9k 收藏 27.6k 浏览

简介

基于 Ensue Network 的个人知识库管理工具,帮助用户结构化捕获、检索和复用知识,实现认知复利增长。

原始描述

Personal knowledge base powered by Ensue for capturing and retrieving understanding. Use when user wants to save knowledge, recall what they know, manage their toolbox, or build on past learnings. Triggers on "save this", "remember", "what do I know about", "add to toolbox", "my notes on", "store this concept".

通过你的 Agent 添加

安装目录:second-brain/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/second-brain/
Codex CLI~/.codex/skills/second-brain/
DeepSeek Harness~/.agents/skills/second-brain/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Second Brain 是一个个人知识管理系统,通过 Ensue Network API 实现知识的结构化存储与智能检索。用户可通过自然语言触发保存("save this")、查询("what do I know about")和管理("add to toolbox")等操作。系统采用严格的命名空间结构,将知识分为 public//(可分享的概念、工具箱、模式、参考资料)和 private//(个人笔记、日志)两大类别,确保内容组织清晰且易于检索。

保存知识时需遵循特定格式模板:概念(Concepts)强调"为什么重要"和核心洞察;工具箱条目(Toolbox Entries)记录真实使用体验;模式(Patterns)文档化可复用解决方案;参考资料(References)提供快速查阅的精简内容。所有操作均通过封装脚本 ensue-api.sh 调用 Ensue API 完成,支持语义搜索、CRUD 操作及命名空间浏览。

显著优点

  1. 结构化思维框架:强制用户按"为未来的自己写作"的标准记录知识,避免信息囤积,确保内容可检索、可复用。
  2. 认知复利设计:通过概念关联、工具索引和模式复用,让过往学习持续产生价值,而非一次性消费。
  3. 安全最佳实践:明确禁止存储敏感信息,API 密钥通过环境变量管理,通信采用 HTTPS,文档中包含完整的安全提示。
  4. 语义检索能力:支持自然语言查询(discover_memories),突破关键词匹配的局限,实现基于理解的知识召回。
  5. 质量管控机制:内置"反模式"清单,强制确认、防重复、防浅层记录,维护知识库的长期可用性。

潜在缺点与局限性

  1. 外部服务依赖:核心功能完全依赖 Ensue Network 的 SaaS 服务,存在服务中断、数据迁移困难及长期存续风险。
  2. 数据隐私顾虑:用户知识内容需上传至第三方服务器,尽管文档建议不存敏感信息,但仍存在数据主权和合规考量。
  3. 学习成本:严格的格式模板和命名空间规则需要一定时间适应,对追求快速记录的用户可能形成摩擦。
  4. 网络要求:所有操作需实时连接 Ensue API,离线场景无法使用,且受网络延迟影响体验。
  5. 功能边界:作为知识管理工具,不具备本地文件系统操作能力,无法与本地笔记软件(如 Obsidian、Notion 本地版)直接集成。

适合的目标群体

  • 终身学习者:希望系统化积累专业知识、建立个人知识体系的开发者、设计师、产品经理等知识工作者。
  • 工具研究者:频繁尝试新技术、需要维护个人工具箱和技术选型的工程师。
  • 模式思考者:擅长抽象总结、希望文档化可复用解决方案的架构师或技术负责人。
  • 认知管理爱好者:认同"第二大脑"理念、愿意投入时间维护高质量知识库的用户。

不适合:对数据本地存储有强制要求的企业用户、需要离线优先场景的用户、或偏好自由格式笔记的轻度使用者。

使用风险

  1. 服务可用性风险:Ensue Network 作为相对新兴的第三方服务,长期运营稳定性尚未经过充分验证,存在服务终止或数据迁移需求。
  2. 数据迁移成本:知识库内容存储于云端,导出和迁移机制依赖服务商提供,存在供应商锁定风险。
  3. API 配额与成本:文档未明确说明免费额度与付费策略,高频使用可能产生意外费用。
  4. 脚本注入风险:ensue-api.sh 中用户输入的 METHOD 和 ARGS 参数缺乏严格白名单验证,虽经评估直接利用难度较高,但仍建议谨慎处理不可信输入。
  5. 隐私合规风险:知识内容上传至美国或其他司法管辖区的服务器,需自行评估是否符合 GDPR、数据出境等合规要求。

技能正文


name: second-brain description: Set up and use an academic "second brain" — agentic RAG over a local library of theoretical papers (LaTeX-aware ingestion, theorem/proof tools, hybrid search). Use when the user wants a second brain for papers in a folder, says "/second-brain", "set up a second brain here", "ingest this paper into my second brain", or asks questions against an existing second-brain library (a directory containing config.toml with a [paths] section and an index/ folder). author: Moran Koren korenmor@bgu.ac.il (Ben-Gurion University of the Negev)

Second Brain — setup and usage

Author: Moran Koren, Ben-Gurion University of the Negev (korenmor@bgu.ac.il). Part of the Theorist Toolbox.

Sets up a self-contained agentic-RAG library in a target directory: papers are ingested from LaTeX source (preferred), HTML, or PDF-OCR into a chunked, QA-gated index; an agent (or Claude Code itself via MCP) answers questions by reading exact theorems/proofs with custom macros and prerequisite definitions auto-bundled. Full design: package/ in this skill contains the complete brain Python package.

Throughout, $SKILL means this skill's base directory (shown in the message that loaded this file) and $TARGET means the directory the user wants the second brain in (default: the current working directory; ask only if the cwd is clearly wrong for a paper library, e.g. a code repo).

Step 0 — detect state

$TARGET/config.toml exists AND $TARGET/.venv/bin/brain runs → already initialized: skip to Usage. Otherwise run Init.

Init

cd "$TARGET"
python3 -m venv .venv
.venv/bin/pip install -q "$SKILL/package[dev,providers,mcp,web]"
cp "$SKILL/templates/config.toml" config.toml
.venv/bin/brain status        # creates papers/ parsed_papers/ index/ scratchpad/

Then register the MCP server for Claude Code by writing $TARGET/.mcp.json (absolute paths, no ~):

{
  "mcpServers": {
    "second-brain": {
      "command": "<ABS_TARGET>/.venv/bin/python",
      "args": ["-m", "brain.mcp_server"],
      "env": { "BRAIN_CONFIG": "<ABS_TARGET>/config.toml" }
    }
  }
}

Verify the install with the bundled fixture, then remove the test entry:

.venv/bin/brain ingest "$SKILL/package/tests/fixtures/mini_paper" --id selftest --no-llm
.venv/bin/brain search "monotone valuations"       # selftest must rank first
.venv/bin/python -c "
from pathlib import Path; from brain.config import load_config; from brain.index import store
import shutil
cfg = load_config(Path('config.toml')); idx = store.load_index(cfg.index_file)
idx.pop('selftest', None); store.save_index(cfg.index_file, idx)
shutil.rmtree(cfg.parsed_dir / 'selftest', ignore_errors=True)"

Finish by telling the user: (1) init is done and verified; (2) restarting Claude Code in $TARGET and approving the "second-brain" MCP server lets them ask about their library in any session, billed to their Claude subscription; (3) the standalone CLI default (claude-code provider) also uses the subscription — keep ANTHROPIC_API_KEY unset for that; and (4) offer to ingest papers right away (see below). If the directory already contains PDFs or .tex sources, list them and offer to ingest them.

Usage

All commands run from $TARGET with .venv/bin/brain:

  • Ingest — brain ingest <arxiv-id | tex-dir | file.tex | url | file.pdf>
    • Prefer arXiv ids / LaTeX source (Tier 0: exact math, no OCR). PDFs need pip install "$SKILL/package[ocr]" and are QA-flagged by default.
    • Idempotent; add --force to re-ingest, --no-llm to skip metadata enrichment (use --no-llm when the user wants speed or determinism).
    • After a batch, run brain status and report any ⚠ needs_review papers.
  • Search (no LLM) — brain search "query" -v
  • Ask — brain ask "question" -v (or brain repl for multi-turn). Inside Claude Code, prefer the MCP tools directly instead of shelling out to brain ask — same backend, no nested agent.
  • Health — brain status; run .venv/bin/pytest "$SKILL/package/tests" -q if something seems broken.

When answering from MCP tools yourself, follow the library's grounding rules: search first; use read_theorem_or_proof for any formal statement; record notation with write_to_scratchpad after reading a Model section; cite [paper_id, Item] for every mathematical claim; flag needs_review sources.

Updating the bundled package

If the canonical copy in papers_2nd_brain evolves, refresh this skill with: rsync -a --exclude __pycache__ --exclude '*.egg-info' <canonical>/pyproject.toml <canonical>/src <canonical>/tests "$SKILL/package/" — then existing brains pick it up via .venv/bin/pip install -q --force-reinstall "$SKILL/package[dev,providers,mcp,web]".

正文来自原始仓库, 版权归作者所有,许可:MIT。 权利人认为有不妥,可申请下架。

原始仓库

作者的项目地址:https://github.com/coreyhaines31/makerskills

标签

productivitydocsknowledge-managementapieducation-research

同类 Skill