CodexBar is a macOS menu bar app that displays usage limits, balances, costs, and reset times for AI coding and related service providers. It is for people who use services such as Codex, Claude Code, Cursor, Gemini, Copilot, or other supported providers and need to monitor their accounts. The catalogue add-ons extend its agent-related workflow.
Borrowing it
Nothing to install: this file belongs to steipete/CodexBar. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/steipete/CodexBar/main/AGENTS.mdgit clone --depth 1 https://github.com/steipete/CodexBarWrote 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.
[](https://agentmods.dev/instructions/steipete/codexbar/agents-md)<a href="https://agentmods.dev/instructions/steipete/codexbar/agents-md"><img src="https://agentmods.dev/badge/instructions/steipete/codexbar/agents-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.
<a href="https://agentmods.dev/instructions/steipete/codexbar/agents-md"><img src="https://agentmods.dev/badge/instructions/steipete/codexbar/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01768 | $0.01768 |
| Opus 5.5 | $0.00707 | $0.00707 |
| Sonnet 5.5 | $0.00354 | $0.00354 |
| Haiku 4.5 | $0.00177 | $0.00177 |
Grade A, and why
CodexBar AGENTS.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 10d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Repository Guidelines
Project Structure & Modules
Sources/CodexBar: Swift 6 menu bar app (usage/credits probes, icon renderer, settings). Keep changes small and reuse existing helpers.Tests/CodexBarTests: XCTest coverage for usage parsing, status probes, icon patterns; mirror new logic with focused tests.Scripts: build/package helpers (package_app.sh,sign-and-notarize.sh,build_icon.sh,compile_and_run.sh). Read-only release helpers callScripts/mac-release, which resolvesMAC_RELEASE_TOOLor the sharedagent-scriptscheckout; CI owns publication.docs: release notes and process (docs/RELEASING.md, screenshots). Root-level zips/appcast are generated artifacts—avoid editing except during releases.
Build, Test, Run
- Dev loop:
./Scripts/compile_and_run.shkills old instances, builds, packages, relaunchesCodexBar.app, and confirms it stays running; add--testfor the sharded full suite. - Quick build/test:
swift build(debug) orswift build -c release;make testfor the sharded full suite. - Package locally:
./Scripts/package_app.shto refreshCodexBar.app, then restart withpkill -x CodexBar || pkill -f CodexBar.app || true; cd /Users/steipete/Projects/codexbar && open -n /Users/steipete/Projects/codexbar/CodexBar.app. - Release publication is owned by
.github/workflows/release.yml; use its default dry-run dispatch to rehearse. Repo build/signing stays inScripts/sign-and-notarize.sh; seedocs/RELEASING.md.
Coding Style & Naming
- Enforce SwiftFormat/SwiftLint: run
swiftformat Sources Testsandswiftlint --strict. 4-space indent, 120-char lines, explicitselfis intentional—do not remove. - Favor small, typed structs/enums; maintain existing
MARKorganization. Use descriptive symbols; match current commit tone.
Testing Guidelines
- Add/extend XCTest cases under
Tests/CodexBarTests/*Tests.swift(FeatureNameTestswithtest_caseDescriptionmethods). - Swift Testing: prefer backticked sentence names; no camelCase.
- Model names in tests/code: released models or clearly fictitious names only; never expose unreleased names.
- Iterate with focused runs (
make test-fast FILTER='SuiteName'orswift test --filter ...) covering the touched suites. For a local full run use./Scripts/test.sh --direct-workers 8(parallel isolated groups, ~10 min) instead of serialmake test(~45 min). The full suite is not a handoff gate: run it in the background or leave it to PR CI; never block on it in the foreground. - While iterating, format/lint only touched files; run
make checkonce before commit/handoff and fix reported issues. - Prefer CLI/focused tests over app-bundle live tests when behavior can be verified without relaunching CodexBar.
- Never run tests/checks or ad-hoc validation that can display macOS Keychain prompts. Live provider probes, browser-cookie imports,
codexbar usageagainst real accounts, and real SecItem reads must be explicitly requested; otherwise use parser tests, stubs, test stores, orKeychainNoUIQuery. - App-group migration tests must inject dictionary-backed defaults, both snapshot URLs, a synthetic home, and a contained recording FileManager. UUID defaults suites and Keychain isolation flags do not isolate defaults search domains or filesystem access. Ordinary SettingsStore tests must not discover shared defaults or run app-group migration.
- macOS CI is brittle around headless AppKit status/menu tests. Prefer covering menu behavior through stable state/model seams (
MenuDescriptor,ProvidersPane,CodexAccountsSectionState, etc.) instead of constructing liveNSStatusBar/NSMenuflows unless the AppKit wiring itself is the thing under test.
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.
- 10d ago Changed · -42 tokens per session e3c84abcdfd9
- 13d ago Changed · +160 tokens per session 5eeaaab67e25
- 16d ago Changed · +5 lines · +142 tokens per session 87f2dc7f290d
- 1mo ago Changed · +1 lines · +59 tokens per session ef167d0aee10
- 1mo ago First seen · 49 lines · 1,449 tokens per session scan A 61c870bb0b15
CodexBar AGENTS.md is an instructions file published in the GitHub repository steipete/CodexBar (22,829 stars, last pushed today), licensed MIT. It adds 1,768 tokens to every session, about $0.0071 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-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.