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.
curl -O https://raw.githubusercontent.com/nanvon/cc-bar/main/AGENTS.mdgit clone --depth 1 https://github.com/nanvon/cc-barWrote 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/nanvon/cc-bar/agents-md)<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.
<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>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.03345 | $0.03345 |
| Opus 5.5 | $0.01338 | $0.01338 |
| Sonnet 5.5 | $0.00669 | $0.00669 |
| Haiku 4.5 | $0.00334 | $0.00334 |
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`。 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/(CredentialsQuotaSchedulerUsagePricingStorage、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 后必须遵守现有退避策略,不要为了手动刷新绕过限流。
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.
- 8d ago Changed · +15 tokens per session bb20edacce9e
- 12d ago Changed · +102 tokens per session 2ce4ed949fc5
- 19d ago Changed · +1 lines · +198 tokens per session 8182ed989a30
- 21d ago Changed · +2 lines · +89 tokens per session 6f46d161dad4
- 25d ago Changed · +1 lines · +65 tokens per session fd2e4e00ca85
- 28d ago Changed · +2 lines · +66 tokens per session 2c2ee601fd38
- 1mo ago Changed · -9 tokens per session 5cb7f80710ac
- 1mo ago Changed · +8 lines · +204 tokens per session f362dc9fa49c
- 1mo ago First seen · 112 lines · 2,615 tokens per session scan B 3a8ad0ccc688
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.
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).
vscode model-prompts.instructions.md
Model-specific prompt authoring and registry guidelines.