codex-buddy: Instructions file for Claude Code

CLAUDE.md

codex-buddy CLAUDE.md is an instructions file for Claude Code from CodePrometheus/codex-buddy. It costs 1,539 tokens per session, scanned A, original, MIT.

Project instructions for codex-buddy, a macOS command-line and menu-bar tool for running Codex with different accounts. It keeps each account’s credentials and session data separate while switching the active account through links.

In plain words
What is it for?
Use it when changing account switching, parallel runs, Codex configuration directories, authentication files, session history, or the command-line and menu-bar parts.
Why use it?
It documents the account-isolation rules and shared source of truth, helping changes avoid stale credentials or duplicated logic between Rust and Swift.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions Claude Code; reads ~/.codex paths.

This is CodePrometheus/codex-buddy's own configuration. It tells Claude Code how to work on codex-buddy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything codex-buddy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to CodePrometheus/codex-buddy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/CodePrometheus/codex-buddy/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/CodePrometheus/codex-buddy

Made for: Claude Code.

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

agentmods badge for codex-buddy CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/codeprometheus/codex-buddy/claude-md/github.svg)](https://agentmods.dev/instructions/codeprometheus/codex-buddy/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/codeprometheus/codex-buddy/claude-md"><img src="https://agentmods.dev/badge/instructions/codeprometheus/codex-buddy/claude-md/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.

agentmods 80×15 button for codex-buddy CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/codeprometheus/codex-buddy/claude-md"><img src="https://agentmods.dev/badge/instructions/codeprometheus/codex-buddy/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,539 This file is loaded in full into every session.
When invoked 1,539 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01539 $0.01539
Opus 5.5 $0.00616 $0.00616
Sonnet 5.5 $0.00308 $0.00308
Haiku 4.5 $0.00154 $0.00154

Measured yesterday against content hash 8a22b90c0263, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codex-buddy CLAUDE.md scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

codex-buddy

A macOS CLI to switch between and run Codex CLI accounts in parallel; codex-buddy claude ... also runs several Claude Code accounts side by side. Logic lives in crates/core; crates/cli is a thin shell. apps/tray is a SwiftUI menu-bar app (work in progress) that reuses core through crates/ffi's uniffi bindings — same invariants, same source of truth, no logic duplicated into Swift.

How it works (the invariant everything rests on)

Each account keeps one real auth.json in ~/.codex-buddy/<alias>/. ~/.codex/auth.json is a symlink to the active account's file. Switching only repoints that symlink; auth files are never copied. This sidesteps OAuth refresh-token rotation: a credential exists as exactly one file, refreshed in place, so there is never a stale copy that would force a re-login.

  • Switched (per account; ~/.codex/<entry> symlinks to the active account's copy): auth.json, sessions/, history.jsonl.
  • Isolated (per account, never shared or linked): all sqlite (sqlite/ dir, *.sqlite*).
  • Shared (symlinked back to ~/.codex): everything else — config.toml, AGENTS.md, rules, ...
  • Parallel = run codex with CODEX_HOME=<account dir>; switch = repoint the switched symlinks.

Hard requirement: codex's cli_auth_credentials_store must be file (keyring / auto / ephemeral move or delete auth.json and break the scheme). config_check enforces this.

Claude Code accounts (core::claude)

Claude Code keeps its login in the macOS Keychain, keyed to the literal CLAUDE_CONFIG_DIR path (Claude Code >= 2.1.144), so nothing can be repointed: Claude accounts run in parallel only.

  • default is ~/.claude + ~/.claude.json, plain claude; codex-buddy never modifies its login. Managed accounts live in ~/.codex-buddy/.claude/<dir>/ (the dot keeps them clear of codex aliases), launched with that dir as both CLAUDE_CONFIG_DIR and CLAUDE_SECURESTORAGE_CONFIG_DIR, with env vars that bypass account login scrubbed.
  • Claude Code owns login, refresh, and the Keychain; codex-buddy never reads or copies credentials. The dir never moves (rename changes only the alias) — moving it would orphan the login.
  • Shared: only the SHARED_ENTRIES allowlist (user config plus conversation history), symlinked to ~/.claude; everything else stays per-account, so state a future Claude Code adds defaults to isolated. User-scope mcpServers are mirrored one way from ~/.claude.json, written under claude's own .claude.json.lock.
  • Usage is the cachedUsageUtilization claude writes into each account's .claude.json.

Read the full file on GitHub · 92 lines

Changes

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.

  1. yesterday Changed · +19 lines · +365 tokens per session 8a22b90c0263
  2. 2mo ago First seen · 73 lines · 1,174 tokens per session scan A f28c21539d2a

Subscribe to this mod's changes

codex-buddy CLAUDE.md is an instructions file published in the GitHub repository CodePrometheus/codex-buddy (2 stars, last pushed 2d ago), licensed MIT. It adds 1,539 tokens to every session, about $0.0062 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

codex-buddy CLAUDE.md compared with instructions from other repositories

codex-buddy CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-buddy CLAUDE.mdCodePrometheus/codex-buddyInstructions file22d agoMITA1,539Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode