Produces an Obsidian Graph View–style interactive knowledge graph from any folder. Paper-white background, pencil-sketch hand-drawn feel, D3.js force-directed layout.
The core aesthetic is “pencil doodles on a notebook page”:
#f5f2ed, with faint grid lines and subtle grain noisefeTurbulence + feDisplacementMap filters for hand-drawn wobbly edges#2c2825 ~ #d5cfc6), no saturated colorsbackdrop-filter: blur(16px) + dashed dividers| Type | Visual | Size Rule |
|---|---|---|
| Document (document) | Solid dark circle #4a4540, soft shadow |
Scaled by importance metric (e.g. word count, links-in), 4–20 px |
| Note (note) | Hollow dashed circle | Fixed 5.5 px |
| Draft (draft) | Semi-transparent filled circle | Fixed 5.5 px |
| Tag / Topic (tag) | Large semi-transparent circle, Caveat handwriting label | Fixed 10 px |
| Type | Visual | Meaning |
|---|---|---|
| tag-link | Thin solid line #cdc6bb, 0.5 px |
Node → Tag membership |
| content-link | Dashed line #a09888, 1.2 px |
Direct reference or shared keyword between nodes |
| sequence-link | Thick dashed line #8a8279, 1.8 px |
Sequential or hierarchical relationship |
Ask the user which folder to visualize. Accept any path. Then recursively scan the folder to inventory all files.
Read the files and build three data structures:
Tags / Topics: Detect recurring themes across files. Strategies:
Nodes: Each file or meaningful content unit becomes a node.
id, label (filename or title), type (document / note / draft), tags (which topic clusters it belongs to), desc (brief summary or first line), and an optional weight (word count, size, or other importance metric)document; short notes or stubs → note; files with “draft” in name or WIP markers → draftEdges / Links:
tag-link[[...]], markdown links, or shared unique terms) = content-linksequence-linkRead assets/template.html and replace the // __DATA_INJECT__ … // __DATA_END__ block with the extracted data.
Data format:
const tags = [
{ id: 't_topicname', label: 'Topic Name' },
// ...
];
const documents = [
{ id: 'd_filename', label: 'Document Title', date: 'YYYY-MM-DD', weight: 1200, type: 'report', tags: ['t_topicA', 't_topicB'], desc: 'Brief summary' },
// ...
];
const notes = [
{ id: 'n_001', label: 'Note Title', status: 'note', tags: ['t_topicA'], desc: 'Description', related: ['n_002', 'd_filename'] },
// ...
];
const sequenceGroups = [
['d_chapter1', 'd_chapter2', 'd_chapter3'], // ordered series
// ...
];
Save the completed HTML to the workspace root as contextual-neural-map.html (or a user-specified name), then provide a computer:// link.
The template includes these interactions out of the box — no extra development needed:
Common tweaks users may request:
| Need | Where to change |
|---|---|
| Background color | body { background: #xxx } |
| Node colors | nodeEls fill and stroke values |
| Fonts | @import url(...) and font-family |
| Node size formula | Math.sqrt(d.weight / N) — adjust N |
| New edge type | Add a new type to links data, add matching stroke/dasharray style |
| Force layout params | simulation.force(...) distance / strength / charge values |
This skill works with any folder that contains text-based files:
As long as you can extract nodes and links into the JSON structure above, the template renders it beautifully.