memory-bridge

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Memory Bridge — Cross-Tool Knowledge Browser

Memory Bridge — 跨工具知识浏览器

You are helping the user browse and compare their Obsidian wiki knowledge filtered by which AI tool originally produced it. The wiki tracks source provenance in
.manifest.json
and page
sources:
frontmatter — this skill surfaces that metadata as a navigable view.
你需要帮助用户按生成内容的AI工具筛选、浏览并对比他们的Obsidian wiki知识。该wiki在
.manifest.json
和页面的
sources:
前置元数据中记录来源信息——本技能将这些元数据转化为可导航视图。

Before You Start

开始之前

  1. Read
    ~/.obsidian-wiki/config
    to get
    OBSIDIAN_VAULT_PATH
    . Fall back to
    .env
    inside the obsidian-wiki repo.
  2. Read
    $OBSIDIAN_VAULT_PATH/.manifest.json
    — this is the source-of-truth for what tool produced what.
  3. Read
    $OBSIDIAN_VAULT_PATH/index.md
    for page titles and one-line descriptions.
  1. 读取
    ~/.obsidian-wiki/config
    获取
    OBSIDIAN_VAULT_PATH
    。如果该文件不存在,则使用obsidian-wiki仓库内的
    .env
    文件。
  2. 读取
    $OBSIDIAN_VAULT_PATH/.manifest.json
    ——这是记录各内容对应生成工具的权威来源。
  3. 读取
    $OBSIDIAN_VAULT_PATH/index.md
    获取页面标题和单行描述。

Commands

指令

Parse the user's invocation to determine mode:
InvocationMode
/memory-bridge <tool>
Browse — list all wiki pages sourced from
<tool>
/memory-bridge <tool> "<topic>"
Search — pages from
<tool>
that mention
<topic>
/memory-bridge diff
Diff — pages unique to each tool; overlap; blind spots
/memory-bridge diff <tool-a> <tool-b>
Diff — compare two specific tools
/memory-bridge map
Map — full origin matrix: every page × every tool that touched it
Recognized tool names:
claude
,
codex
,
hermes
,
openclaw
,
copilot
,
manual
(hand-written),
ingest
(wiki-ingest documents).
解析用户的调用指令以确定模式:
调用指令模式
/memory-bridge <tool>
浏览 — 列出所有来自
<tool>
的wiki页面
/memory-bridge <tool> "<topic>"
搜索 — 来自
<tool>
且提及
<topic>
的页面
/memory-bridge diff
差异对比 — 各工具独有的页面、重叠内容、知识盲区
/memory-bridge diff <tool-a> <tool-b>
差异对比 — 对比两个特定工具
/memory-bridge map
映射 — 完整来源矩阵:每个页面 × 所有编辑过它的工具
支持的工具名称:
claude
codex
hermes
openclaw
copilot
manual
(手动编写)、
ingest
(wiki导入文档)。

Step 1: Build the Source Map

步骤1:构建来源映射

Read
.manifest.json
. For each source entry, extract:
  • source_type
    — maps to tool name:
    • claude_conversation
      ,
      claude_memory
      ,
      claude_audit_log
      ,
      claude_desktop_session
      claude
    • codex_rollout
      ,
      codex_index
      ,
      codex_history
      codex
    • hermes_memory
      ,
      hermes_session
      hermes
    • openclaw_memory
      ,
      openclaw_daily_note
      ,
      openclaw_session
      ,
      openclaw_dreams
      openclaw
    • copilot_session
      ,
      copilot_checkpoint
      ,
      copilot_transcript
      ,
      copilot_memory_artifact
      copilot
    • document
      ingest
    • anything else →
      manual
  • pages_created
    and
    pages_updated
    — the wiki pages that came out of this source
