/second-brain-skills:relinkfrom second-brain-skills
Integrates a new concept into an Obsidian vault knowledge graph by retrieving top-K candidates and judging links via LLM, avoiding orphan notes. Mode A links one node; mode --deep wires in orphaned islands.
Ships in second-brain-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
🧒 When reporting to a non-technical operator: end with a child-simple "In plain words" recap in their language.
The principle (canon: concept-creation-rules.md §11): an important new idea that only exists as a note is an island, not part of the Second Brain. It must be integrated into the knowledge graph. Mirror of [[no-orphan-notes-rule]] (passive "≥1 inbound"); this is the active "maximize meaningful connectivity for important nodes" side.
Architecture law (from the DR): retrieval first → judgment second → writing last. The LLM never decides links by reading the whole vault; it gets a bounded, diverse candidate pool, then types relations and proposes edits. Less hallucination, explainable, repeatable.
A NEW: concept · mental model · framework · theory · term · project · philosophy · research cluster · personal principle · knowledge-organization system. Threshold = §1 of concept-creation-rules (≥3 recurrences, noun-entity, domain-bound). Routine notes → passive no-orphan check, not this.
The operator's law ([[vault-data-architecture]]): cheap tools first; the LLM judges only the top-K.
Input: the new note's path/name (or freshly pasted text → first save via obsidian-ingest, then relink).
List: canonical concepts · aliases/acronyms · key claims · related domains · possible parent/child concepts · candidate MOCs. (LLM + the note's own frontmatter; no vault scan.)
python "$IMPORTS_ROOT/namesearch/find_name.py" "<each named entity>" (exact/translit/typo, 0 tokens) + grep literal mentions + alias/unlinked-mention matches.python "$IMPORTS_ROOT/brain_ask.py" "<node + its entities>" (e5+reranker; finds hidden 2nd/3rd-order links: causality, analogy, shared mechanism, opposing view). e5 is multilingual → RU/EN drift is covered.incoming_counts in $IMPORTS_ROOT/orphan-scan/reverse-index.json (basename→inbound count, free): mark which candidates are hubs/MOCs (high count) vs orphans (0). Used by the reverse-link + MOC policy below. (Full 1/2-hop adjacency graph = deferred future enhancement; semantic channel already covers conceptual neighbours.)06-Concepts/ + aliases + 09-Bridges/ so you don't propose a dupe (defer to concept-creation-rules §5).Fuse the channels (RRF-style — don't add raw scores from different rankers). Soft ranking heuristic:
≈ 0.35·semantic + 0.20·lexical + 0.15·entity_overlap + 0.20·hub/MOC_fit + 0.10·freshness (zero freshness if evergreen).
defines · defined_by · extends · depends_on · contrasts · example_of · evidence_for · method_for · same_cluster · moc_member · see_also. Write it as a short gloss after the link: - [[Target]] — method_for: <one phrase why>.
For each edit produce an internal record {path, target_type: heading|frontmatter, target: "Related", operation: append_once, text, dedupe_key: "source::target::relation"}.
## Related (always for P0/P1, sometimes P2).depends_on/defined_by/extends) · target loses context without it · source gives target a new example/contrast/method. Do NOT add a reverse link into a dense hub/glossary where the auto-backlink already suffices (avoids overlinking).--deep). Prefer MOC sections Core/Related/Methods/Debates/Examples over a dump.python "$IMPORTS_ROOT/vault_backup.py" BEFORE any write ([[vault-backup-rule]]; runbook = skill obsidian-backup).append_once semantics: before adding a link, check it isn't already in the section (dedupe_key) — re-running /relink must be a no-op on already-done links.## Related block; never mangle adjacent list lines (⚠️ dedup-skill grabli: never batch-Edit list deletions).relink_last_run: <date> in the new note's frontmatter (feeds the monthly audit).python "$IMPORTS_ROOT/validate_links.py" → 0 broken.python "$IMPORTS_ROOT/brain_embed_update.py" → RAG sees the new edges ([[reindex-routine]]).--deep (deep relink: whole vault → islands)Monthly/on-command sweep over the ALREADY-COMPUTED orphan list (not a fresh full scan).
python "$IMPORTS_ROOT/orphan-scan/orphan_scan.py" → refresh orphans.csv / orphans-by-folder.csv ([[vault-orphan-baseline]]).python "$IMPORTS_ROOT/orphan-scan/build_dashboard.py" → $OBSIDIAN_VAULT/_Dashboards/Vault-Orphans.html (the operator works by eye).incoming_counts) without a hub · stale MOCs. Run top island clusters through Mode A steps 2–7. Loop-until-dry (stop at intentional orphans: archives, raw originals).dedup (don't merge here).Between A and B: the operator names a TOPIC, not one note. Run Mode A steps 2–7 with the THEME's entities as the query (RAG + namesearch + grep on theme terms → judge top-K). Then, before proposing links:
90_MOCs/ one), wire the others up to it, and roster the sub-concepts under it. This consolidation is the highest-value edit — bigger than any single link._Health-MOC, _Perepiska-s-Ottsom-MOC90_MOCs/ MOC — holds external/field knowledge, parent MOC-index e.g. MOC-Biohacking-Longevity, MOC-Family-Life_Self-Bible-MOC — holds the "this is who I am" view (cofounder of digital twin) e.g. PhD-as-scholar, family-as-influenceMOC-index lists the import-corpus too, not just the thematic)._Health-MOC (830 notes) was orphaned from thematic MOC-Biohacking-Longevity + MOC-index — bridged both ways, 6 personal concepts rostered, 5 concepts up-linked — 8 notes / ~16 typed links / 0 new broken.MOC-index + cross-domain bridges to crypto/AI) — 3 notes / ~3 links / 0 broken. Lesson: always verify-existing first; PhD was already 90% done.person-<name> + MOC-Family-Life (closed long-standing TODO in MOC-index) + identity link in _Self-Bible-MOC (father = "identity-brick of the twin"). 5 notes / ~12 typed links / 0 broken.concept-*/person-* ([[operating-agreement]], [[vault-conventions]]).The DR suggested, and we declined for AK-47: a Local REST API + MCP plugin (Edit targets sections fine), a new vector DB (have e5+reranker), spaCy 3-layer NER (LLM+namesearch suffice), a JSON-schema validation runtime, and a full link-adjacency graph engine (hub counts are enough for v1).
ask (RAG engine), dedup (dupes), obsidian-ingest (first-time save of a raw dump), obsidian-backup (backup runbook).Like this skill? It is part of second-brain-starter-kit: the second brain we built for ourselves and run every day at Palo Alto AI Research Lab. Install the whole set with npx skills add tonydzi/second-brain-starter-kit. Everything is open source and free, so take what you need.
Flagships worth a look on their own: secondop-panel (a second opinion from a panel of external models), claude-memory-tidy (stop your agent's memory from rotting), telegram-mcp-kit (your own Telegram over MCP in about 15 minutes).
Author: Anton Dziatkovskii, Palo Alto AI Research Lab. Telegram @tonydzi - WhatsApp +1 341 222 9178 - X @Tony_Stef_
Engineers: want to test-drive this setup? Message me. I hand out free starter seeds to engineers who test and report back, and custom skill requests are welcome.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
obsidian, knowledge-graph, note-linking, second-brain, vault-management
248 skills in this plugin
/03Run an autonomous consensus round between agent peers on several machines: they negotiate a decision over a shared channel and execute it without a human relaying messages. Use when multiple machines must agree on a change. Triggers: "/03", "work it out among yourselves", "find consensus". Wakes the human only for irreversible actions or a deadlock./1Recover a session after a hard crash (app died, machine rebooted, context lost mid-work): replay the turn-state ledger for the last requests, files and decisions, run a green/red health ping over the system map, file sync and MCP connectors, then rebuild the previous session history for pickup. Triggers: "/1", "resume after crash", "wake"./agendaShow the operator's day: today's calendar plus what needs them personally (leads due, people awaiting a reply, deadlines), pulled from Calendar and Telegram and ranked. Read-only: sends and commits nothing. Triggers: "/agenda", "what's on today", "my agenda".npx claudepluginhub tonydzi/second-brain-starter-kit --plugin second-brain-skillsOther plugins' skills for the same job