Install
openclaw skills install lecture-notes-masterObsidian lecture notes with recursive atomic decomposition. Generates main note (hub), atomic notes (3+ layers deep, rich structure each), and unlimited glossary entries. Inputs: lectures, articles, videos, URLs, transcripts, PDFs. Outputs: Obsidian markdown with Mermaid diagrams, comparison tables, bilingual terms, wikilinks.
openclaw skills install lecture-notes-masterGenerate structured Obsidian lecture notes with recursive atomic decomposition:
Triggers:
Example prompts:
Configured in config.json:
config.json → obsidian.vault_path00-Inbox/{Topic}/ (main note + glossary + numbered L1 subdirectories)English Term(中文术语)Every source material is decomposed into a tree of notes, organized into numbered subdirectories by L1 topic:
{Topic}/
├── 主笔记: {Topic}-Notes.md
│ Hub note linking to all L1 atomic notes
│
├── 01-{L1-Concept-A}/
│ ├── {L1-Concept-A}.md (L1 顶层概念)
│ ├── {L2-Sub-Concept-A1}.md (L2 子概念)
│ ├── {L2-Sub-Concept-A2}.md (L2 子概念)
│ ├── {L3-Detail-A1a}.md (L3 细分解)
│ └── {L3-Detail-A1b}.md (L3 细分解)
│
├── 02-{L1-Concept-B}/
│ ├── {L1-Concept-B}.md (L1 顶层概念)
│ ├── {L2-Sub-Concept-B1}.md (L2 子概念)
│ └── {L3-Detail-B1a}.md (L3 细分解)
│
├── 03-{L1-Concept-C}/
│ └── {L1-Concept-C}.md (L1 顶层概念)
│
├── glossary/(原子概念 — 术语定义,不限量)
│ ├── English Term(中文术语).md
│ └── ... 每个术语一个文件
│
└── assets/(图表资源)
└── *.png
| Location | Contains | Example |
|---|---|---|
{Topic}/ root | Main note only | Lazygit-Notes.md |
NN-{L1-Concept}/ | L1 note + its L2 children + their L3 children | 01-Installation-and-Setup/ |
glossary/ | All glossary entries | glossary/TUI(终端用户界面).md |
assets/ | Generated charts/images | assets/performance-chart.png |
Numbering Rules:
01-, 02-, 03-, ...Layer 1 (顶层概念):
Layer 2 (子概念):
Layer 3+ (细分解):
Stop Decomposing When:
Glossary vs Atomic Note:
| Use Glossary | Use Atomic Note |
|---|---|
| Term needing a bilingual definition (1-3 sentences) | Concept requiring explanation, examples, diagrams |
| No deep analysis needed | Has sub-components worth exploring |
| Pure noun/term | Has "why", "how", comparison dimensions |
Every set of notes MUST produce:
ALL atomic notes (L1, L2, L3) use the same rich template structure:
See
templates/atomic-note.mdfor the full template.
| Rule | Description |
|---|---|
| Step-by-step | "Why do we need this?" → "What is it?" → "How does it work?" → "Watch out for..." |
| Example-driven | Example FIRST, then explain the principle. Never start with pure theory |
| Visual-rich | Every concept gets at least one Mermaid diagram OR table |
| Table comparison | Similar concepts → comparison table |
| Bilingual terms | English Term(中文), English is primary |
| Atomic | Each note covers exactly ONE concept |
| Review questions | 3 per note: recall, understanding, application |
python3 --version || python --version
pip3 install matplotlib numpy # For visualization scripts (optional)
Optional: summarize CLI for URL/video content extraction.
Identify: input type (URL, video, PDF, transcript, raw text), topic name, key themes.
When user provides a URL or video link, use summarize CLI:
# Extract text from URL
summarize "<URL>" --extract-only --model google/gemini-3-flash-preview
# Extract YouTube transcript
summarize "<YouTube-URL>" --youtube auto --extract-only
# Pre-summary for screening
summarize "<URL>" --length medium --model google/gemini-3-flash-preview
Useful flags: --extract-only (raw text), --youtube auto, --firecrawl auto (JS-heavy sites), --json
If summarize is not available: Use the agent's built-in web fetching tools as fallback.
⚠️ MANDATORY: You MUST complete this step BEFORE writing ANY content. ⚠️ MANDATORY: You MUST create ALL directories with
mkdir -pBEFORE writing ANY files. ⚠️ ZERO TOLERANCE: No atomic notes are allowed in the topic root directory. ONLY the main hub note lives there.
Plan the COMPLETE file tree with numbered directories, then create them immediately.
Topic: 2028 Global Intelligence Crisis
主笔记: 2028-Global-Intelligence-Crisis-Notes.md (in topic root)
01-Intelligence-Displacement-Spiral/
L1: Intelligence-Displacement-Spiral.md
L2: OpEx-Substitution-Mechanism.md
L2: Ghost-GDP-Phenomenon.md
L3: OpEx-vs-CapEx-AI-Spending.md ← parent: OpEx-Substitution
L3: Why-No-Natural-Brake.md ← parent: OpEx-Substitution
02-SaaS-Collapse-and-Intermediation-Death/
L1: SaaS-Collapse-and-Intermediation-Death.md
L2: Agentic-Coding-Disruption.md
L2: Habitual-Intermediation-Collapse.md
L3: Friction-Zero-Disruption.md ← parent: Habitual-Intermediation
03-White-Collar-Displacement-Asymmetry/
L1: White-Collar-Displacement-Asymmetry.md
L2: Downshifting-Effect.md
L2: Labor-Share-Decline.md
04-Financial-Contagion-Chain/
L1: Financial-Contagion-Chain.md
L2: Private-Credit-SaaS-Crisis.md
L2: Permanent-Capital-Trap.md
L2: Mortgage-Market-Structural-Threat.md
L3: Zendesk-Case-Study.md ← parent: Private-Credit
L3: Insurance-Asset-Impairment.md ← parent: Permanent-Capital
glossary/ (42 entries):
glossary/Ghost GDP(幽灵GDP).md
glossary/Intelligence Displacement Spiral(智能替代螺旋).md
glossary/Private Credit(私募信贷).md
... (one file per term)
# MANDATORY: Run this BEFORE writing any notes
TOPIC_DIR="<vault>/00-Inbox/{Topic}"
mkdir -p "$TOPIC_DIR"
mkdir -p "$TOPIC_DIR/01-{L1-Concept-A}"
mkdir -p "$TOPIC_DIR/02-{L1-Concept-B}"
mkdir -p "$TOPIC_DIR/03-{L1-Concept-C}"
# ... one mkdir per L1 concept
mkdir -p "$TOPIC_DIR/glossary"
mkdir -p "$TOPIC_DIR/assets"
# Verify: must show numbered subdirectories + glossary + assets
find "$TOPIC_DIR" -type d | sort
Only proceed to Step 3 after directories exist.
# Search glossary for existing bilingual terms
python3 <SKILL_DIR>/scripts/search.py "<topic keywords>" --domain glossary
# Search Mermaid templates for diagram ideas
python3 <SKILL_DIR>/scripts/search.py "<concept type>" --domain mermaid
# Search writing rules for style guidance
python3 <SKILL_DIR>/scripts/search.py "<content type>" --domain writing
⚠️ CRITICAL: Every file MUST be written to its correct subdirectory. Double-check the output path before every Write/Edit call.
| Order | Note Type | Write To | Example Path |
|---|---|---|---|
| 1 | Main note (hub) | {Topic}/ root — ONLY file here | Lazygit/Lazygit-Notes.md |
| 2 | L1 atomic notes | {Topic}/NN-{L1-Concept}/ | Lazygit/01-Installation-and-Setup/Installation-and-Setup.md |
| 3 | L2 atomic notes | Same dir as parent L1 | Lazygit/03-Basic-Git-Operations/Staging-and-Committing.md |
| 4 | L3 atomic notes | Same dir as parent L1 | Lazygit/03-Basic-Git-Operations/Staging-Modes.md |
| 5 | Glossary entries | {Topic}/glossary/ | Lazygit/glossary/Stage(暂存).md |
| 6 | Visualizations | {Topic}/assets/ | Lazygit/assets/workflow-chart.png |
Self-check before each file write:
{Topic}/ root{Topic}/NN-{L1-Parent}/{Topic}/glossary/{Topic}/ root# Main note (in topic root)
python3 <SKILL_DIR>/scripts/generate.py \
--type lecture --title "<title>" \
--concepts "C1,C2,C3,C4" \
--output "<vault>/00-Inbox/{Topic}/"
# Atomic note (any layer — output to its L1 parent subdirectory)
python3 <SKILL_DIR>/scripts/generate.py \
--type atomic --concept "<name>" \
--parent "<parent-note-stem>" \
--children "Child1,Child2" \
--siblings "Sibling1,Sibling2" \
--output "<vault>/00-Inbox/{Topic}/NN-{L1-Concept}/"
# Glossary entry
python3 <SKILL_DIR>/scripts/generate.py \
--type glossary --term-en "<English Term>" --term-cn "<中文术语>" \
--definition "<one-line definition>" \
--output "<vault>/00-Inbox/{Topic}/glossary/"
# Course MOC
python3 <SKILL_DIR>/scripts/generate.py \
--type moc --course "<course>" --semester "<semester>"
Note:
<SKILL_DIR>= the directory where this skill is installed.NN= two-digit L1 index (01, 02, ...).
For data-driven charts that Mermaid cannot handle:
python3 <SKILL_DIR>/scripts/visualize.py \
--type "<chart_type>" \
--data "<data_json>" \
--output "<output_path>" \
--title "<chart title>"
Available chart types: bar, line, scatter, timeline, heatmap, comparison, pie, radar
All templates are in the templates/ directory:
| Type | Template File | Description |
|---|---|---|
| Main Note (主笔记) | templates/lecture-note.md | Hub note with overview, N sections, summary, review questions |
| Atomic Note (原子笔记) | templates/atomic-note.md | Rich concept note — used for ALL layers (L1, L2, L3) |
| Glossary Entry (原子概念) | templates/glossary-entry.md | Short bilingual term definition |
| Course MOC | templates/course-moc.md | Map of Content with lecture index, concept clusters |
[[glossary-wikilinks]]→ 详见 [[L1-Atomic-Note]] linkSame rich structure for ALL layers (L1, L2, L3):
All notes link in THREE directions:
| Note Type | Links UP to | Links DOWN to | Links ACROSS to |
|---|---|---|---|
| Main Note | — | All L1 notes | — |
| L1 Atomic | Main Note | Its L2 children | Sibling L1 notes |
| L2 Atomic | Parent L1 | Its L3 children | Sibling L2 notes |
| L3 Atomic | Parent L2 | — | Sibling L3 notes |
| Glossary | Related atomic notes | — | Related glossary terms |
Inline wikilinks: All glossary terms MUST be linked inline on first mention in every note using [[Term(术语)]] syntax.
Wiki-link targets MUST match filenames (without .md). Spaces → hyphens in atomic notes, but glossary keeps parenthetical Chinese.
| Note Type | File Name Pattern | Wiki-Link |
|---|---|---|
| Main Note | {Topic}-Notes.md | [[{Topic}-Notes]] |
| Atomic Note | {Concept-Name}.md | [[{Concept-Name}]] |
| Glossary Entry | {English Term(中文术语)}.md | [[{English Term(中文术语)}]] |
Rules:
[[]]) or with placeholder text ([[TODO]])English Term(中文术语).md| Diagram Type | Use For | Example |
|---|---|---|
graph TB/LR | Hierarchies, flows, architectures | Concept trees, process chains |
sequenceDiagram | Time-ordered interactions | Data transfers, API calls |
stateDiagram-v2 | State transitions | Lifecycle, mode changes |
classDiagram | Object relationships | Class hierarchy |
gantt | Timelines, parallel tasks | Project phases, pipeline |
pie | Proportions | Distribution breakdown |
xychart-beta | Data trends | Performance scaling |
mindmap | Topic overview | Concept clustering |
Rules:
classDef for consistent colorsColor theme:
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#4CAF50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#388E3C', 'lineColor': '#666', 'secondaryColor': '#FF9800', 'tertiaryColor': '#2196F3'}}}%%
Use when Mermaid cannot express the data: performance bars, scaling curves, heatmaps, radar charts.
Rules: PNG at dpi=150, consistent colors (#4CAF50, #FF9800, #2196F3, #F44336), always include axis labels and title, reference as ![[filename.png]].
| Domain | Use For | Example Keywords |
|---|---|---|
glossary | Find existing bilingual terms | cuda, memory, 内存, 术语 |
mermaid | Find diagram templates | flow, sequence, hierarchy, 图表 |
writing | Get writing style rules | introduction, comparison, 规则 |
questions | Get review question templates | recall, application, 考试 |
English(中文)[[wiki-links]] for all cross-references (inline + Related Notes)Concept-Name.md (hyphens for atomic notes)00-Inbox/{Topic}/)01-xxx/, 02-xxx/)glossary/ subdirectory[[wiki-links]] syntax (not markdown links)```mermaid fencing![[image.png]]