/twinmind:connectfrom twinmind
Manually links or unlinks two cards in a TwinMind knowledge graph. Handles relationship type classification, bidirectional link writing, and index updates. Invoked when user explicitly requests a connection.
Ships in twinmind. 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.
處理使用者明確要求的手動連結操作——建立或解除兩張卡片之間的連結。與 twinmind:capture 的自動連結推理不同,這裡是使用者主動指定要連結哪兩張卡片。
關係類型、分類規則、Connections 格式和反向對照表的完整定義,請讀取 twinmind:capture skill 的 references/link-inference.md (與 capture 共用同一套連結系統;該 references 檔案位於 plugin 內,可從 .claude/twinmind/config.json 的 pluginRoot 取得 plugin 路徑後再讀)。
一致性驗證由 PostToolUse hooks 自動處理。完成操作後透過 Bash tool 執行 node .claude/twinmind/bin/tm-post-op.mjs --layer knowledge 觸發 post-op pipeline。
透過 Bash tool 執行:
node .claude/twinmind/bin/tm-post-op.mjs --layer knowledge --event '{"event_type":"<LINK_CREATED|LINK_REMOVED>","event_context":{"source_title":"<title>","target_title":"<title>","relation":"<type>","domains":["<domain>"]}}'
腳本同步執行。exit code 0 成功,exit code 1 失敗(stderr 印出錯誤訊息)。
啟動後立即回應使用者。Subagent 執行 changelog(append-only 至 changelog-YYYY-MM.md)+ MOC 閾值檢查(使用 payload config 和 domain_counts,不重新讀取 config.md 或 vault-index.json)+ Home.md 重建(使用 payload recent_notes,不重新讀取 vault-index.json 取最新卡片)。
當使用者要求連結兩張卡片時(如「把 Rust Ownership 和 RAII 連起來」):
vault-index.json 的 notes 以 title/keyword 找到兩張目標卡片twinmind:capture skill 的 references/link-inference.md 的分類優先序自動推斷twinmind:capture skill 的 references/link-inference.md 的「建立連結程序」):
Connections 格式:- <符號> [[<slug>|<title>]] — <一句話說明為何連結>(slug 為目標卡片檔名,不含 .md)
寫入源卡片 ## Connections(移除 placeholder 若有)
寫入目標卡片反向連結(依反向對照表)
透過 Bash tool 執行程式化索引更新(不得直接 Edit vault-index.json):
node .claude/twinmind/bin/tm-update-index.mjs add-link '{"source":"<source_id>","target":"<target_id>"}'
腳本自動處理:雙向更新 links_to/linked_from、重算兩方 link_count、遞增 stats.total_links、更新 stats.last_updated
node .claude/twinmind/bin/tm-post-op.mjs --layer knowledge --event '...',event_type: LINK_CREATED)當使用者要求解除兩張卡片的連結時:
vault-index.json 找到兩張目標卡片links_to/linked_from)## Connections 移除含目標卡片 wiki-link 的行。若移除後無連結,恢復 (尚無連結)## Connections 移除含源卡片 wiki-link 的行。同上vault-index.json(單次 Edit):old_string 涵蓋源 note entry、目標 note entry 和 stats 物件的連續 JSON 區塊;new_string 包含移除連結後的完整版本(links_to/linked_from 移除對應 ID、重算兩方 link_count、重算 stats.total_links、更新 stats.last_updated)。此操作 SHALL 為單次 Edit tool invocationnode .claude/twinmind/bin/tm-post-op.mjs --layer knowledge --event '...',event_type: LINK_REMOVED)What SKILL.md sets; muted values are Claude Code's defaults
13 skills in this plugin
/actionTwinMind action engine — manages standalone actions that aren't tied to any project. Use this skill when the user describes something they want to do that has a clear scope but doesn't belong to a project. Triggers: '建立行動', 'create action', '新增 action', '完成 action', 'action done', '做完了', '列出 actions', 'list actions', '升格為專案', 'promote to project', or when the user describes an executable goal like '研究 X', '設定 Y', '整理 Z'. Also use when the user says an action is getting too big and needs to become a project. Important: if the user mentions a specific project name, route to twinmind:project instead — that skill handles project-scoped actions./areaTwinMind area engine — manages Areas of ongoing responsibility (long-term focus domains with no end date). Use this skill when the user talks about a persistent life/work domain they want to track, like '健康管理', '職涯發展', '財務規劃', or when they want to group projects and cards under a theme. Triggers: '建立領域', 'create area', '新增 area', '停用 area', 'deactivate', '重新啟用', 'reactivate', '關聯到 area', 'link to area', '列出 areas', 'list areas', '關注領域', or any mention of ongoing responsibilities, life domains, or thematic grouping of projects. Important: Areas are different from Projects (which have end dates) and from card domains (which are metadata tags). An Area is a conscious commitment to track a life domain./captureTwinMind card engine. Use this whenever the user shares a thought, idea, knowledge, question, or source reference that should be captured as a card. Also handles card updates and deletions. Covers the full lifecycle: type classification, duplicate detection, card creation, automatic link inference to existing cards, and index updates. If the user says something that looks like knowledge worth remembering — this is the skill to use. For vague or unformed thoughts, route to twinmind:inbox instead./enrichTwinMind card enrichment engine. Use this whenever the user wants to deepen, expand, or intellectually complete an existing vault card. Triggers on: 'enrich {card}', 'enrich {card} → growing', '完善 {card}', '深化 {card}', '把 {card} 發展成 growing', '補充 {card} 的概念', 'expand {card}', '讓 {card} 更完整'. The user provides only the card name and optional focus hints — the AI autonomously identifies content gaps and generates comprehensive content across six dimensions: concept explanation, origin/story, examples, related terms (abstraction/lateral/decomposition), practical applications, and common misconceptions vs counter-intuitive insights. Always use this skill when the user wants a card to grow intellectually, not just receive new facts./inboxTwinMind inbox engine — the safety net for half-formed thoughts. Use this skill whenever the user shares something vague, unstructured, or not yet ready to become a Card, Action, Task, or Project. Classic triggers: '突然想到...', '隨手記一下', '有個想法但還不確定', 'inbox', '升格', 'promote', 'dismiss', '清理 inbox', 'triage', '待處理'. Also use this when the user's input is ambiguous — if you can't tell whether it's knowledge, a task, or an action, it belongs in the Inbox. The key question: does the user know what this should become? If not → Inbox. Important: do NOT use this for inputs that are already clear — a fact goes to twinmind:capture, '買牛奶' goes to twinmind:task, a scoped action goes to twinmind:action./post-opTwinMind shared post-operation pipeline — DEPRECATED as LLM subagent. Post-op is now handled programmatically via scripts/post-op.mjs. This skill file is retained for reference only.npx claudepluginhub volderlu/twinmind --plugin twinmindOther plugins' skills for the same job