AIBridge: Instructions file for Codex

AGENTS.md

AIBridge AGENTS.md is an instructions file for Codex, OpenCode from liyingsong99/AIBridge. It costs 1,512 tokens per session, scanned A, original, MIT.

A Chinese-language development guide for AIBridge, a Unity package that connects AI-assisted workflows with Unity projects. It defines documentation, knowledge-base, language, and workflow rules.

In plain words
What is it for?
Use it before changing C# code, Unity assets, editor tools, commands, workflows, skills, templates, documentation, or serialized project files.
Why use it?
It helps agents avoid polluting user project templates and keeps implementation, documentation, and package knowledge aligned.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/liyingsong99/aibridge/agents-md.svg)](https://agentmods.dev/instructions/liyingsong99/aibridge/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/liyingsong99/aibridge/agents-md"><img src="https://agentmods.dev/badge/instructions/liyingsong99/aibridge/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,512 This file is loaded in full into every session.
When invoked 1,512 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.01512 $0.01512
Opus 5 $0.00756 $0.00756
Sonnet 5 $0.00302 $0.00302
Haiku 4.5 $0.00151 $0.00151

Measured 7d ago against content hash 1300bf480efc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

AIBridge 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 7d 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 · 62 lines

How it starts

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

AGENTS.md

基本原则

  1. 尽量使用简体中文回复,禁止废话,言简意赅
  2. 修改复杂业务逻辑时,必须用简体中文添加必要注释
  3. 尊重用户已有改动,不擅自回滚无关文件

本文件职责

本文件只用于开发 cn.lys.aibridge 包自身。安装到 Unity 项目根目录的示例模板位于:

Templates~/ProjectRules/AGENTS.zh-CN.mdTemplates~/ProjectRules/AGENTS.en-US.md

不要把 AIBridge 包内部设计规则写入项目模板(含 RootRule 与 ProjectRules/AGENTS),避免污染使用者项目

知识库规则

  • 开始任何 AIBridge 功能调整、命令/菜单/Workflow/Skill/Runtime/模板/文档变更前,先查看 Doc~/KnowledgeBaseIndex.md,必要时联读 Doc~/README.md 和对应专题文档
  • 凡新增、修改或删除用户可见能力、CLI 命令、Editor 菜单、Runtime 能力、workflow recipe、Skill、模板、生成产物路径或公开文档,必须在同一次改动中自动更新 KnowledgeBaseIndex.md 和相关 README / Doc~ / Skill~ / Templates~ 文档,不需要用户额外提醒
  • 若实现与知识库不一致,先以当前代码、CLI 输出或 workflow list 核实事实,再修正实现或知识库;不得把漂移留给后续
  • 方案型或跨模块调整先写 .aibridge/plan/<slug>.md 工作底稿,再同步正式知识库文档

开发任务工作流

开发、修改、修复、重构 C# 代码、Unity 资源、Prefab、Editor 工具、包结构、测试、AGENTS 模板或 Skills 时,必须优先使用:

  • aibridge-development-workflow
  • 涉及 CLI / Unity 编译 / 日志 / 资源 / Inspector 时,再使用 aibridge
  • 涉及复杂 Prefab 资源修改时,再使用 aibridge-prefab-patch
  • 涉及直接修改 Unity YAML 序列化文件或 AIBridge 不支持的 Prefab / Scene / .asset 结构修改时,再使用 unity-yaml-editing
  • 涉及 batch / multi 脚本自动化时,再使用 aibridge-batch-script

项目验证

  • 编译.\Tools~\AIBridgeCLI\AIBridgeCLI.csproj 项目确认无报错
  • 检查所有Runtime和Editor下的代码文件都有生成相应的meta文件
  • 检查以 ~ 结尾的目录或文件是否保留了 .meta;Unity 默认忽略这类路径,原则上不要提交它们的 .meta,清理时连同对应目录下的 .meta 一并删除
  • 检查编辑器面板新增或修改的用户可见文本已适配英文和简体中文
  • 涉及 Unity API 或编译兼容性时,必须确保 package.json 声明的最低 Unity 2019.4 到 Unity 6000.6 兼容;能访问对应编辑器时至少验证 Unity 2019.4、当前可用 Unity 6000.x,以及涉及新 API/弃用 API 时的 Unity 6000.6 编译,无法验证的版本必须明确说明

代码硬约束

  1. C# 代码必须兼容 C# 9.0,禁止 C# 10.0+ 语法
  2. Unity 对象判空必须显式使用 != null,禁止对 Unity 对象使用 ?.
  3. 业务配置、路径、魔法数字不得散落硬编码;必要时定义常量或读取配置
  4. 避免重复代码;同一业务规则重复出现时应提取公共方法或工具类
  5. 新增或修改 Unity Editor/Runtime API 调用时,禁止直接依赖高版本 API 破坏低版本编译;版本差异必须用 Unity 版本宏、反射或集中封装处理
  6. Unity 6000.x API 兼容必须按具体版本边界处理;例如 Unity 6000.4+ 对象标识应使用 GetEntityId / EntityId 路径,Unity 6000.5+ 场景查找应使用无 FindObjectsSortModeFindObjectsByType(经 AIBridgeObjectQuery),并保留 Unity 2019.4 到旧 6000.x 的兼容分支
  7. AI 面对象 ID:CLI help / Skill 只展示当前版本主键参数名(Unity 6000.4+ 为 entityId,更旧为 instanceId);兼容策略只在 RootRule 写一行,禁止在每个 Skill reference 或 CLI action help 重复;线协议继续双接受,展示策略集中在 AIBridgeObjectIdPresentation

Read the full file on GitHub · 62 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. 7d ago First seen · 62 lines · 1,512 tokens per session scan A 1300bf480efc

Subscribe to this mod's changes

AIBridge AGENTS.md is an instructions file published in the GitHub repository liyingsong99/AIBridge (218 stars, last pushed 1mo ago), licensed MIT. It adds 1,512 tokens to every session, about $0.0076 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.

Related

Other instructions, from other repositories

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

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

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,296 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,469 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

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