Build a map:
tool_pages = {
  "claude": set(pages created/updated by claude sources),
  "codex":  set(pages created/updated by codex sources),
  ...
}
A page can appear in multiple tools' sets if multiple tools contributed to it.
读取
.manifest.json
。针对每个来源条目,提取以下信息:
  • source_type
    — 对应工具名称:
    • claude_conversation
      ,
      claude_memory
      ,
      claude_audit_log
      ,
      claude_desktop_session
      claude
    • codex_rollout
      ,
      codex_index
      ,
      codex_history
      codex
    • hermes_memory
      ,
      hermes_session
      hermes
    • openclaw_memory
      ,
      openclaw_daily_note
      ,
      openclaw_session
      ,
      openclaw_dreams
      openclaw
    • copilot_session
      ,
      copilot_checkpoint
      ,
      copilot_transcript
      ,
      copilot_memory_artifact
      copilot
    • document
      ingest
    • 其他类型 →
      manual
  • pages_created
    pages_updated
    — 该来源生成或更新的wiki页面
构建映射表:
tool_pages = {
  "claude": set(pages created/updated by claude sources),
  "codex":  set(pages created/updated by codex sources),
  ...
}
如果多个工具参与编辑同一页面,该页面会出现在多个工具的集合中。

Step 2: Execute the Mode

步骤2:执行对应模式

Browse Mode

浏览模式

Filter
tool_pages[<tool>]
and present as a grouped list:
undefined
筛选
tool_pages[<tool>]
并以分组列表形式展示:
undefined

Knowledge from <tool> (<N> pages)

Knowledge from <tool> (<N> pages)

By category

By category

  • concepts/ — N pages
  • entities/ — N pages
  • skills/ — N pages ...
  • concepts/ — N pages
  • entities/ — N pages
  • skills/ — N pages ...

Pages

Pages

PageCategoryTagsLast updated
[[page-name]]concepttag1, tag22026-04-10
...

Read frontmatter for the listed pages (grep for `^(title|category|tags|updated):`) — do not read full page bodies unless the user asks.
PageCategoryTagsLast updated
[[page-name]]concepttag1, tag22026-04-10
...

读取所列页面的前置元数据(通过grep匹配`^(title|category|tags|updated):`)——除非用户要求,否则不要读取完整页面内容。

Search Mode

搜索模式

Within the filtered page set, run:
grep -l "<topic>" <pages in tool set>
Then grep section headers (
^##
) around matches to give context without full reads. Present results as a ranked list with the matching excerpt.
在筛选后的页面集合中执行:
grep -l "<topic>" <pages in tool set>
然后在匹配内容附近提取章节标题(
^##
)以提供上下文,无需读取完整内容。将结果按排名列表展示,并附带匹配片段。

Diff Mode

差异对比模式

Compute:
  • only_in_a
    =
    tool_pages[a]
    tool_pages[b]
  • only_in_b
    =
    tool_pages[b]
    tool_pages[a]
  • shared
    =
    tool_pages[a]
    tool_pages[b]
If no specific tools are given, compare all tools pairwise (limit to pairs with >0 overlap or unique pages to keep output concise).
Present:
undefined
计算:
  • only_in_a
    =
    tool_pages[a]
    tool_pages[b]
  • only_in_b
    =
    tool_pages[b]
    tool_pages[a]
  • shared
    =
    tool_pages[a]
    tool_pages[b]
如果未指定具体工具,则对所有工具进行两两对比(仅保留有重叠内容或独有页面的配对,以保持输出简洁)。
展示格式:
undefined

Memory Bridge Diff — <tool-a> vs <tool-b>

Memory Bridge 差异对比 — <tool-a> vs <tool-b>

Only in <tool-a> (<N> pages)

仅存在于<tool-a>(共<N>页)

These concepts exist in your wiki from <tool-a> sessions but <tool-b> has never touched them. <list with one-line descriptions from index.md>
这些概念来自<tool-a>会话,存在于你的wiki中,但<tool-b>从未涉及。 <来自index.md的单行描述列表>

Only in <tool-b> (<N> pages)

仅存在于<tool-b>(共<N>页)

<list>
<列表>

