nanzi-ai-agent-platform: Instructions file for Codex

AGENTS.md

nanzi-ai-agent-platform AGENTS.md is an instructions file for Codex, OpenCode from RandyChen1985/nanzi-ai-agent-platform. It costs 1,293 tokens per session, scanned A, original, MIT.

Repository instructions for nanzi-ai-agent-platform, an AI application platform built with Python, Vue, databases, Redis, and AgentScope. They also define project communication, testing, permissions, deployment, and Git rules.

In plain words
What is it for?
Implementing backend and frontend changes, handling database migrations, running approved tests, managing skills and permissions, and keeping development branches synchronized.
Why use it?
They clarify the platform's technical boundaries and prevent an AI assistant from using the wrong tools, changing databases directly, or performing restricted operations.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: built for openclaw.

This is RandyChen1985/nanzi-ai-agent-platform's own configuration. It tells Codex and OpenCode how to work on nanzi-ai-agent-platform 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 nanzi-ai-agent-platform configures →

Reuse

Borrowing it

Nothing to install: this file belongs to RandyChen1985/nanzi-ai-agent-platform. 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/RandyChen1985/nanzi-ai-agent-platform/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/RandyChen1985/nanzi-ai-agent-platform

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 nanzi-ai-agent-platform AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/randychen1985/nanzi-ai-agent-platform/agents-md/github.svg)](https://agentmods.dev/instructions/randychen1985/nanzi-ai-agent-platform/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/randychen1985/nanzi-ai-agent-platform/agents-md"><img src="https://agentmods.dev/badge/instructions/randychen1985/nanzi-ai-agent-platform/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 nanzi-ai-agent-platform AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/randychen1985/nanzi-ai-agent-platform/agents-md"><img src="https://agentmods.dev/badge/instructions/randychen1985/nanzi-ai-agent-platform/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,293 This file is loaded in full into every session.
When invoked 1,293 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.01293 $0.01293
Opus 5.5 $0.00517 $0.00517
Sonnet 5.5 $0.00259 $0.00259
Haiku 4.5 $0.00129 $0.00129

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

Security

Grade A, and why

nanzi-ai-agent-platform 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.

AGENTS.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

交流语言

  • 始终使用中文交流,包括中间过程中的推理与思考,以及所有回复、汇报与文档说明。所有说明请优先用中文。与用户沟通、解释、总结时一律使用中文。

项目技术栈与关键边界

  • 运行时:Python 3.11;Docker 基础镜像为 python:3.11-slim。禁止使用仅 Python 3.12+ 支持的语法。
  • 后端:FastAPI + Uvicorn + SQLAlchemy 2.x 异步 ORM + Pydantic 2。
  • 前端:Vue 3 + TypeScript + Vite 7 + Tailwind CSS 3,按现有 Vue 工程实现,不引入 React 方向的方案。
  • AI 编排:AgentScope 2.x 是主运行时;OpenClaw、RAGFlow、MCP 是独立集成边界。修改路由或执行链前,先追踪 router、dispatcher、runner、tool 和权限预检。
  • 数据库:平台主库默认 MySQL,也支持 PostgreSQL。MySQL 使用 db-prod/,PostgreSQL 使用 db-prod-pg/,两套迁移不可混用;平台主库与外部数据源支持必须分开处理。
  • Redis:Redis Stack/RediSearch 是平台运行依赖。
  • 权限:menu:* 控制菜单显示,element:* 控制具体功能。平台技能管理和待审核使用 element:skills:admin。
  • 测试:后端使用 pytest;纯前端契约测试使用 pytest --confcutdir=tests/frontend,前端类型检查使用 vue-tsc --noEmit。
  • 数据库变更:只新增对应版本的迁移 SQL,不直接修改本地或线上数据库。
  • 执行边界:Agent 不主动执行 ./dev.sh、部署脚本或生产数据库操作;服务启停和部署由用户在控制台执行。

原型(prototypes/)

用户说「先给我看看效果」「出个 mock」「做个原型」时,按这套流程走:

  1. 位置:所有原型 HTML 只能放 prototypes/。禁止放 html/、docs/、frontend/public/ 或仓库根目录。
  2. 命名:YYYY-MM-DD-<topic>.html,日期是首次创建日,topic 用小写英文连字符(如 2026-11-02-knowledge-doc-workspace.html)。一个需求一个文件,多方案做在同一个文件里(tab / 并排),不拆成多个。
  3. 登记:写完或改名后必须跑 python prototypes/build_index.py,它会重写总览页 prototypes/index.html(该页是生成物,不要手工改)。
  4. 自包含:CSS/JS 内联,不引外部资源,双击即可打开;<title> 写成「功能 · 做了什么」。
  5. 顺序:先出原型让用户确认,确认后再改实现代码——不要跳过原型直接写实现。
  6. 完整规范见 prototypes/prototypes.md。

Git 协作:用户说「代码已合」

用户表示 PR/代码已合并后,必须立即执行本地 git 同步,不要只口头确认:

  1. git fetch origin
  2. 切回开发分支:git checkout dev-agentscope-mcp2.x —— 这是当前唯一的开发分支,日常开发都在它上面。dev-agentscope 已废弃,不要再切过去。
  3. 把刚合并的结果快进回来:git merge --ff-only origin/main —— PR 固定从 dev-agentscope-mcp2.x 提到 main,合并结果落在 origin/main 上。
  4. 汇报:主工作分支最新 commit、与远程是否一致
  5. 提醒用户自行在控制台执行 ./dev.sh(Agent 不代跑)

不要做的事:不 rebase、不对共享分支 push --force(PR 合并已产生 merge commit,改写历史会让远程记录与 PR 对不上)。合并后一律用 --ff-only 快进;出现冲突先汇报再问,不要自行 resolve。

不要在用户未要求时擅自创建 PR 或 force push。

Read the full file on GitHub · 54 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. 3d ago Changed · +11 lines · +286 tokens per session 1d63ba026533
  2. 7d ago Changed · +5 lines · +176 tokens per session 012c47dbcadc
  3. 2mo ago Changed · +7 tokens per session 46261821c934
  4. 2mo ago First seen · 38 lines · 824 tokens per session scan A 2ca55a5b9274

Subscribe to this mod's changes

nanzi-ai-agent-platform AGENTS.md is an instructions file published in the GitHub repository RandyChen1985/nanzi-ai-agent-platform (228 stars, last pushed yesterday), licensed MIT. It adds 1,293 tokens to every session, about $0.0052 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

nanzi-ai-agent-platform AGENTS.md compared with instructions from other repositories

nanzi-ai-agent-platform AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nanzi-ai-agent-platform AGENTS.mdRandyChen1985/nanzi-ai-agent-platformInstructions file228yesterdayMITA1,293Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode