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 skills add tonydzi/second-brain-starter-kit --skill local-chatgpt-token-healgit 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/local-chatgpt-token-heal)<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/local-chatgpt-token-heal"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/local-chatgpt-token-heal/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/local-chatgpt-token-heal"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/local-chatgpt-token-heal.svg" alt="Reviewed on agentmods" width="80" 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.00076 | $0.01493 |
| Opus 5.5 | $0.00030 | $0.00597 |
| Sonnet 5.5 | $0.00015 | $0.00299 |
| Haiku 4.5 | $0.00008 | $0.00149 |
Grade A, and why
local-chatgpt-token-heal scanned grade A with 1 finding 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 6d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
⚠️ GRABLI: a bare `curl -H "User-Agent: Mozilla/5.0"` to `/backend-api/...` returns **403 for BOTH dead AND live tokens** — Cloudflare bot-blocks the curl UA before the auth layer. That curl is a USELESS token test. The How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OBJECTIVE: Get the ChatGPT nightly sync back to exit=0 by refreshing the dead bearer token — the correct, root-cause way (session cookie → fresh bearer), falling back to Chrome only when the cookie itself has died.
The root cause (why this skill exists)
The secrets\bearer.txt accessToken expires every ~5-9 days — that is OpenAI's design, there is no refresh-token for it. BUT the login session cookie (__Secure-next-auth.session-token, stored in secrets\session_token.txt) lives ~3 months and chatgpt.com/api/auth/session mints a fresh bearer from it on every call. So the fix is deterministic: cookie → new bearer, no browser, no LLM. The cookie also silently rotates (NextAuth rolling sessions) and token_heal.py captures the rotated one, so routine use keeps the cookie fresh indefinitely.
⚠️ GRABLI: a bare curl -H "User-Agent: Mozilla/5.0" to /backend-api/... returns 403 for BOTH dead AND live tokens — Cloudflare bot-blocks the curl UA before the auth layer. That curl is a USELESS token test. The authoritative check is token_heal.py --verify-only (urllib + full browser headers, reaches the real auth layer → 200/401).
LAYERS (do them in order, stop at the first that reaches exit=0)
L1 — deterministic re-mint (default; no browser, no LLM)
python "%IMPORTS_ROOT%\chatgpt\token_heal.py" # PowerShell: use %IMPORTS%\chatgpt\token_heal.py
- exit 0 → fresh bearer written + VERIFIED (HTTP 200), cookie rotated if server rotated it. DONE — go to "Finish".
- exit 5 → session cookie dead/absent → do L2.
- exit 6 → transient network/Cloudflare → wait a few min, retry L1 once; still 6 → note it and stop (not a token problem).
Note: nightly_sync.py already calls L1 automatically on pull exit 7 and retries the pull. So most of the time you never run this by hand — this skill is for when L1 itself returns 5 (cookie dead) and a human-in-the-loop Chrome step is needed, or when Anton runs /chatgpt-token-heal directly.
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.
- 6d ago Changed 083179f6ee98
- 19d ago Changed · -1 lines ee966814351d
- 23d ago Changed · +18 lines · -117 tokens per session f94a6bbb1bff
- 25d ago Changed 388fbdd7623b
- 1mo ago Changed · -20 lines · +117 tokens per session 6fb131f4e07c
- 1mo ago Changed · +2 lines · -18 tokens per session 5b7eaa4200a3
- 1mo ago First seen · 69 lines · 94 tokens per session scan A d367229d845f
local-chatgpt-token-heal is a skill published in the GitHub repository tonydzi/second-brain-starter-kit (12 stars, last pushed yesterday), licensed MIT. It adds 76 tokens to every session and 1,493 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
wiki-lint
Run a deterministic, read-only health check on an Obsidian wiki. Use for lint, vault health check, audit wiki health, find orphans, find dead links, frontmatter audit, provenance audit, or wiki audit. Reports graph, link, frontmatter, provenance-ledger, empty-section, and stale-index findings; it does not reason…
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…
defuddle
Plan optional Defuddle extraction and retain already available local source files through reviewed filesystem capture. Use for defuddle, clean this URL, strip page clutter, readable Markdown from a web page, or preparing a web source for later wiki ingestion. Network extraction remains unavailable until an enforcing…
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.…
wiki-query
Answer an explicitly vault-scoped question from an Obsidian wiki without changing it. Use when the user selects the vault as the evidence source: query the wiki, query quick, query deep, explain from the wiki, summarize the vault, find in wiki, search the wiki, or based on the wiki. Do not route ordinary…
wiki
Initialize, adopt, and route work for a separate Obsidian knowledge vault through the portable claude-obsidian core. Use for vault setup, scaffolding, workspace selection, cross-project configuration, or choosing the correct wiki sub-skill. Triggers: /wiki, set up wiki, scaffold vault, create knowledge base, adopt…