VB

vladignatyev/brain-map-skill

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

73 stars 质量 61 趋势 18MIT

来自Markdown笔记文件夹的交互式HTML知识地图(Obsidian/gbrain)——主题力量图+增长时间线。附带预建演示版。

概览

把一个Markdown笔记文件夹(比如Obsidian保险库或gbrain导出)变成——一个按主题着色的力定向图表,一个可以擦洗的时间线观察底座成长,还有一个点击检查面板。 Claude 代码 ·OpenAI Codex ·光标 ·Gemini CLI ·OpenClaw ·或者直接运行脚本。 预建演示文件存放于此仓库——打开文件: 992条虚构笔记,涵盖三个主题()。擦洗时间线,点击节点,切换筛选器。 = 你的Obsidian vault,或gbrain导出--dir目录。地图写着简单的Markdown:YAML前页(标签,已创建)+ [[wikilinks]]。 构建者会自动检测 networkx,选择更好的路径。没有 gbrain,没有嵌入,也不需要服务器。 - = 顶层文件夹——你的文件夹,无论它们是什么,→节点和边缘颜色。颜色由调色板自动分配(无固定分类法);工作/、研究/、生活/如果存在则保留其遗留颜色,根级笔记为其他。

概述(AI 翻译)

将一个Markdown笔记文件夹(Obsidian vault或gbrain export)变成一个 自包含的交互式HTML知识映射——一个由 主题,一个可以擦洗的时间线,观察基地的成长,还有一个点击查看面板。

支持: Claude代码 ·OpenAI手本 ·光标 ·Gemini CLI ·OpenClaw ·或者直接运行脚本。

5秒内看(无预设)

这个仓库里有预建演示——不需要生成笔记,没有嵌入,没有gbrain, 没有Python。 打开文件:

992条虚构笔记,涵盖三个主题(工作·研究·生活)。擦掉时间线, 按** ▶ 播放增长**,点击节点,切换筛选。

从你自己的笔记开始构建

= 你的黑曜石金库,或一个gbrain export --dir 目录。地图 简单 Markdown 显示:YAML 前置件([tags, created)+ [[wikilinks]]。

依赖关系是可选的

设置 结果
无任何内容(仅限标准Python) 可以随时构建;浏览器计算布局(Cytoscape cose)。
pip install -r requirements.txt(networkx、numpy、scipy) 预先计算好的布局→1000节点地图可立即打开,界面更清晰。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

brain-map

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.

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  out.html --title "My Second Brain"
open out.html

`` = your Obsidian vault, or a gbrain export --dir 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.

What it reads

  • Theme = top-level folder — your folders, whatever they are → node & edge colour. Colours are assigned automatically from a palette (no fixed taxonomy); Work/, Study/, Life/ keep their legacy colours if present, root-level notes are Other.
  • 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. No created in the frontmatter? It falls back to the file’s own timestamp, so plain vaults still get a timeline.

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.

In the HTML

  • 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

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add vladignatyev/brain-map-skill
新手?先看 mcpskill.org 教程 →