Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/tonydzi/second-brain-starter-kit/chatgpt-syncnpx skills add tonydzi/second-brain-starter-kit --skill chatgpt-syncgit clone --depth 1 https://github.com/tonydzi/second-brain-starter-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/chatgpt-sync)<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/chatgpt-sync"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/chatgpt-sync.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00091 | $0.01603 |
| Opus 5 | $0.00046 | $0.00801 |
| Sonnet 5 | $0.00018 | $0.00321 |
| Haiku 4.5 | $0.00009 | $0.00160 |
Grade A, and why
chatgpt-sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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-apiwith 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.pyalready 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, onlyrelated_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:
- Run the orchestrator (it does backup + pull + fold + MOC + backup itself):
cmd.exe /c "$IMPORTS_ROOT/chatgpt/nightly_sync.cmd"(orpython $IMPORTS_ROOT/chatgpt/nightly_sync.py). Run it foreground; it logs to_imports\chatgpt\_nightly_sync.log. - Read the tail of
$IMPORTS_ROOT/chatgpt/_nightly_sync.logfor the result line(s):copy: +N new, ~M refreshed, K enriched-preservedandnightly_sync DONE: +N new chats. - Interpret the exit code:
- 0 = success (even +0 new is fine - nothing new to pull).
- 7 = PULL FAILED, token dead/expired. nightly_sync.py now self-heals this automatically (calls
token_heal.pyon exit 7 → re-mints the bearer from the long-lived session cookie → retries the pull), so a bare exit 7 in the log usually means the automatic heal ALSO failed. DEFAULT ACTION: run skill/chatgpt-token-heal(root-cause fix: session cookie → fresh bearer, 0 browser, 0 LLM; falls back to Chrome cookie re-harvest only if the cookie itself died). Do NOT hand-do the old Chrome Blob-download dance — that is the fallback the skill handles. ESCALATE to the operator (D-type) ONLY if/chatgpt-token-healreaches L3 (Chrome logged out of chatgpt.com on the hub). - 8 = staging build failed (rare) → report the log tail, do not guess.
- (optional) Reindex for RAG so new notes are searchable now:
python $IMPORTS_ROOT/brain_embed_update.py --wait-gpu 10- OR just rely on the nightly Brain Reindex @04:00 (skip if the GPU is busy with a parallel session). - Report: how many new chats folded, the newest note date, freshness FRESH/STALE (read
_freshness.json), and BROKEN-link status if a validate ran. End with a 🧒 In plain words recap (messages TO the operator only).
CONSTRAINTS:
- ANTI-RECENTS: when hunting for ONE specific chat by hand on chatgpt.com, never conclude "the chat does not exist" from the recents list. Use the built-in SEARCH by keyword + check Projects/archive + confirm the active account by email. The scripted path (
/backend-apiLIST viaincremental_pull.py) pulls ALL chats and is more reliable than eyeballing the page. Canon: memory [[web-ui-search-not-recents]] (incident 2026-07-23). - DON'T duplicate logic - ALWAYS go through
nightly_sync.py; never re-implement the pull/convert here. Ifincremental_pull.pyor the converter needs a change, edit THOSE files (single source), not this skill. - AK-47: this skill is just this SKILL.md (a procedure). No new server/DB/service.
- WINDOWS cp1252: the log may show mojibake for Cyrillic titles - cosmetic only; the vault notes are correct UTF-8. Don't "fix" by re-encoding the notes.
- Token is a secret: never print it, never paste it into a message/vault/always-loaded layer (credential-store anti-leak boundary).
- Backup-before-write is already inside nightly_sync.py (vault_backup pre+post) - don't double-run it.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 56 lines · 91 tokens per session scan A 7d70a306ef8a
chatgpt-sync is a skill published in the GitHub repository tonydzi/second-brain-starter-kit (5 stars, last pushed 6d ago), licensed MIT. It adds 91 tokens to every session and 1,603 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
superbrain-distill
Internal SuperBrain skill — run by the detached capture child to distill a session-event delta into routed Obsidian notes. Not for direct user invocation.
save
Save a user-selected answer, decision, insight, or session summary into an Obsidian vault as one reviewed transaction. Use only when the user explicitly asks to preserve specific conversation content, not when they supply a file or URL to ingest. Triggers: /save, save this, save that answer, file this conversation…
wiki-retrieve
Build and query a vault-local contextual BM25 retrieval index with optional multilingual Nomic cosine reranking; use for retrieve, hybrid retrieval, BM25, rerank, contextual retrieval, chunk search, vault search, semantic search, find relevant passages, or retrieval diagnostics. Derived caches stay under .vault-meta…
obsidian-bases
Explain, draft, and validate Obsidian Bases .base files with filters, formulas, properties, summaries, and table, card, or list views. Use for Obsidian Bases, database-like vault views, dynamic tables, reading lists, task trackers, filters, formulas, summaries, and .base file edits.
wiki-fold
Create a bounded, extractive, structurally idempotent rollup of recent Obsidian wiki log entries, with dry-run preview by default and one optional transaction apply. Use for manual log compression without modifying child pages. Triggers: fold the log, run a fold, run wiki-fold, log rollup, roll up log entries, commit…
wiki-mode
Read or configure the vault filing methodology and suggest destinations for planned knowledge creation under Generic, LYT, PARA, or Zettelkasten. Use for wiki mode, methodology mode, what is my vault mode, set vault mode, switch to PARA, use LYT, Zettelkasten setup, change mode, configure mode, or methodology routing.…