wiki-path
Skill1 starsChanged 7 months agoApache-2.0View on GitHub
Find the shortest chain of links between TWO wiki pages ("how are A and B connected?"). Use when the user says "how is X connected to Y", "what's the path between X and Y", "how do X and Y relate", "shortest path from X to Y", "/wiki-path", "quel rapport entre X et Y", "comment relie-t-on X à Y", "chemin entre X et Y", or wants to understand the link between two specific pages. Do NOT use for one page's neighbourhood — that's `wiki-neighbors`; do NOT use for a full synthesized answer — that's `wiki-query`.
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- auto-modeSkill
- autoresearchSkill
- bind-workspaceSkill
- build-search-indexSkill
- canvasSkill
- conventionsSkill
- decision-consolidateSkill
- defuddleSkill
- discover-list-filesSkill
- discover-list-vaultsSkill
- force-new-port-startSkill
- hot-compactSkill
- lockSkill
- manage-deleteSkill
- manage-moveSkill
- meta-attach-vaultSkill
- meta-audit-bridge-readinessSkill
- meta-setupSkill
- meta-statusSkill
- meta-sync-templateSkill
- obsidian-basesSkill
- obsidian-markdownSkill
- read-frontmatterSkill
- read-getSkill
- read-searchSkill
- read-search-smartSkill
- saveSkill
- sync-from-githubSkill
- template-executeSkill
- unlockSkill
- who-is-speakingSkill
- wiki-boundarySkill
- wiki-exportSkill
- wiki-foldSkill
- wiki-graphSkill
- wiki-ingestSkill
- wiki-lintSkill
- wiki-neighborsSkill
- wiki-querySkill
- wiki-refresh-digestsSkill
- wikiSkill
- wiki-tourSkill
- write-appendSkill
- write-bundleSkill
- write-create-or-replaceSkill
- write-frontmatter-mergeSkill
- write-frontmatter-setSkill
- write-patchSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 52
Don't treat "no path found" as a failure to report apologetically — two pages can legitimately be unrelated.
- Very specific: line 53
Don't silently widen nodeTypes to bridge via a shared concept without telling the user you did, and why the intermediate node isn't a page.
- Very specific: line 54
Don't pick a candidate for the user on an ambiguous from/to — surface the list and let them choose.
- Very specific: line 55
Don't confuse this with wiki-neighbors — direction doesn't matter here (traversal is undirected).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
wiki-path
Find the shortest chain of links between two named pages, read directly from the persisted knowledge graph — "the brain's GPS". Deterministic graph lookup, no LLM synthesis. Reference: [[page-neighbors-roadmap]] item W-B.
Pre-condition
The knowledge graph must exist: wiki-meta/graph/knowledge-graph.json. If the tool call fails with "No knowledge graph at ...", offer to run /wiki-graph first, then retry.
Steps
1. Parse the request
from,to(both required) — page names, unique path suffixes, or exact vault-relative paths.maxDepth(optional, default 6, cap 20) — only raise this if the user explicitly asks for a deeper search; the default is generous for most vaults.nodeTypes— default["article"](path runs through pages only). If the user's phrasing suggests they want "how are these related through a shared idea" (e.g. two pages with no obvious direct link but a common theme), passnodeTypes: ["article", "entity", "topic"]to allow bridging through a shared concept or index topic — but only after a default-mode search comes back empty, or if the user explicitly asks for "concept" / "topic" bridging up front.
2. Call the tool
mcp__obsidian-router__wiki_path({ vault, from, to, maxDepth?, nodeTypes?, edgeTypes? })3. Handle the outcomes
- Graph missing → offer
/wiki-graph, then retry. - Ambiguous
from/to(error lists candidates) → show the candidates, ask the user to pick. - Endpoint not found → say so plainly; suggest checking the name or searching the wiki for it.
found: false(path: null) — this is a legitimate answer, not an error. Say the two pages aren't connected (withinmaxDepthhops via the requested edge/node types). If you searched in default mode (nodeTypes: ["article"]), offer to retry with the shared-concept bridge (nodeTypes: ["article","entity","topic"]) before concluding there's truly no relationship.
4. Present the result
Render the path as an arrow chain of [[wikilinks]] (by name), in order from from to to:
[[Project — obsidian-mcp-router]] → [[Crawl4AI]] → [[license-audit]]
Mention the hop count (length). If the path passes through a non-article node (an entity/topic — the shared-concept bridge case), call that out explicitly so the user understands why the two pages are linked (e.g. "connected via the shared concept OAuth").
When NOT to use
- Exploring one page's connections broadly (not to a specific second page) →
/wiki-neighbors. - A synthesized, cited answer to a broader question →
/wiki-query. - The graph doesn't exist yet → run
/wiki-graphfirst.
Anti-patterns
- Don't treat "no path found" as a failure to report apologetically — two pages can legitimately be unrelated; state it plainly.
- Don't silently widen
nodeTypesto bridge via a shared concept without telling the user you did, and why the intermediate node isn't a page. - Don't pick a candidate for the user on an ambiguous
from/to— surface the list and let them choose. - Don't confuse this with
wiki-neighbors— direction doesn't matter here (traversal is undirected); it does over there.
Quirks
- Traversal is undirected — a link read either way still counts as a connection (contrast
wiki-neighbors, where forward/backward matter). from === toreturns the trivial one-page path (length 0) — not an error.graphAnalyzedAtin the response indicates graph freshness — flag it if it looks stale relative to recent vault activity.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

