temple-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTemple Generator
Temple Generator
Generate a 3D interactive knowledge visualization from any Obsidian vault. The output is a single HTML file (Three.js) with concentric entity rings, audio, discovery mechanics, and multi-scale semantic zoom.
从任意Obsidian知识库生成3D交互式知识可视化内容。输出为单个HTML文件(基于Three.js),包含同心实体环、音频、探索机制以及多尺度语义缩放功能。
When to Use
适用场景
- User wants to visualize any Obsidian vault as a 3D knowledge map
- User wants to compare two vaults/document sets visually
- User wants to regenerate the temple from scratch with fresh vault analysis
- 用户希望将任意Obsidian知识库可视化为3D知识图谱
- 用户希望直观对比两个知识库/文档集
- 用户希望基于全新的知识库分析结果重新生成圣殿
Architecture
架构
Two-part system:
- Generation pipeline (this skill): discovers structure, names it, scores confidence, exports a scene package
- Runtime renderer (template): handles navigation, transitions, audio, discovery
Pre-generate meaning. Runtime-render experience.
分为两部分的系统:
- 生成流水线(本技能):发现结构、命名、置信度评分、导出场景包
- 运行时渲染器(模板):处理导航、过渡、音频、探索功能
预先生成语义信息,运行时渲染交互体验。
Workflow
工作流程
Step 1: Scan the Vault
步骤1:扫描知识库
Run .
python3 ~/.claude/skills/temple-generator/scripts/extract_entities.py <vault_path>This produces with:
vault-scan.json- Files: path, title, tags, outgoing links, backlink counts, word count, folder, frontmatter
- Graph: adjacency list with bidirectional link counts
- Centrality: degree centrality per node
- Clusters: detected groups of tightly linked notes
运行 。
python3 ~/.claude/skills/temple-generator/scripts/extract_entities.py <vault_path>此命令会生成 ,包含:
vault-scan.json- 文件:路径、标题、标签、出站链接、反向链接计数、字数、文件夹、前置元数据
- 图谱:带双向链接计数的邻接表
- 中心性:每个节点的度中心性
- 集群:检测到的紧密关联笔记组
Step 2: Read the Scan + Sample Notes
步骤2:读取扫描结果与示例笔记
- Read
vault-scan.json - Read the top ~20 nodes by centrality (first 100 lines each)
- Read for entity type heuristics
references/classification-guide.md - Read 3-5 representative notes to calibrate the vault's "voice" (formal/informal, domain jargon, language)
- 读取
vault-scan.json - 读取按中心性排序的前约20个节点(每个节点读取前100行)
- 读取 获取实体类型启发规则
references/classification-guide.md - 读取3-5篇代表性笔记,校准知识库的“语气”(正式/非正式、领域术语、语言风格)
Step 3: Classify Entities
步骤3:实体分类
Using , assign each significant node to an entity type. Maintain two vocabularies:
references/classification-guide.md- canonical: neutral labels for portability (,
anxiety-management)fermentation-process - poetic: mythic/art labels for the installation (,
The Ferment Gate)The Cortisol Throne
Target counts per type (adjust for vault size):
| Type | Small vault (< 100) | Medium (100-500) | Large (500+) |
|---|---|---|---|
| Gods | 2-3 | 3-5 | 5-7 |
| Demigods | 3-7 | 5-12 | 8-15 |
| Tensions | 2-4 | 3-7 | 5-9 |
| Narratives | 2-5 | 5-10 | 8-12 |
| Blind spots | 1-3 | 3-5 | 4-7 |
| Spirits | 1-3 | 3-5 | 3-5 |
| Research | 5-15 | 10-25 | 15-30 |
| Values | 2-5 | 3-8 | 5-10 |
| Trails | 2-5 | 3-8 | 5-10 |
| Questions | 3-6 | 5-10 | 8-12 |
| Depths | 2-5 | 5-10 | 8-15 |
| Crystals | 1-3 | 2-5 | 3-6 |
使用 ,为每个重要节点分配实体类型。维护两种词汇体系:
references/classification-guide.md- 标准词汇:用于可移植性的中性标签(如 、
anxiety-management)fermentation-process - 诗意词汇:用于可视化场景的神话/艺术化标签(如 、
The Ferment Gate)The Cortisol Throne
各类型目标数量(根据知识库大小调整):
| 类型 | 小型知识库(<100篇) | 中型知识库(100-500篇) | 大型知识库(500+篇) |
|---|---|---|---|
| 神祇 | 2-3 | 3-5 | 5-7 |
| 半神 | 3-7 | 5-12 | 8-15 |
| 张力 | 2-4 | 3-7 | 5-9 |
| 叙事 | 2-5 | 5-10 | 8-12 |
| 盲区 | 1-3 | 3-5 | 4-7 |
| 灵体 | 1-3 | 3-5 | 3-5 |
| 研究 | 5-15 | 10-25 | 15-30 |
| 价值观 | 2-5 | 3-8 | 5-10 |
| 路径 | 2-5 | 3-8 | 5-10 |
| 问题 | 3-6 | 5-10 | 8-12 |
| 深渊 | 2-5 | 5-10 | 8-15 |
| 晶体 | 1-3 | 2-5 | 3-6 |
Step 4: Build Abstraction Levels
步骤4:构建抽象层级
Levels are confidence-gated — only include a level if the vault supports it.
Level 0 — Entities (always exists): individual nodes with positions, connections, descriptions.
Level 1 — Domains (requires >= 3 meaningful clusters): groups of related entities. Each domain has:
- +
canonicalnamepoetic - member entity keys
- centroid position (weighted average of member positions)
- representative exemplar (most central member)
- description (1-2 sentences in vault voice)
- confidence score (0-1)
Level 2 — Axes (requires >= 2 interpretable opposing pairs): fundamental tensions. Each axis has:
- two poles with names and descriptions
- member domains per pole
- axis description
- confidence score
Level 3 — Comparison (requires two vaults + sufficient alignment): shared/unique analysis.
Read for dual-graph logic.
references/merge-algorithm.md层级采用置信度门控——仅当知识库支持时才包含对应层级。
层级0 — 实体(始终存在):包含位置、连接关系、描述的单个节点。
层级1 — 领域(需要≥3个有意义的集群):相关实体的分组。每个领域包含:
- 标准名称 + 诗意名称
- 成员实体键
- 质心位置(成员位置的加权平均值)
- 代表性范例(最核心的成员)
- 描述(1-2句,匹配知识库语气)
- 置信度评分(0-1)
层级2 — 轴(需要≥2个可解释的对立对):核心张力。每个轴包含:
- 两个带有名称和描述的极点
- 每个极点对应的领域成员
- 轴描述
- 置信度评分
层级3 — 对比(需要两个知识库 + 足够的匹配度):共享/独有分析结果。
阅读 获取双图逻辑。
references/merge-algorithm.mdStep 5: Generate Scene Package
步骤5:生成场景包
Follow the schema in to produce .
references/entity-schema.mdtemple-data.jsonInclude:
- : all classified nodes
entities - : abstraction layers with zoom thresholds
levels - : entity → domain → axis crosswalks
mappings - : (if dual-graph) shared/unique/alignment data
comparison - : motif hints per type and level
audio - : poetic vocabulary, intro text, color palette, layer definitions
style - : per-abstraction and per-alignment scores
confidence
遵循 中的 schema 生成 。
references/entity-schema.mdtemple-data.json包含内容:
- :所有已分类的节点
entities - :带有缩放阈值的抽象层级
levels - :实体→领域→轴的交叉映射
mappings - :(如果是双图模式)共享/独有/匹配度数据
comparison - :各类型和层级的音频主题提示
audio - :诗意词汇、介绍文本、调色板、层定义
style - :各抽象层级和匹配度的评分
confidence
Step 6: Generate HTML
步骤6:生成HTML
- Copy to the output location
~/.claude/skills/temple-generator/assets/temple-template.html - If flag: embed the JSON data as
--inlineinside the HTMLconst TEMPLE_DATA = {...}; - Otherwise: place alongside the HTML
temple-data.json
- 将 复制到输出位置
~/.claude/skills/temple-generator/assets/temple-template.html - 如果使用 参数:将JSON数据以
--inline的形式嵌入HTML中const TEMPLE_DATA = {...}; - 否则:将 放在HTML文件同一目录下
temple-data.json
Step 7: Report
步骤7:生成报告
Show the user:
- Entity counts by type
- Abstraction levels generated (with confidence scores)
- Top 5 gods/central entities
- Detected tensions
- If dual-graph: overlap percentage and shared domains
向用户展示:
- 各类型实体的数量
- 生成的抽象层级(含置信度评分)
- 前5个核心实体(神祇)
- 检测到的张力
- 如果是双图模式:重叠百分比和共享领域
Dual-Graph Mode
双图模式
When is provided:
--compare vault_path_2- Scan both vaults independently (Step 1)
- Classify entities for each vault (Steps 2-3)
- Run merge algorithm from
references/merge-algorithm.md - Generate merged scene package with source attribution
- Template renders shared scaffold with divergence offsets
当提供 参数时:
--compare vault_path_2- 独立扫描两个知识库(步骤1)
- 为每个知识库分类实体(步骤2-3)
- 运行 中的合并算法
references/merge-algorithm.md - 生成带有来源标注的合并场景包
- 模板渲染共享框架并显示差异偏移
Quality Guidelines
质量指南
- Skip trivial notes (daily todos, admin logs, empty stubs)
- Prefer nodes that reveal the vault's actual concerns, not its filing system
- Write in the vault's own voice, calibrated from sample notes
- If a level lacks confidence, omit it rather than fabricating structure
- Each abstraction level must be backed by membership weights, exemplars, and provenance
- "The abstraction hierarchy should be semantic, not just geometric"
- 跳过无关紧要的笔记(每日待办、管理日志、空草稿)
- 优先选择能体现知识库核心关注点的节点,而非其文件系统结构
- 使用与知识库一致的语气,基于示例笔记校准
- 如果某层级置信度不足,应省略而非编造结构
- 每个抽象层级必须有成员权重、范例和来源作为支撑
- "抽象层级应基于语义,而非仅几何结构"
Audio Guidance for Template
模板音频指南
The template's audio system should respect hierarchical continuity across zoom levels:
- L0 (close): localized, identity-rich — entity whispers and textures
- L1 (medium): regional harmonic beds, cluster pulses
- L2 (far): sparse drones, tension-based tonal movement
- L3 (comparison): stereo/dialogic between two vault voices
Zoom should feel like changing resolution, not changing universes. Motifs relate across scales.
模板的音频系统应在缩放层级间保持层级连续性:
- L0(近距离):本地化、富有辨识度的实体低语和纹理音效
- L1(中距离):区域性和声背景、集群脉冲音效
- L2(远距离):稀疏的低音 drone、基于张力的音调变化
- L3(对比模式):两个知识库声音的立体声/对话式音效
缩放应像是改变分辨率,而非切换宇宙。主题在不同尺度间保持关联。