Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/nanvon/cc-bar/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.svg" alt="Measured on agentmods" 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 | $0.02615 | $0.02615 |
| Opus 5 | $0.01307 | $0.01307 |
| Sonnet 5 | $0.00523 | $0.00523 |
| Haiku 4.5 | $0.00262 | $0.00262 |
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 3d 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 — 112 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 实现,用于展示 Codex 和 Claude Code 的额度、刷新状态、本地用量统计和桌面悬浮窗。
项目主体功能已开发完成,后续以新需求和迭代为主,不再按初始里程碑推进。
工程结构:
- 入口:
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、设计稿/、外部项目分析/。新需求不受里程碑顺序约束;需要对照外部项目行为时,优先看 外部项目分析/ 已整理的笔记。
协作规则
- 未经明确要求“修改、实现、修复”等,不要擅自改代码。默认先分析、定位问题、给方案和风险。
- 如果需求、边界、验收标准或影响范围不明确,并且会影响实现或引入风险,先确认。
- 对大型项目,不要主动运行
build、lint、type-check、test、dev等耗时或大量输出命令。确实需要时,先说明原因并询问。 - 修改前先读现有实现、项目规则、公共组件、公共规范和相关文档。
- 涉及功能、交互、数据结构、接口或配置行为变更时,必须同步更新相关文档;若判断无需更新文档,需要在回复里说明原因。
- 遵循当前项目风格,不做无关重构。
- 只改和当前任务直接相关的文件。不要顺手整理无关代码、格式或项目结构。
- 工作区可能已有用户改动。不要回滚、覆盖或清理非本次任务产生的改动。
实现约束
- UI 优先使用 SwiftUI / AppKit 系统默认控件和 macOS 原生风格。
- 视觉规则以
docs/设计风格.md为准:- Codex 使用石墨灰识别色,Claude Code 使用桃橙识别色;识别色仅用于 tile / logo 等品牌识别,不再用于额度状态着色。
- 额度状态色按剩余比例分 4 档交通灯(统一走
statusColor):剩余>50%绿、20%~50%黄、<20%橙、=0红。 - 数字使用
.monospacedDigit()。 - 图标优先使用 SF Symbols。
- 不自造大面积背景、玻璃阴影、Web 风格控件或无关装饰。
- 菜单栏和 Popover 中 Codex 永远排在 Claude 前。
- 网络请求失败时保留已有快照,不要清空可展示数据。
- 429 后必须遵守现有退避策略,不要为了手动刷新绕过限流。
常用验证方式
按任务风险选择最小验证手段:
- 小范围 UI 改动:先做静态检查和代码审阅。
- 需要编译确认时,先说明原因,再询问是否运行 Xcode 构建;得到同意后用下面「编译」一节里的命令,不要临时现编,避免命令写错或选错 configuration。
- 需要手动验收时,说明在 Xcode 中打开
ccbar.xcodeproj并运行 App,按本次需求的验收点检查。
不要为了验证一个小改动主动跑完整构建、完整测试或启动开发服务,除非用户明确要求。
编译
只是想确认改动能编译通过(不产出正式安装包)时,用 Debug 配置直接 build,不要用 Archive:
xcodebuild -project ccbar.xcodeproj -scheme ccbar -configuration Debug -destination 'platform=macOS' build
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.
- 3d 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 (118 stars, last pushed 4d ago), licensed MIT. It adds 2,615 tokens to every session, about $0.0131 per session on Opus 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
PokeTokenBar CLAUDE.md
Instructions for chattymin/PokeTokenBar, covering poketokenbar — claude 프로젝트 지침, 참조 문서 (필요할 때 읽는다), 기여 언어 규약 (오픈소스 대비 — english first), 릴리스 (자연어 트리거) and 확장 규약 (새 프로바이더/툴 추가 시).
TokenBar AGENTS.md
Instructions for Nanako0129/TokenBar, covering tokenbar agent routing, read order, invariants, authorization boundary and handoff.
TokenBar CLAUDE.md
Instructions for Nanako0129/TokenBar: Read AGENTS.md first, then docs/knowledge/README.md and the task-specific canonical document it routes to. If .agent-local/CLAUDE.md exists, read it after the canonical documents as additive machine-local guidance only; it must not override the canonical architecture…
cai CLAUDE.md
Instructions for cai-layer/cai, covering claude.md, what is cai?, design system, build & run and dev.
barkeep AGENTS.md
Instructions for iannuttall/barkeep, covering agent notes, product rules, repo map, commands and app structure.
openquack AGENTS.md
Instructions for larryxiao/openquack, covering agents.md, posture, before you start, workflow and pr template (the required shape).