CodexBar: Instructions file for Codex

AGENTS.md

CodexBar AGENTS.md is an instructions file for Codex, OpenCode from steipete/CodexBar. It costs 1,768 tokens per session, scanned A, original, MIT.

Repository instructions for CodexBar, a Swift menu-bar app that checks AI provider usage, credits, limits, and configuration health. They describe the project layout, build commands, tests, release scripts, and coding conventions.

In plain words
What is it for?
Finding the right source and test files, building the app, running its test suite, packaging it, and following its release process.
Why use it?
They give coding agents the project’s expected workflow so changes fit the existing code and can be tested consistently.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Codex.

This is steipete/CodexBar's own configuration. It tells Codex and OpenCode how to work on CodexBar 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 CodexBar configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/steipete/Projects/codexbar.

About the project

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.

steipete/CodexBar · 22,829 stars · on GitHub · codex.bar

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/steipete/CodexBar/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/steipete/CodexBar

Made for: Codex, OpenCode.

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 CodexBar AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/steipete/codexbar/agents-md/github.svg)](https://agentmods.dev/instructions/steipete/codexbar/agents-md)
Your own site
<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.

agentmods 80×15 button for CodexBar AGENTS.md

Your own site · 80×15
<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>
Per session 1,768 This file is loaded in full into every session.
When invoked 1,768 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.01768 $0.01768
Opus 5.5 $0.00707 $0.00707
Sonnet 5.5 $0.00354 $0.00354
Haiku 4.5 $0.00177 $0.00177

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

Security

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.

AGENTS.md · 55 lines

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 call Scripts/mac-release, which resolves MAC_RELEASE_TOOL or the shared agent-scripts checkout; 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.sh kills old instances, builds, packages, relaunches CodexBar.app, and confirms it stays running; add --test for the sharded full suite.
  • Quick build/test: swift build (debug) or swift build -c release; make test for the sharded full suite.
  • Package locally: ./Scripts/package_app.sh to refresh CodexBar.app, then restart with pkill -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 in Scripts/sign-and-notarize.sh; see docs/RELEASING.md.

Coding Style & Naming

  • Enforce SwiftFormat/SwiftLint: run swiftformat Sources Tests and swiftlint --strict. 4-space indent, 120-char lines, explicit self is intentional—do not remove.
  • Favor small, typed structs/enums; maintain existing MARK organization. Use descriptive symbols; match current commit tone.

Testing Guidelines

  • Add/extend XCTest cases under Tests/CodexBarTests/*Tests.swift (FeatureNameTests with test_caseDescription methods).
  • 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' or swift 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 serial make 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 check once 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 usage against real accounts, and real SecItem reads must be explicitly requested; otherwise use parser tests, stubs, test stores, or KeychainNoUIQuery.
  • 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 live NSStatusBar/NSMenu flows unless the AppKit wiring itself is the thing under test.

Read the full file on GitHub · 55 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. 10d ago Changed · -42 tokens per session e3c84abcdfd9
  2. 13d ago Changed · +160 tokens per session 5eeaaab67e25
  3. 16d ago Changed · +5 lines · +142 tokens per session 87f2dc7f290d
  4. 1mo ago Changed · +1 lines · +59 tokens per session ef167d0aee10
  5. 1mo ago First seen · 49 lines · 1,449 tokens per session scan A 61c870bb0b15

Subscribe to this mod's changes

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.

Related

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

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,786 tokens

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

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

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

microsoft/vscode · 2,731 tokens

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.

denoland/deno · 3,077 tokens