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/shanggqm/codexu/agents-mdgit clone --depth 1 https://github.com/shanggqm/codexUWhat 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.02113 | $0.02113 |
| Opus 5 | $0.01056 | $0.01056 |
| Sonnet 5 | $0.00423 | $0.00423 |
| Haiku 4.5 | $0.00211 | $0.00211 |
Grade A, and why
codexU 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 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.
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 — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本文件是 codexU 的长期协作规范。它只记录稳定原则、项目边界和必要流程,不记录某次功能的临时方案。
项目边界
codexU 是本地 macOS 桌面小组件,并包含独立的 Windows 桌面实现,用于查看 Codex 额度、用量、趋势和任务状态。
必须保持:
- 本地优先:数据来自用户本机和本机 Codex 状态。
- 隐私优先:不上传 usage、线程、路径、日志或账户数据。
- 工具属性:界面服务快速判断和持续扫视,不做营销化表达。
- Liquid Glass 原生感:优先使用系统玻璃材质、系统字体、SF Symbols 和语义色。
关键文档
- 产品说明:
README.md、README.en.md - 设计系统:
docs/DESIGN_SYSTEM.md - 功能需求:
docs/下的 PRD 文档 - 打包发布:
DISTRIBUTION.md - 安全边界:
SECURITY.md - 贡献约定:
CONTRIBUTING.md
改动触及对应领域时,同步更新对应文档。不要把一次性实现细节写进长期规范。
代码结构
- 主实现:
Sources/CodexUsageWidget/main.swift - Windows 实现:
windows/(Rust + Tauri,独立于 macOS 主实现) - 资源与版本:
Resources/ - 构建与发布:
Makefile、scripts/ - 设计和产品文档:
docs/
当前项目刻意保持轻量。新增文件、依赖或架构层级前,先判断是否真的降低复杂度。
项目级 Skills
.agents/skills/是项目级 Skill 的唯一内容源,Codex 直接从这里加载。.codex/skills、.cursor/skills、.claude/skills只通过软链复用该目录,不维护内容副本。- 首次初始化先运行
scripts/init-agent-skills.sh预检;确认无冲突后运行scripts/init-agent-skills.sh --apply。 - 初始化脚本不得覆盖真实目录或指向其他来源的软链;遇到冲突时停止并人工确认。
工作原则
- 先理解现有模式,再修改代码。
- 优先复用已有组件、数据模型、视觉 token 和本地 helper。
- 改动保持聚焦,不把需求实现和无关重构混在一起。
- 不回滚用户已有改动,除非用户明确要求。
- 不提交或依赖
build/、dist/、.build/等生成产物。 - 使用清晰、可解释的文案,不暴露内部字段名。
UI 原则
UI 改动必须遵守 docs/DESIGN_SYSTEM.md。
核心约束:
- 不使用 emoji 作为界面图标。
- 不新增散落的硬编码颜色、间距和圆角。
- 保持 Liquid Glass 风格:轻盈、透明、有层级,但不能牺牲可读性。
- 颜色必须有职责:品牌、状态、数据或表面。
- 卡片、标题栏、列表行、图表和控件保持统一层级。
- 并列卡片必须对齐;内容刷新不能造成明显布局跳动。
- 小组件首屏不展示 prompt、回复正文、tool arguments 或 raw logs。
数据原则
- 区分官方数据、本地记录和本地估算。
- 估算值必须明确标注。
- 回退口径必须用用户能理解的语言解释。
- 缺失数据不伪造成 0;应表达为记录不足、不可用或暂无。
- tooltip 可以解释口径,但不能泄露敏感正文。
验证流程
常用命令:
make build
make probe
build/codexU.app/Contents/MacOS/codexU --dump-json
git diff --check
规则:
- 代码改动后运行
make build。 - 数据读取或聚合逻辑改动后运行
make probe或--dump-json。 - UI 改动后启动本地 app 进行人工检查。
- Windows Dashboard UI 改动后,先运行原生视觉 workflow preflight;需要证明真实窗口行为时,再运行 coverage 测试或完整采集。采集窗口必须保持最大化、non-activating、保留用户当前前台窗口,并作为 tool window 排除在任务栏和 Alt-Tab 之外。
- 文档-only 改动至少运行
git diff --check。
Windows 原生视觉验收的最小入口(从仓库根目录运行):
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 · 162 lines · 2,113 tokens per session scan A e668d9ba34d4
codexU AGENTS.md is an instructions file published in the GitHub repository shanggqm/codexU (336 stars, last pushed 29d ago), licensed MIT. It adds 2,113 tokens to every session, about $0.0106 per session on Opus 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
codex-lb AGENTS.md
AGENTS.md instructions for Soju06/codex-lb, covering agents, environment, code conventions, workflow (openspec-first) and how to work (default).
codexia AGENTS.md
Instructions for milisp/codexia, covering agents.md, project info, project tech, common commands and project structure.
codex-multi-auth AGENTS.md
Instructions for ndycode/codex-multi-auth, covering project knowledge base, structure, where to look, conventions and anti-patterns.
many-ai-cli CLAUDE.md
Instructions for ishizakahiroshi/many-ai-cli, covering many-ai-cli 開発ガイド, プロジェクト概要, 新規 provider を増やす提案をしない(2026-08-13 制定), デスクトップアプリ化・microsoft store 提出は提案しない(2026-08-14 制定) and 現在の実装状態.
codex-usage-widget AGENTS.md
Instructions for ognjeeen/codex-usage-widget, covering agents.md, project, scope and decision discipline, authorization and repository safety and architecture boundaries.
many-ai-cli AGENTS.md
Instructions for ishizakahiroshi/many-ai-cli: This repository's operational guidance is maintained in CLAUDE.md.