Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
starchild-ai-agent avatar

Chatgpt Codex Onboarding

  • 2.4k installs
  • 18 repo stars
  • Updated July 27, 2026
  • starchild-ai-agent/official-skills

chatgpt-codex-onboarding connects ChatGPT OAuth so openai-codex models are available in the agent runtime.

About

ChatGPT Codex Onboarding connects a ChatGPT subscription to the agent runtime through OAuth device-code flow so openai-codex models appear in the model picker. The flow starts only on explicit user request, returns a verification URL and separate user_code that must never be combined, then waits for user confirmation before polling. After connection, tell the user to refresh the browser because the frontend caches model lists and will not auto-update. Available models include openai-codex/gpt-5-codex, gpt-5, and gpt-5-mini, switched via slash model or the picker. Tokens auto-refresh via refresh_token; on 401 try refresh then logout and restart. API helpers cover start, poll, logout, refresh, models, and usage with ok true or ok false responses. Subsequent calls hit OpenAI directly using the OAuth token, bypassing the platform proxy with subscription limits applying.

  • Device-code OAuth starts only on explicit user request, not for BYOK keys.
  • Never paste user_code into the verification URL; they are separate steps.
  • Wait for user confirmation between start and poll to avoid stale pending responses.
  • After connect, instruct a browser refresh so openai-codex models appear in picker.
  • Tokens auto-refresh; on persistent 401 run refresh then logout and restart flow.

Chatgpt Codex Onboarding by the numbers

  • 2,356 all-time installs (skills.sh)
  • +58 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #346 of 16,659 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

chatgpt-codex-onboarding capabilities & compatibility

Capabilities
device code oauth start and poll · token refresh and logout handling · model and usage listing helpers · post connect browser refresh guidance · subscription direct openai routing
Works with
openai
Use cases
orchestration · api development
Runs
Local or remote
Pricing
Paid
npx skills add https://github.com/starchild-ai-agent/official-skills --skill chatgpt-codex-onboarding

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2.4k
repo stars18
Security audit2 / 3 scanners passed
Last updatedJuly 27, 2026
Repositorystarchild-ai-agent/official-skills

How do I use my ChatGPT subscription models instead of API keys in this agent?

Connect ChatGPT subscription OAuth to expose openai-codex models with device-code flow, polling, and token refresh.

Who is it for?

Users with ChatGPT subscriptions who want Codex models in the agent picker.

Skip if: Skip when the user already has an OpenAI API key and wants BYOK setup.

When should I use this skill?

User wants ChatGPT or Codex subscription models via OAuth connect flow.

What you get

OAuth-connected session with openai-codex models visible after browser refresh.

  • OAuth-authenticated session
  • Configured gpt-5 model access

By the numbers

  • Skill version 2.0.2 with script-mode delivery
  • Enables 3 subscription models: gpt-5-codex, gpt-5, and gpt-5-mini

Files

SKILL.mdMarkdownGitHub ↗

🔐 ChatGPT / Codex OAuth Onboarding

Use the user's existing ChatGPT or Codex subscription for gpt-5-codex, gpt-5, gpt-5-mini access — without an API key.

This is a script-mode skill — no tools registered. Read this file, then call the exports from a bash block.

See also

  • byok-custom-model skill — for vendor-key BYOK setup (DIFFERENT mechanism, NOT OAuth)
  • config/context/references/model-onboarding.md — overall model-selection landscape

---

When to use this skill

Use when the user EXPLICITLY says one of:

  • "Sign in with my ChatGPT account"
  • "Use my Codex subscription"
  • "Connect my ChatGPT Plus / Pro / Team / Enterprise"
  • "Login with OpenAI / ChatGPT"

Do NOT use for:

  • BYOK / API-key-based setup ("Add OpenAI API key", "I have an OpenAI key")
  • Other vendors that sound similar (Anthropic, Gemini, Qwen, etc.) → use byok-custom-model
  • "Add the OpenAI model" without subscription context — ASK first whether they want OAuth (subscription) or BYOK (API key)

⚠️ Vendor names that sound similar (Codex, OpenAI, GPT) are NOT a signal to start OAuth on their own. Only an explicit user mention of "subscription / sign in / login with ChatGPT" qualifies.

---

Onboarding flow

1. status — check if a credential already exists (resume vs fresh). 2. start — get a verification URL + user code from OpenAI; persisted to disk. 3. Tell the user: open the URL in a browser, log in to their ChatGPT / Codex account, and enter the code. Do NOT auto-poll. 4. Wait for the user to confirm they approved the device. 5. poll — finalize the OAuth handshake; on success, the new model becomes available.

If poll returns status='pending', the user hasn't finished yet — wait for them, then poll again. Don't loop poll automatically.

---

Script usage

python3 - <<'EOF'
import sys, json
sys.path.insert(0, "/data/workspace/skills/chatgpt-codex-onboarding")
from exports import status, start, poll, logout, refresh, models, usage

# Check current state
print(json.dumps(status(), indent=2))

# Start a flow
result = start()
print(f"Open: {result['verification_url']}\nCode: {result['user_code']}")
EOF

After the user approves:

python3 - <<'EOF'
import sys, json
sys.path.insert(0, "/data/workspace/skills/chatgpt-codex-onboarding")
from exports import poll
print(json.dumps(poll(), indent=2))
EOF

---

Functions

FunctionRequired argsPurpose
status()Inspect current OAuth state, expiry, model list
start()Begin device-code flow → verification_url + user_code
poll(pending_id=None)Check authorization (call after user confirms approval)
logout()Disconnect + remove credentials
refresh()Force-refresh access token (debug; normally automatic)
models(force=False)List available models from the OAuth endpoint
usage(force=False)Subscription usage stats

force=True on models / usage bypasses the cache TTL.

All functions return a dict with ok: True on success or ok: False, error: "..." on failure.

---

After connecting

When poll() returns status='connected', the first thing you must do is tell the user:

"Connection successful. Please refresh your browser page — once it reloads, the new openai-codex/* models will appear in the model picker."

The web frontend caches the model list client-side and does not auto-refresh after an OAuth connect completes. Without a manual page refresh the user will not see their newly available models and will think the connection failed. Always include this instruction in your reply — do not assume the picker updates on its own.

Models appear with the openai-codex/ prefix:

  • openai-codex/gpt-5-codex — primary
  • openai-codex/gpt-5 — full GPT-5
  • openai-codex/gpt-5-mini — smaller / faster

After refresh, the user switches via /model openai-codex/gpt-5-codex or the model picker UI.

Subsequent calls hit OpenAI directly using the OAuth token — bypasses the platform proxy. Subscription usage limits apply (not the platform's credit balance).

---

Reauth

Tokens auto-refresh via refresh_token. If a 401 surfaces: 1. refresh() — try the manual refresh path. 2. If still failing, logout() + restart from start().

---

Critical rules

  • Never paste user_code in the verification_url. They're separate — user must enter the code manually after opening the URL.
  • Never start the flow without explicit user request. "I want to use ChatGPT" is enough; "I have an OpenAI key" is NOT (that's BYOK).
  • Wait for user confirmation between `start` and `poll`. Auto-polling wastes API calls and gives stale "pending" responses.

Related skills

FAQ

Why must the user refresh after connecting?

The web frontend caches the model list and does not auto-refresh after OAuth completes.

Can I auto-poll right after start?

No. Wait for user confirmation between start and poll to avoid wasted stale calls.

What models appear after connect?

openai-codex/gpt-5-codex, gpt-5, and gpt-5-mini with the openai-codex prefix.

Is Chatgpt Codex Onboarding safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.