Show HN:为你的 AI 代理提供可视化 gbrain 和 Obsidian 知识库的技能
Show HN: Skill for your agent to visualize your gbrain and Obsidian

原始链接: https://github.com/vladignatyev/brain-map-skill

该工具可将您的 Markdown 笔记(例如 Obsidian 知识库)转换为独立的交互式 HTML 知识图谱。它提供了一个可视化图形界面,包含可拖动的时间轴以查看知识库的增长过程、基于主题的颜色编码,以及用于查看单个笔记详情的点击检查面板。 **主要功能:** * **零配置演示:** 打开 `demo/brain-map.html` 即可立即查看一个包含 992 条笔记的预构建交互式地图。 * **无缝集成:** 使用您现有的 Markdown 结构,通过文件夹路径划分主题,并利用 `[[wikilinks]]` 建立连接。 * **灵活构建:** 通过简单的 Python 脚本 (`build_map.py`) 运行。它既支持标准 Python,也可利用可选库(networkx/numpy)实现更简洁的预计算布局。 * **AI 智能体就绪:** 专为 Claude Code、Cursor 和 OpenAI Codex 等工具设计,可作为其 AI 技能使用。 * **响应式设计:** 输出文件为单个可移植的 HTML 文件,支持全站搜索、过滤,并可在各种设备上自适应显示。 无论您是在整理工作、学习还是生活笔记,本项目都能将静态文本转化为“第二大脑”的可导航、动画式呈现。

抱歉。
相关文章

原文

Turn a folder of Markdown notes (an Obsidian vault or a gbrain export) into one self-contained, interactive HTML knowledge map — a force-directed graph coloured by theme, a timeline you can scrub to watch the base grow, and a click-to-inspect panel.

Works with: Claude Code · OpenAI Codex · Cursor · Gemini CLI · OpenClaw · or just run the script.

preview

See it in 5 seconds (no setup)

A prebuilt demo ships in this repo — no notes to generate, no embeddings, no gbrain, no Python. Open the file:

open demo/brain-map.html        # macOS
xdg-open demo/brain-map.html    # Linux
start demo/brain-map.html       # Windows

992 fictional notes across three themes (work · study · life). Scrub the timeline, press ▶ Play growth, click nodes, toggle filters.

Build from your own notes

python3 scripts/build_map.py <notes_dir> out.html --title "My Second Brain"
open out.html

<notes_dir> = your Obsidian vault, or a gbrain export --dir <out> directory. The map reads plain Markdown: YAML frontmatter (tags, created) + [[wikilinks]].

Dependencies are optional

Setup Result
Nothing (stdlib Python only) Builds anywhere; the browser computes the layout (Cytoscape cose).
pip install -r requirements.txt (networkx, numpy, scipy) Layout pre-computed → 1000-node maps open instantly and look cleaner.

The builder auto-detects networkx and picks the better path. No gbrain, no embeddings, no server required either way.

  • Theme = top-level folder (Work/, Study/, Life/) → node & edge colour.
  • Type = subfolder / tags → node shape (person, meeting, journal, lecture, project, link, todo, index, note).
  • Edges = resolved [[wikilinks]]. Node size scales with link count; hubs get labels.
  • Timeline = created timestamps, bucketed by month, stacked by theme.

The richer your cross-linking (people cards, meeting attendees, index pages), the more legible the map. Designed to pair with the save-note skill, which writes exactly this shape.

  • Scrub / Play the timeline → the graph reveals notes up to that month; Play animates the whole base growing from empty to today.
  • Filter by theme and type (live counts); search highlights matches.
  • Click a node → dim the rest, light its neighbourhood, open a detail panel (summary, tags, date, connected notes).
  • Responsive down to a phone.

Install as an agent skill

Claude Code

git clone https://github.com/vladignatyev/brain-map-skill ~/.claude/skills/brain-map

OpenAI Codex

git clone https://github.com/vladignatyev/brain-map-skill ~/.agents/skills/brain-map

Cursor / others — paste SKILL.md into your agent's instructions; it's self-contained.

Regenerate the demo corpus

python3 scripts/generate_demo_notes.py /tmp/demo-vault   # 992 invented notes
python3 scripts/build_map.py /tmp/demo-vault demo.html

All demo people, orgs and events are fictional — no real data.

brain-map-skill/
├── SKILL.md                      # agent skill spec
├── scripts/
│   ├── build_map.py              # the builder (Markdown dir → interactive HTML)
│   └── generate_demo_notes.py    # writes the fictional demo vault
├── demo/
│   ├── brain-map.html            # PREBUILT — open it, zero setup
│   ├── vault/                    # 992 source Markdown notes
│   └── preview.png
├── requirements.txt              # optional: networkx, numpy, scipy
└── LICENSE

MIT

联系我们 contact @ memedata.com