Follow and resolve Obsidian internal links ([[link]] syntax) to navigate interconnected notes within an Obsidian vault. Use when exploring note relationships, following references between documents, building knowledge graphs, or understanding how notes connect together. Supports recursive link traversal with configurable depth.
This skill enables navigation and exploration of Obsidian's internal link structure by resolving [[link]] references to read connected notes. Use this skill when understanding relationships between notes, following references, or building a comprehensive view of interconnected ideas within an Obsidian vault.
Invoke this skill when:
[[internal links]]Determine which Obsidian note to start from. This could be:
Use the scripts/resolve_links.py script to analyze the note and follow its links.
Dependencies: The script requires PyYAML. If using UV: uv pip install PyYAML. Otherwise: pip install PyYAML or pip3 install --break-system-packages PyYAML on systems with externally managed Python.
python scripts/resolve_links.py <file-path> --vault <vault-path> --depth <depth> --pretty
Parameters:
<file-path> (required): Path to the markdown file to analyze--vault (optional): Path to the Obsidian vault (defaults to /Users/tolga/src/tolgaio/brain)--depth (optional): Maximum recursion depth for following links (default: 1)
0 = Extract links but don't follow them1 = Follow direct links and identify their outgoing links2+ = Follow links recursively to the specified depth--pretty (optional): Format JSON output for readabilityExample:
# Follow links one level deep from inbox.md
python scripts/resolve_links.py /Users/tolga/src/tolgaio/brain/0_inbox/inbox.md --depth 1 --pretty
# Just extract links without following them
python scripts/resolve_links.py /path/to/note.md --depth 0
The script returns a JSON structure containing:
{
"file": "/path/to/source.md",
"links": [
{
"link_text": "digital-garden",
"display_text": "Digital Garden",
"resolved": true,
"target_file": "/path/to/digital-garden.md",
"content": "# Digital Garden\n\n...",
"nested_links": [...] // If depth > 0
}
],
"broken_links": ["nonexistent-note"]
}
Key fields:
links: Array of resolved link objects
link_text: The target from [[link_text]] or [[link_text|display]]display_text: What's shown to the user (after | or same as link_text)resolved: Whether the link target was foundtarget_file: Absolute path to the linked file (if found)content: Full text content of the linked filenested_links: Recursively resolved links (if depth allows)broken_links: Array of link targets that couldn't be resolvedStructure the results for the user based on their request:
For link exploration:
For content synthesis:
For knowledge mapping:
The script resolves links using this priority order:
id: field in YAML frontmatter.md extension)[[folder/note]], tries path resolutionExample:
---