Obsidian orphan rescue
Skill build-with-dhiraj/ai-workflow-framework-portability-kit/Skills/obsidian-orphan-rescue
Portable, self-contained snapshot of a complete Claude Code setup — 36 specialist agents, 134 skills, plugins, MCP servers & host tooling. Clone, claude login, run one script, restore the whole orchestration stack in ~20 min.
npx -y skills add build-with-dhiraj/ai-workflow-framework-portability-kit --skill obsidian-orphan-rescueAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Fix Obsidian orphans at the source. Auto-link orphan notes in any [[wikilink]] markdown vault. Three modes: resolve (deterministic alias-table resolution, $0), anchor (local embedding fallback to nearest existing hub by cosine, $0), and mint (experimental, clusters orphans + mints new concept hubs). Safe-writes contract: frontmatter-only writes, atomic, idempotent, dangling-link guard, per-hub absorption cap, body-only content hash preserved, concepts-only by default. Use when the user asks any of: fix my obsidian orphans, obsidian orphan notes, auto-link my obsidian vault, obsidian unlinked notes, obsidian de-orphan, connect my obsidian notes, obsidian wikilink resolver, obsidian entity resolution, fix obsidian link rot, obsidian auto wikilink, anchor my orphans, obsidian orphan rescuer, rescue obsidian orphans, resolve obsidian entities, fix obsidian dangling links. Works on any markdown vault using [[wikilinks]] (Obsidian, Logseq, Foam, Quartz).
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.1 KB, ~1.6k tokens by cl100k_base, as published. Nobody here has run it
obsidian-orphan-rescue
Fix Obsidian orphans at the source. Auto-link orphan notes in any markdown vault that uses [[wikilinks]]. Frontmatter-only writes. Atomic. Idempotent.
When to use this skill
Trigger this skill whenever the user wants to:
- Fix orphans, not just list them. Every other tool lists orphans; this one auto-fixes them with safety guards.
- Resolve plain-string entities to wikilinks. A note tagged
entities: [Microscopy]should becomeentities: [[[microscopy]]]if amicroscopyhub exists. - De-orphan a leaf. Attach a true orphan to its single best matching existing hub by embedding cosine.
- Mint hubs for coherent orphan clusters (experimental). For clusters of >= 5 orphans about the same topic, create a new concept hub and anchor them to it.
The three modes
| Mode | What it does | Network? | Writes new notes? |
|---|---|---|---|
resolve | Plain-string entities/topics → canonical [[wikilinks]] via alias table | No | No |
anchor | True-orphan leaves → nearest existing hub by cosine similarity | No (local fastembed) | No |
mint | Cluster orphans → mint new concept hubs (EXPERIMENTAL) | LLM naming call | YES (new hubs) |
Safety guards (read this first)
Every other PKM auto-link tool stops here because writing to a vault is dangerous. The orphan-rescue's contract is what makes it safe:
- Frontmatter-only writes. Body bytes are never modified.
- Atomic writes. tempfile + os.rename, crash-safe; no partial writes.
- Body-only content hash preserved. Downstream embedders never re-embed.
- Idempotency stamps. A second run on unchanged notes is a no-op.
- Dangling-link guard. Only links to hubs that exist on disk.
- Per-hub absorption cap. No single hub can absorb more than N orphans per run (anti-star).
- Concepts-only target set by default. Generic how-tos never anchor to brand entity hubs (the brand-leak guard).
- DO_NOT_MERGE pairs. User can supply pairs that look similar but must never collapse (e.g.
claude-aivsclaude-code). - Mint mode requires
--experimental. It writes NEW notes; never enabled by accident.
Every guard has a test in tests/ that locks it in.
How to run
Resolve mode (deterministic, $0)
# Dry-run first. ALWAYS dry-run first.
obsidian-orphan-rescue resolve --vault ~/Documents/MyVault --dry-run
# Approve, then write.
obsidian-orphan-rescue resolve --vault ~/Documents/MyVault
Anchor mode (local fastembed, $0 after one-time model download)
# Dry-run writes a per-candidate audit TSV. Review BEFORE the live write.
obsidian-orphan-rescue anchor --vault ~/Documents/MyVault --dry-run
# Live.
obsidian-orphan-rescue anchor --vault ~/Documents/MyVault
Mint mode (EXPERIMENTAL, writes new notes)
# Always dry-run. The mode writes new hub notes.
obsidian-orphan-rescue mint --vault ~/Documents/MyVault --experimental --dry-run
# Read the audit TSV. Read the minted-cluster names. Then if you approve:
obsidian-orphan-rescue mint --vault ~/Documents/MyVault --experimental
Recommended workflow (with a complementary tool)
- Audit first with
obsidian-graph-auditor(read-only diagnostic). Find out HOW many orphans you have and what the worst dimension is. - Resolve with
obsidian-orphan-rescue resolveto convert plain-string entities to canonical wikilinks. - Anchor the remaining true orphans with
anchor. - (Optional, advanced) Mint hubs for clusters that have no hub yet.
- Re-audit to verify the rubric improved.
Install
This skill ships in the obsidian-pkm-skills monorepo. You need two things: the obsidian-orphan-rescue CLI on your PATH, and the skill files where your agent looks for them.
1. Install the CLI
# Working today (from source). Bare install = resolve mode only ($0, no extras):
pip install "git+https://github.com/build-with-dhiraj/obsidian-pkm-skills#subdirectory=skills/obsidian-orphan-rescue"
# Add the embedding extras for anchor + mint modes ($0, local embeddings):
pip install "obsidian-orphan-rescue[embed] @ git+https://github.com/build-with-dhiraj/obsidian-pkm-skills#subdirectory=skills/obsidian-orphan-rescue"
# Coming shortly, once published to PyPI:
pip install obsidian-orphan-rescue # resolve mode only
pip install "obsidian-orphan-rescue[embed]" # + anchor + mint
Either way the obsidian-orphan-rescue command lands on your PATH.
2. Install the skill files
Clone the monorepo once, then copy or symlink this skill's directory into your agent's skills folder. Symlinking lets a git pull update the skill in place:
git clone https://github.com/build-with-dhiraj/obsidian-pkm-skills ~/src/obsidian-pkm-skills
# Claude Code (swap the target for ~/.cursor/skills, ~/.gemini/skills, or ~/.codex/skills):
mkdir -p ~/.claude/skills
ln -s ~/src/obsidian-pkm-skills/skills/obsidian-orphan-rescue ~/.claude/skills/obsidian-orphan-rescue
Then ask your agent: "fix my obsidian orphans at ~/Documents/MyVault".
What it does NOT do
- It does not modify your note bodies. Frontmatter-only writes.
- It does not write dangling links. Targets must exist on disk.
- It does not force a noisy match. Below the cosine floor, orphans stay unlinked.
- It does not require GPT for resolve or anchor (
$0). Only mint mode uses an LLM call. - It does not require an Obsidian plugin install. Pure CLI.
- It does not require Obsidian to be installed at all. Works on any markdown directory with wikilinks.
Related
- Safety contract with recovery instructions:
docs/SAFETY.md - The formal guard spec:
docs/RUBRIC.md - Feature comparison vs Find Unlinked Files / Various Complements / Janitor / Dangling Links / Smart Connections:
docs/COMPARISON.md - Companion diagnostic tool: obsidian-graph-auditor. Audit first, fix second.
What ships with it: 40 files
386.8 KB alongside SKILL.md, 17 of them executable
docs/
- 03-orphan-killer-resolve.png225.3 KB
- COMPARISON.md6.7 KB
- RUBRIC.md9.8 KB
- SAFETY.md8.5 KB
examples/
- demo-vault/concepts/graph-theory.md332 B
- demo-vault/concepts/knowledge-management.md353 B
- demo-vault/entities/obsidian.md201 B
- demo-vault/entities/python.md264 B
- demo-vault/README.md1.5 KB
- demo-vault/sources/learning-python-basics.md473 B
- demo-vault/sources/linked-already.md280 B
- demo-vault/sources/mixed-residual.md616 B
- demo-vault/sources/note-taking-thoughts.md273 B
- demo-vault/sources/orphan-graph-thinking.md684 B
- demo-vault/sources/orphan-py-data-analysis.md539 B
- demo-vault/sources/orphan-random-recipe.md406 B
obsidian_orphan_rescue/
- alias_table.pyruns5.1 KB
- anchor.pyruns12.9 KB
- cli.pyruns14.7 KB
- fm.pyruns4.5 KB
- guards.pyruns6.5 KB
- __init__.pyruns2.0 KB
- mint.pyruns23.5 KB
- resolve.pyruns8.1 KB
- slug.pyruns1.1 KB
tests/
- conftest.pyruns2.8 KB
- __init__.pyruns0 B
- test_alias_table.pyruns3.2 KB
- test_anchor.pyruns7.3 KB
- test_cli.pyruns1.7 KB
- test_guards.pyruns3.0 KB
- test_resolve.pyruns4.4 KB
- test_slug.pyruns1.2 KB
- CHANGELOG.md3.1 KB
- CONTRIBUTING.md702 B
- .gitignore426 B
- LICENSE1.0 KB
- llms.txt4.0 KB
- pyproject.toml2.5 KB
- README.md17.1 KB