openagents AGENTS.md

A set of project rules for contributing to the openagents repository. It covers file limits, workflow stages, coding style, dependency restrictions, and required checks.

In plain words
What is it for?
Use it before modifying openagents code to understand what may be changed, how code should be written, and how it must be checked.
Why use it?
It prevents changes outside the allowed scope and helps contributions follow the repository's Chinese-language and functional-programming conventions.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/jiangwangyang/openagents/agents-md
Clone the repo
git clone --depth 1 https://github.com/jiangwangyang/openagents

Made for: Codex, OpenCode.

Per session 365 This file is loaded in full into every session.
When invoked 365 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00365 $0.00365
Opus 5 $0.00182 $0.00182
Sonnet 5 $0.00073 $0.00073
Haiku 4.5 $0.00036 $0.00036

Measured 2d ago against content hash e41342c2137c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openagents 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 2d 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 · 26 lines

What it actually says

AGENTS.md

规范

  1. 禁止修改非项目文件,只允许修改当前目录下的文件。
  2. 禁止运行程序,代码编写完后仅允许编译检验。
  3. 禁止直接安装任何软件或依赖,但可以向我提出安装申请。

工作流

  1. 了解阶段:使用ls等命令查看当前项目结构。
  2. 需求阶段:明确需求,包括输入输出等。若需求模糊,先向我提出澄清问题。
  3. 分析阶段:分析需求是否合理,应该如何实现,应该采用什么技术。
  4. 方案阶段:规划改动范围,包括文件,函数,框架等。待我确认后再生成代码。
  5. 生成阶段:按照要求严格生成代码,禁止修改其它内容,且代码风格要和项目其它代码保持一致。
  6. 整理阶段:如果有格式化工具,使用格式化工具格式化代码。
  7. 检查阶段:生成后,自我审查是否遵循了上述所有规范,然后汇总归纳。

编码规范

  1. 默认使用函数编程,禁止编写类和方法,实体类 (绑定数据)除外。
  2. 函数的参数,返回值需要明确声明类型。
  3. 业务代码需在一个函数内编写完,禁止拆分为多个函数调用。
  4. 统一使用单行注释 (#,//),禁止使用多行注释 (''',""",/**/等)。
  5. 代码风格保持一致,注释风格保持一致,注释内容与代码一致,禁止使用全角标点。
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. 2d ago First seen · 26 lines · 365 tokens per session scan A e41342c2137c

Subscribe to this mod's changes

openagents AGENTS.md is an instructions file published in the GitHub repository jiangwangyang/openagents (2 stars, last pushed 11d ago), licensed MIT. It adds 365 tokens to every session, about $0.0018 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-31.

Related

Other instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

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 · 6,785 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 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,345 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js 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,296 tokens