codexU: Instructions file for Codex

AGENTS.md

codexU AGENTS.md is an instructions file for Codex, OpenCode from shanggqm/codexU. It costs 2,193 tokens per session, scanned A, original, MIT.

A project instruction file for codexU, a local desktop widget that shows Codex usage, limits, trends, and task status on macOS and Windows.

In plain words
What is it for?
Use it when changing codexU’s Swift, Rust, Tauri, documentation, resources, build scripts, or project-level agent skills.
Why use it?
It gives coding agents the project’s boundaries, important files, design rules, privacy requirements, and safe development practices.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; reads ~/.codex paths; mentions AGENTS.md.

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

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/shanggqm/codexU/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/shanggqm/codexU

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 codexU AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/shanggqm/codexu/agents-md/github.svg)](https://agentmods.dev/instructions/shanggqm/codexu/agents-md)
Your own site
<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.

agentmods 80×15 button for codexU AGENTS.md

Your own site · 80×15
<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>
Per session 2,193 This file is loaded in full into every session.
When invoked 2,193 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02193 $0.02193
Opus 5.5 $0.00877 $0.00877
Sonnet 5.5 $0.00439 $0.00439
Haiku 4.5 $0.00219 $0.00219

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

Security

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.

AGENTS.md · 163 lines

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。

Read the full file on GitHub · 163 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. 1mo ago Changed · +1 lines · +80 tokens per session b2559f76fb74
  2. 2mo ago First seen · 162 lines · 2,113 tokens per session scan A e668d9ba34d4

Subscribe to this mod's changes

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.

Related

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).

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,461 tokens

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).

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

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).

microsoft/vscode · 2,750 tokens

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.

deepseek-ai/deepseek-harness · 4,261 tokens