heptabase-synclisted
Install: claude install-skill SungFeng-Huang/research-cards
# Heptabase → Obsidian Sync (Level 1)
> **已併入 [note-sync]**:日常請用 `skills/note-sync/sync.py`(單一入口、全鏈編排+衝突彙總;`--mode heptabase` 等價單跑本段(舊名 `--mode obsidian` 仍相容))。本檔保留引擎語義的完整說明;引擎 `sync.py` 檔案原位不動。
## Agent(claude / codex)
兩個 agent 皆可駕駛(Codex 端:`research-cards@private-plugins` plugin 的 heptabase-sync skill)。唯一的 Claude
限定步驟:`unresolved_highlights` 需要 mcp get_object 讀 highlightElement——Codex
駕駛時把該清單回報給使用者,請對方在 Claude Code session 補 highlights.json。
## Run
```bash
python3 "$(dirname "$0")"/sync.py # real run
python3 .../sync.py --dry-run # preview, no writes
python3 .../verify.py # vault integrity check, run after sync
```
`verify.py` checks: attachment extensions Obsidian can render, missing
embeds, broken wikilinks/block refs, leftover placeholders, duplicate
heptabase_ids, and state.json consistency. Expect `CLEAN`.
NOTE: the vault path comes from config `obsidian.vault`. If it lives in
iCloud Drive, run OUTSIDE the sandbox (the terminal needs Full Disk Access).
## What it does
- **Collections** are config-driven: every `heptabase.collections.<key>`
entry with a filled `tag_id` becomes one collection, mirrored into
`obsidian.folders.<key>` (default: capitalized key). Optional `filter`
narrows by property (e.g. papers → Source Type=alphaXiv). Typical set:
papers → `Papers/`, overviews → `Overviews/`, projects → `Projects/`.
Entries without a `tag_id` (or with a `<placeholder>`) are skipped —
they may exist as m