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.

Install it, pinned
mdr add tonydzi/second-brain-starter-kit/local-chatgpt-token-heal@git:20261007.cd6c208

Pins 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

The exact contents, by fingerprint
mdr add tonydzi/second-brain-starter-kit/local-chatgpt-token-heal@sha256:ee966814351d43cc

The 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.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_th37klvny2x2jxis.svg)](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.

versioncommittedcommitsizeaudit
git:20261007.cd6c208 latest2026-10-07 cd6c208 5,564 BA view · diff
git:20261003.a2d662f2026-10-03 a2d662f 5,565 BA view · diff
git:20261002.03947292026-10-02 0394729 4,840 BA view · diff
git:20260924.2784cb22026-09-24 2784cb2 4,839 BA view · diff
git:20260908.2ec1bf82026-09-08 2ec1bf8 5,570 BA view · diff
git:20260814.06fa9062026-08-14 06fa906 5,214 BA view · diff
git:20260814.5023d8c2026-08-14 5023d8c 4,519 BA view · diff
git:20260814.44e61cf2026-08-14 44e61cf 4,839 BA view · diff
git:20260728.d9691dd2026-07-28 d9691dd 4,826 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • 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

GitHub

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.

More from tonydzi/second-brain-starter-kit

AGENTS.md AGENTS.md file
tonydzi/second-brain-starter-kit · AGENTS.md
git:20261102.ff0d04f · audit A · 14 stars
lite-check SKILL.md skill
tonydzi/second-brain-starter-kit · lite/.claude/skills/lite-check/SKILL.md · Сверить полученный результат с исходными данными и требованием владельца.
git:20261014.d737024 · audit A · 14 stars
lite-handoff SKILL.md skill
tonydzi/second-brain-starter-kit · lite/.claude/skills/lite-handoff/SKILL.md · Оставить короткую записку, чтобы следующий чат продолжил выбранную задачу.
git:20261014.d737024 · audit A · 14 stars
lite-plan SKILL.md skill
tonydzi/second-brain-starter-kit · lite/.claude/skills/lite-plan/SKILL.md · Составить короткий план выбранной владельцем задачи с понятным результатом.
git:20261014.d737024 · audit A · 14 stars
lite-recall SKILL.md skill
tonydzi/second-brain-starter-kit · lite/.claude/skills/lite-recall/SKILL.md · Найти прошлое решение по теме в выбранных владельцем файлах.
git:20261014.d737024 · audit A · 14 stars
llms.txt llms.txt file
tonydzi/second-brain-starter-kit · llms.txt
git:20261020.9b15f93 · audit A · 14 stars
03 SKILL.md skill
tonydzi/second-brain-starter-kit · skills/03/SKILL.md · Run an autonomous consensus round between agent peers on several machines: they negotiate a decision over a shared…
git:20261020.402f6b7 · audit A · 14 stars
1 SKILL.md skill
tonydzi/second-brain-starter-kit · skills/1/SKILL.md · Recover a session after a hard crash (app died, machine rebooted, context lost mid-work): replay the turn-state ledger…
git:20261020.402f6b7 · audit A · 14 stars
agenda SKILL.md skill
tonydzi/second-brain-starter-kit · skills/agenda/SKILL.md · Show the operator's day: today's calendar plus what needs them personally (leads due, people awaiting a reply…
git:20261020.402f6b7 · audit A · 14 stars
ai-slop SKILL.md skill
tonydzi/second-brain-starter-kit · skills/ai-slop/SKILL.md · Rewrite machine-written text so it reads like a busy human wrote it: cut 50-70%, break the even rhythm, drop AI-tell…
v1.0.0 · audit A · 14 stars
alfa-search-recall-deepresearch SKILL.md skill
tonydzi/second-brain-starter-kit · skills/alfa-search-recall-deepresearch/SKILL.md · Decision protocol for strategic work: recall the knowledge vault, run a gap analysis, emit a deep-research prompt for…
git:20261020.402f6b7 · audit A · 14 stars
alpha-credit SKILL.md skill
tonydzi/second-brain-starter-kit · skills/alpha-credit/SKILL.md · - КРЕДИТ АВТОРУ ИДЕИ: совет из комментария (TG @ClawRus / @ClawInga, комменты под постами Антона в FB, треды и issue…
v1.0.0 · audit A · 14 stars

Every file in tonydzi/second-brain-starter-kit

Browse by kind, by grade A, or by owner.