Borrowing it
Nothing to install: this file belongs to shanggqm/codexU. 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/shanggqm/codexU/main/AGENTS.mdgit clone --depth 1 https://github.com/shanggqm/codexUWrote 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/shanggqm/codexu/agents-md)<a href="https://agentmods.dev/instructions/shanggqm/codexu/agents-md"><img src="https://agentmods.dev/badge/instructions/shanggqm/codexu/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/shanggqm/codexu/agents-md"><img src="https://agentmods.dev/badge/instructions/shanggqm/codexu/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.02193 | $0.02193 |
| Opus 5.5 | $0.00877 | $0.00877 |
| Sonnet 5.5 | $0.00439 | $0.00439 |
| Haiku 4.5 | $0.00219 | $0.00219 |
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 1mo 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 — 163 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 进行人工检查。
- 默认使用 Playwright 进行 UI、视觉和交互验证,包括页面截图、表面切换、滚动、hover/focus、tooltip、文本和数字显示;除非用户直接指定,否则不要用 Tauri 原生截图或 Computer Use 代替 Playwright。
- Windows Dashboard UI 改动默认先运行 Playwright 全表面验证。只有用户直接要求验证真实 Tauri 窗口、HWND、DPI、窗口层级或原生发布包行为时,才运行下面的原生视觉 workflow;采集窗口必须保持最大化、non-activating、保留用户当前前台窗口,并作为 tool window 排除在任务栏和 Alt-Tab 之外。
- 文档-only 改动至少运行
git diff --check。
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.
- 1mo ago Changed · +1 lines · +80 tokens per session b2559f76fb74
- 2mo 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 (359 stars, last pushed 10d ago), licensed MIT. It adds 2,193 tokens to every session, about $0.0088 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.
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).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.