cc-bar: Instructions file for Codex

AGENTS.md

cc-bar AGENTS.md is an instructions file for Codex, OpenCode from nanvon/cc-bar. It costs 3,345 tokens per session, scanned B, original, MIT.

A set of project instructions for cc-bar, a native macOS menu-bar app that shows Codex and Claude Code usage and account status.

In plain words
What is it for?
Use it when working on cc-bar code, documentation, settings, credentials, usage tracking, menus, windows, or onboarding.
Why use it?
It gives agents the project’s structure, documentation requirements, collaboration rules, and limits on safe changes.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to nanvon/cc-bar. 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/nanvon/cc-bar/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/nanvon/cc-bar

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 cc-bar AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nanvon/cc-bar/agents-md/github.svg)](https://agentmods.dev/instructions/nanvon/cc-bar/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/nanvon/cc-bar/agents-md"><img src="https://agentmods.dev/badge/instructions/nanvon/cc-bar/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 cc-bar AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/nanvon/cc-bar/agents-md"><img src="https://agentmods.dev/badge/instructions/nanvon/cc-bar/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,345 This file is loaded in full into every session.
When invoked 3,345 The same file — it is already loaded in full.
Security scan B 1 finding. 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.03345 $0.03345
Opus 5.5 $0.01338 $0.01338
Sonnet 5.5 $0.00669 $0.00669
Haiku 4.5 $0.00334 $0.00334

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

Security

Grade B, and why

cc-bar AGENTS.md scanned grade B with 1 finding 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 8d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- 首次需要把命令行工具指向完整 Xcode(一次性):`sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`。
AGENTS.md · 126 lines

How it starts

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

cc-bar Agent Guide

本文件同时给 Claude Code 和 Codex 使用。AGENTS.md 应作为指向本文件的软链接,避免两份规则不一致。

项目概况

cc-bar 是一个原生 macOS 菜单栏 App,用 Swift / SwiftUI 实现。

  • 额度 Provider(QuotaApp):Codex、Claude Code、Antigravity、Cursor、Command Code、OpenCode Go,外加用户手动导入的其他 Codex 账号。
  • 本地用量数据源(UsageApp):Codex、Claude Code、Antigravity、Pi、OpenCode、DSH 走本机日志扫描,Cursor 走远端计量。
  • 展示位:菜单栏标签、Popover、主窗口(统计 / 设置)、桌面悬浮窗、首次启动引导。

项目主体功能已开发完成,后续以新需求和迭代为主,不再按初始里程碑推进。

工程结构:

  • 入口:CCBarApp.swift
  • 全局状态:Core/AppState.swift
  • 菜单栏:MenuBar/
  • 主窗口:Main/
  • 悬浮窗:Floating/
  • 引导:Onboarding/
  • 设置:Settings/
  • 凭据 / 额度 / 调度 / 用量 / 定价 / 存储 / 本地化:Core/(Credentials Quota Scheduler Usage Pricing Storage、L10n.swift)
  • Xcode 工程:ccbar.xcodeproj

必读文档

改动前优先阅读相关文档和现有实现。文档索引见 docs/README.md,常用入口:

  • docs/产品需求.md:产品形态、功能范围、边界
  • docs/技术实现.md:架构、模块、关键流程、并发与持久化
  • docs/设计风格.md:视觉规范、颜色、字体、状态色、组件尺寸、界面文案规则、双语词表
  • docs/界面布局.md:菜单栏、Popover、主窗口、悬浮窗、设置、引导的逐界面尺寸与字段
  • docs/打包发布.md:scripts/build.sh 与 GitHub Actions 发布流程、Developer ID 公证归档
  • docs/历史用量数据补录指南.md:Claude 日志被自动清理后如何补录历史用量(一次性操作手册)

docs/ 下的 草案-*.md 是各功能的设计方案,落地状态见 docs/README.md 的草案表。

草案是最初的实现方案,不约束后续需求。草案里的「第一版不做」「不增加」,以及常驻文档里记录的现状和取舍,都是当时的决定,不是禁令。用户提出的新需求与之冲突时,按新需求实现,并同步修改相关文档;不要以文档已有约定为由拒绝或推迟改动。

不要参考 docs/Screenshots/ 里的截图。 截图有时效性,可能落后于当前界面(例如统计页截图仍是旧版)。界面样式和布局以当前代码、设计风格.md、界面布局.md 为准。

历史参考(已归档)位于 docs/历史参考/,含 实施里程碑.md、设计稿/、外部项目分析/。新需求不受里程碑顺序约束;需要对照外部项目行为时,优先看 外部项目分析/ 已整理的笔记。

协作规则

  • 未经明确要求“修改、实现、修复”等,不要擅自改代码。默认先分析、定位问题、给方案和风险。
  • 如果需求、边界、验收标准或影响范围不明确,并且会影响实现或引入风险,先确认。
  • 对大型项目,不要主动运行 build、lint、type-check、test、dev 等耗时或大量输出命令。确实需要时,先说明原因并询问。
  • 修改前先读现有实现、项目规则、公共组件、公共规范和相关文档。
  • 涉及功能、交互、数据结构、接口或配置行为变更时,必须同步更新相关文档;若判断无需更新文档,需要在回复里说明原因。
  • 遵循当前项目风格,不做无关重构。
  • 只改和当前任务直接相关的文件。不要顺手整理无关代码、格式或项目结构。
  • 工作区可能已有用户改动。不要回滚、覆盖或清理非本次任务产生的改动。

实现约束

  • UI 优先使用 SwiftUI / AppKit 系统默认控件和 macOS 原生风格。
  • 视觉规则以 docs/设计风格.md 为准:
    • Codex 使用石墨灰识别色,Claude Code 使用桃橙识别色;识别色仅用于 tile / logo 等品牌识别,不再用于额度状态着色。
    • 额度状态色按剩余比例分 3 档(统一走 statusColor):剩余 >=20% 中性石墨灰、<20% 橙、=0 红。
    • 数字使用 .monospacedDigit()。
    • 图标优先使用 SF Symbols。
    • 界面文案遵守 设计风格.md §5.4:标题能说清的不加说明,说明不复述标题,状态提示先说结果再说下一步,涉及隐私和凭据的说法要与代码行为一致。
  • 不自造大面积背景、玻璃阴影、Web 风格控件或无关装饰。
  • 额度 Provider 默认顺序为 Codex → Claude Code → Antigravity → Cursor → Command Code → OpenCode Go(QuotaProviderDescriptor.allProviders);其后是只有用量的 Pi → OpenCode → DSH。用户可在「设置 → 服务与账号」拖拽调整(全部服务混排),顺序存 SettingsStore.serviceOrder:设置列表读全部,菜单栏 / Popover / 悬浮窗只取额度服务,主窗口统计只取有用量的服务。导入的其他 Codex 账号仍挂在 Codex 下,用既有独立排序。
  • 网络请求失败时保留已有快照,不要清空可展示数据。
  • 429 后必须遵守现有退避策略,不要为了手动刷新绕过限流。

Read the full file on GitHub · 126 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. 8d ago Changed · +15 tokens per session bb20edacce9e
  2. 12d ago Changed · +102 tokens per session 2ce4ed949fc5
  3. 19d ago Changed · +1 lines · +198 tokens per session 8182ed989a30
  4. 21d ago Changed · +2 lines · +89 tokens per session 6f46d161dad4
  5. 25d ago Changed · +1 lines · +65 tokens per session fd2e4e00ca85
  6. 28d ago Changed · +2 lines · +66 tokens per session 2c2ee601fd38
  7. 1mo ago Changed · -9 tokens per session 5cb7f80710ac
  8. 1mo ago Changed · +8 lines · +204 tokens per session f362dc9fa49c
  9. 1mo ago First seen · 112 lines · 2,615 tokens per session scan B 3a8ad0ccc688

Subscribe to this mod's changes

cc-bar AGENTS.md is an instructions file published in the GitHub repository nanvon/cc-bar (156 stars, last pushed yesterday), licensed MIT. It adds 3,345 tokens to every session, about $0.0134 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). 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