Agent skill · software engineering · sundial-org

codex-account-switcher

Manage multiple OpenAI Codex accounts. Capture current login tokens and switch between them instantly.

Why this skill is useful

Adds a Python script that automates account management for OpenAI Codex, enabling seamless switching and quota checking that the AI cannot generate on its own.

What it needs

Requires python3 installed locally. Requires openai account access. About 1k tokens when loaded. Last updated 2026-03-07. 639 stars on the source repository.

What this skill does

Codex Account Switcher Manage multiple OpenAI Codex identities (e.g. personal vs. work) by swapping the authentication token file. Usage 1. List Accounts Show saved accounts (active one is marked with ACTIVE on the right). Default output is compact. --verbose includes refresh age + token TTL (debug) --json outputs the verbose info as JSON To include emails/diagnostics: 2. Add an Account Interactive wizard to capture login(s). Always starts a fresh browser login (codex logout && codex login) so you explicitly choose the identity to capture. After each login it saves a snapshot. In an interactive terminal it asks if you want to add another. When invoked non-interactively (e.g. via Clawdbot), it runs single-shot (no "add another" prompt). When naming an account, press Enter to accept the default name (local-part of the detected email, e.g. oliver from oliver@…). 3. Switch Account Instantly swap the active login. 4. Auto-Switch to Best Quota Check all accounts and switch to the one with most weekly quota available. Output: How It Works Stores auth.json files in ~/.codex/accounts/<name>.json. Identifies accounts by decoding the JWT idtoken to find the email address. "Switching" simply overwrites ~/.codex/auth.json with the saved copy. Installation Add the script to your path for easy access:

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills sundial-org/codex-account-switcher

View the source on GitHub

Browse the @skills marketplace