Knowledge Graph Notes
by @sky-lv
Automatically creates bidirectional links between related notes
clawhub install knowledge-graph-notesπ About This Skill
description: Automatically creates bidirectional links between related notes keywords: openclaw, skill, automation, ai-agent name: skylv-note-linking triggers: note linking
SKILL.md β note-linking
> Auto-discover hidden connections between your notes. Bidirectional links, knowledge graphs, and semantic link suggestions β without plugins.
What This Skill Does
Analyzes a directory of notes (markdown, txt, org, obsidian vault) and:
1. Extracts β reads all notes, splits by headings, extracts content blocks 2. Understands β detects entities (people, projects, topics, tools), infers relationships 3. Links β generates bidirectional link suggestions with confidence scores 4. Graphs β builds a knowledge graph showing how notes connect 5. Queries β traverse the graph: "show me all notes related to X", "who links to Y"
Unlike the incumbent slipbot (which does keyword matching), this skill uses semantic understanding β it knows that "LLM" relates to "language model" and "transformer architecture" even without exact keyword overlap.
When to Trigger
Trigger when user says:
Input
| Field | Type | Description |
|-------|------|-------------|
| notesPath | string | Path to notes directory (default: ~/.qclaw/workspace/) |
| query | string | Optional: specific question about note relationships |
| depth | number | Link traversal depth (default: 2) |
| format | string | graph / list / markdown (default: markdown) |
Output
Markdown Format (default)
## Knowledge GraphNotes Analyzed: 47
Total Links Found: 134
Orphan Notes: 3 (unconnected)
Top Hubs (most linked)
1. AI_Agent_Architecture.md β 18 connections
2. Memory_System_Design.md β 14 connections
3. GitHub_Strategy.md β 11 connectionsLink Suggestions
| From | To | Confidence | Reason |
|------|----|-----------|--------|
| EvoMap.md | Memory_System_Design.md | 0.94 | Shared topic: self-evolution |
| GitHub_Strategy.md | clawhub_publish.md | 0.91 | Project: SKY-lv repo family |
| AI_Agent_Architecture.md | hermes-agent-integration.md | 0.87 | Tool integration |Backlinks
EvoMap.md (3 backlinks)
β Memory_System_Design.md (self-repair loop concept)
β skill-market-analyzer.md (GEP protocol reference)
β agent-builder.md (evolution pattern)
Graph Format
{
"nodes": [{"id": "note-name", "connections": 18, "topics": [...]}],
"edges": [{"from": "A", "to": "B", "weight": 0.94, "reason": "..."}]
}
Technical Approach
Architecture
notesPath/
βββ link_engine.js β Core: read β extract β analyze β graph
βββ graph_query.js β Traverse graph, answer questions
βββ export.js β Export as Obsidian markdown, JSON, CSV
link_engine.js Core Logic
Phase 1: Index
.md, .txt, .org filesPhase 2: Entity Extraction
Phase 3: Relationship Detection
Relationship Score = cosine_similarity(embedding_A, embedding_B)
Without external embedding APIs, use:
Phase 4: Graph Construction
const graph = {
nodes: Map,
edges: Map>
}
Phase 5: Query
Threshold Strategy
| Confidence | Condition | Action | |-----------|-----------|--------| | β₯ 0.85 | Strong semantic match | Auto-link (add[[wikilink]]) |
| 0.60β0.84 | Probable match | Suggest with reason |
| 0.40β0.59 | Weak match | Flag as "possible" |
| < 0.40 | Noise | Ignore |Implementation Notes
Pure Node.js (no external APIs)
For embedding-free similarity, use: 1. TF-IDF vectors per note (term frequency Γ inverse document frequency) 2. Jaccard similarity on keyword sets 3. Levenshtein distance on headings to catch near-matches 4. YAML tag intersection for structured vaultsObsidian Compatibility
[[wikilink]] syntax![[embed]] and ![[callout]] patternsPerformance
~/.qclaw/note-linking-graph.jsonReal Data (2026-04-11 Market Analysis)
| Metric | Value | |--------|-------| | Current incumbent | slipbot (score: 1.021) | | Top target score | 3.5 | | Gap | 3.43Γ improvement possible | | Incumbent weakness | Keyword-only matching, no graph |
Skills That Compose Well With
skylv-knowledge-graph β if you want full graph visualizationskylv-file-versioning β version your note graph over timeskylv-ai-prompt-optimizer β optimize your note-taking promptsUsage
1. Install the skill 2. Configure as needed 3. Run with OpenClaw
π‘ Examples
1. Install the skill 2. Configure as needed 3. Run with OpenClaw