local-chatgpt-token-heal SKILL.md skillA
local-chatgpt-token-heal from tonydzi/second-brain-starter-kit is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add tonydzi/second-brain-starter-kit/local-chatgpt-token-heal@git:20261007.cd6c208Pins git:20261007.cd6c208 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- tonydzi/second-brain-starter-kit
- Path
skills/local-chatgpt-token-heal/SKILL.md- Versions recorded
- 9
- Latest version
- git:20261007.cd6c208, committed Oct 7, 2026
- First version recorded
- Jul 28, 2026
- Size
- 5,564 bytes
- Repository stars
- 14
- License
- MIT
Re-mint a ChatGPT bearer token when a nightly sync exits with a token-expired code: the session cookie lives for months and deterministically produces a fresh bearer, with no LLM and no browser. Triggers: "/chatgpt-token-heal", "chatgpt token dead", or the sync failing on that error.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
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). …
Read the whole file at its exact version.
How to install
mdr add tonydzi/second-brain-starter-kit/local-chatgpt-token-heal@sha256:ee966814351d43ccThe line at the top of this page pins the label git:20261007.cd6c208, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_th37klvny2x2jxis)
5 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 9 versions of this file, between Jul 28, 2026 and Oct 7, 2026, about one every 9 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261007.cd6c208 latest | 2026-10-07 | cd6c208 | 5,564 B | A | view · diff |
| git:20261003.a2d662f | 2026-10-03 | a2d662f | 5,565 B | A | view · diff |
| git:20261002.0394729 | 2026-10-02 | 0394729 | 4,840 B | A | view · diff |
| git:20260924.2784cb2 | 2026-09-24 | 2784cb2 | 4,839 B | A | view · diff |
| git:20260908.2ec1bf8 | 2026-09-08 | 2ec1bf8 | 5,570 B | A | view · diff |
| git:20260814.06fa906 | 2026-08-14 | 06fa906 | 5,214 B | A | view · diff |
| git:20260814.5023d8c | 2026-08-14 | 5023d8c | 4,519 B | A | view · diff |
| git:20260814.44e61cf | 2026-08-14 | 44e61cf | 4,839 B | A | view · diff |
| git:20260728.d9691dd | 2026-07-28 | d9691dd | 4,826 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (5564 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
tonydzi/second-brain-starter-kit · 14 stars · license MIT · pushed 2026-11-06 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_th37klvny2x2jxis GET https://markdownregistry.com/api/v1/resolve?ref=tonydzi/second-brain-starter-kit/local-chatgpt-token-heal GET https://markdownregistry.com/api/v1/blob/ee966814351d43cca7926d3421e14f929d5b8f490fd95e6dc3ef34c19ff1ac13
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.