Shared (<N> pages)

共同内容(共<N>页)

Both tools have contributed to these pages. <list — only show if ≤15; otherwise just the count>
两个工具都参与了这些页面的编辑。 <列表——仅当数量≤15时展示,否则仅显示数量>

Notable gaps

显著知识差距

<highlight the most interesting asymmetries — e.g. "codex has 12 pages on build tooling that claude has never seen">
undefined
<突出最值得关注的不对称点——例如:"codex有12页关于构建工具的内容,而claude从未接触过">
undefined

Map Mode

映射模式

Build a matrix showing every page and which tools have touched it. Cap at 50 rows; sort by number of contributing tools descending (most cross-tool pages first — these are the richest nodes).
| Page | claude | codex | hermes | copilot |
|------|--------|-------|--------|---------|
| [[react-patterns]] | ✓ | ✓ | — | ✓ |
| [[rust-ownership]] | — | ✓ | — | — |
构建一个矩阵,展示每个页面及所有编辑过它的工具。最多显示50行;按参与编辑的工具数量降序排列(跨工具最多的页面优先——这些是信息最丰富的节点)。
| Page | claude | codex | hermes | copilot |
|------|--------|-------|--------|---------|
| [[react-patterns]] | ✓ | ✓ | — | ✓ |
| [[rust-ownership]] | — | ✓ | — | — |

Step 3: Spawn impl-validator (if available)

步骤3:启动impl-validator(若可用)

After generating output, if the
impl-validator
skill is available in the current environment, spawn it as a subagent:
impl-validator check:
  goal: "Browse/diff wiki knowledge by source tool and surface cross-tool blind spots"
  artifacts: [the output you just generated]
  checks:
    - Did you correctly parse source_type from .manifest.json?
    - Are page counts plausible (not 0 unless vault is empty)?
    - Is the diff symmetric (a−b and b−a are disjoint)?
    - Did you avoid reading full page bodies when not needed?
Apply any issues it surfaces before presenting output to the user.
生成输出后,如果当前环境中存在
impl-validator
技能,则将其作为子代理启动:
impl-validator check:
  goal: "Browse/diff wiki knowledge by source tool and surface cross-tool blind spots"
  artifacts: [the output you just generated]
  checks:
    - Did you correctly parse source_type from .manifest.json?
    - Are page counts plausible (not 0 unless vault is empty)?
    - Is the diff symmetric (a−b and b−a are disjoint)?
    - Did you avoid reading full page bodies when not needed?
在向用户展示输出前,修复它指出的所有问题。

Step 4: Log

步骤4:记录日志

Append to
$OBSIDIAN_VAULT_PATH/log.md
:
- [TIMESTAMP] MEMORY-BRIDGE mode=<browse|search|diff|map> tool=<tool> pages_shown=N
将以下内容追加到
$OBSIDIAN_VAULT_PATH/log.md
- [TIMESTAMP] MEMORY-BRIDGE mode=<browse|search|diff|map> tool=<tool> pages_shown=N

Output Conventions

输出规范

  • Always show page counts so the user can calibrate how much knowledge is in each tool's silo.
  • Use
    [[wikilinks]]
    for page references (or standard Markdown links if
    OBSIDIAN_LINK_FORMAT=markdown
    is set).
  • In diff mode, call out the most surprising asymmetry explicitly — that's the insight the user came for.
  • If
    .manifest.json
    is empty or missing, say so clearly and suggest running
    /wiki-history-ingest
    first.
  • 始终显示页面数量,以便用户了解每个工具的知识储量。
  • 使用
    [[wikilinks]]
    作为页面引用(若设置了
    OBSIDIAN_LINK_FORMAT=markdown
    ,则使用标准Markdown链接)。
  • 在差异对比模式下,明确指出最出人意料的不对称点——这正是用户想要获得的洞察。
  • 如果
    .manifest.json
    为空或缺失,需明确告知用户,并建议先运行
    /wiki-history-ingest