← ClaudeAtlas

chatgpt-synclisted

Pull fresh ChatGPT conversations into an Obsidian vault on demand, the manual twin of the nightly job. Incremental and idempotent by conversation id: never clobbers enriched notes, never duplicates. Triggers: "/chatgpt-sync", "pull chatgpt", "sync chatgpt chats".
tonydzi/second-brain-starter-kit · ★ 6 · AI & Automation · score 78
Install: claude install-skill tonydzi/second-brain-starter-kit
OBJECTIVE: Pull ChatGPT conversations updated since the vault's newest note and fold them into the Obsidian vault (notes + MOC + SQLite), on demand. Idempotent. IDENTICAL pipeline to the scheduled `ChatGPT Nightly Sync`; the only difference is this fires when the operator asks. CONTEXT (canon: memory [[chatgpt-export-pipeline]]): - ChatGPT chats are NOT on disk - pulled via `/backend-api` with a bearer token in `$IMPORTS_ROOT/chatgpt/secrets/bearer.txt`. The cookie/bearer lives ~1-2 weeks; there is NO refresh-token, so it must be hand-refreshed periodically (this is why the flow is semi-auto, not a blind cron). - ⚠️ GRABLI: the detail endpoint `/conversation/{id}` 403s with the bearer alone - `incremental_pull.py` already sends the required headers (`OAI-Device-Id`, `oai-language`, Referer/Origin). The LIST endpoint works without them. - Single source of truth = `$IMPORTS_ROOT/chatgpt/nightly_sync.py` - it chains: vault_backup (pre) -> incremental_pull.py CUTOFF -> chatgpt_export_to_vault.py --zip -> copy staging->vault (NEVER overwrites a concept-enriched note, only `related_concepts: []`) -> build_chatgpt_moc.py -> vault_backup (post). CUTOFF = newest vault note date - 1 day (so a missed day leaves no gap). - Vault home: `$OBSIDIAN_VAULT/01-Conversations/ChatGPT/conversations/` + `_ChatGPT-MOC.md`. SQLite: `_imports\chatgpt\chatgpt_conversations.db`. Freshness heartbeat: `_imports\chatgpt\_freshness.json`. STEPS: 1. Run the orchestrator (it does backup + pull + fold + MOC