DGame: Instructions file for Codex

AGENTS.md

DGame AGENTS.md is an instructions file for Codex, OpenCode from AmaniDawn/DGame. It costs 1,901 tokens per session, scanned A, original, MIT.

Chinese-language instructions for coding agents working on a Unity game project called DGame. They define a required workflow for classifying tasks and consulting the right technical guidance before making changes.

In plain words
What is it for?
Use them when changing DGame scenes, user interfaces, resources, modules, events, configuration, build pipelines, or hot-update code.
Why use it?
They help agents choose the right level of investigation and avoid incorrect use of project-specific APIs, file locations, resource paths, events, configuration tables, or hot-update systems.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/amanidawn/dgame/agents-md"><img src="https://agentmods.dev/badge/instructions/amanidawn/dgame/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,901 This file is loaded in full into every session.
When invoked 1,901 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.01901 $0.01901
Opus 5.5 $0.00760 $0.00760
Sonnet 5.5 $0.00380 $0.00380
Haiku 4.5 $0.00190 $0.00190

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

Security

Grade A, and why

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

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 88 lines

How it starts

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

AGENTS.md

请使用中文写提案和回答。

本文件是 DGame 仓库级规则。处理 GameUnity/** 下的文件时,还必须读取并遵守 GameUnity/AGENTS.md;子目录规则用于补充工程细节,和本文件冲突时以距离目标文件更近的规则为准。

适用范围与规范源

  • 仓库级配置和工具位于 GameConfig/、GameRelease/ 和 Tools/。
  • Unity 工程位于 GameUnity/,其工程级规则见 GameUnity/AGENTS.md。
  • Claude Code 与 Codex 共用 .agents/skills/ 下的 Agent Skills;技能和 Workflow 不再维护第二套入口。
  • 不回滚用户已有改动,不删除与当前任务无关的文件。

工作方式

  1. 先阅读相关实现和 git status,确认已有改动边界。
  2. 按任务影响范围选择验证方式;跨模块、高风险或多阶段任务先明确目标和验收条件。
  3. 读取对应 skill 的 SKILL.md 及必要的 reference。配置表、Excel、导表脚本和 GameConfig/ 数据优先使用 .agents/skills/luban-dev/。
  4. 源码用代码编辑工具修改;Unity 操作使用 Unity CLI 原生 MCP 工具或 unity command,入口选择和工程核对见 unity-cli 技能。Workflow 按需用于组合验证、CI 和配置导表。完成后执行与变更匹配的检查,并报告实际结果、限制和剩余风险。
  5. 当 reference 与源码冲突时,使用 rg 核对实际签名和调用点,优先信任当前源码,并记录冲突位置。

授权边界

  • 普通源码、文档和只读检查可按用户任务直接执行。
  • 删除文件、覆盖已有配置或资源、修改包依赖、修改 ProjectSettings、切换平台、真实构建、导表写入生产目录、发布、提交或推送前,必须明确目标和范围;已有计划或预览不等于已授权执行。
  • Unity 写入先明确本工程内的目标、输入和影响范围;支持 dry_run 时使用原生命令预览。普通对象、组件及资源操作按用户任务和已有授权直接通过 MCP 或 CLI 执行;删除、覆盖、设置、依赖、平台和真实构建遵守上一条授权要求。使用 Workflow 时才执行其 preview、approve、apply 流程;命令超时后先查询真实状态,不自动重放。
  • Luban 生产导表使用 python .agents/scripts/workflow.py luban preview、approve、apply;validate 和隔离回归不会写入生产目录。
  • 无法连接当前 DGame Editor、缺少工具或测试没有可运行用例时,记录 blocked 和原因,不使用其他工程或旧结果替代。
  • Workflow 不自动安装或升级工具,不修改用户级技能、Codex 配置或其他用户级设置。
  • 不自动提交、推送、上传、签名或发布;CLI 的 confirm 参数和本地审批记录不能替代用户授权。
  • 不使用已停用的旧工作流、旧 Unity MCP 或其他项目的验证结果替代当前 DGame 证据。

同一会话中已经核对过的主题可以复用摘要;只有涉及新主题或发现文档与源码冲突时才重新查询。

工作流、环境版本和验证矩阵见 .agents/README.md,Unity 命令以当前 MCP 工具描述、CLI 帮助和注册命令为准,Workflow 命令以 .agents/scripts/workflow.py --help 为准。L4、跨模块、配置导表、Unity 写入、构建和发布类任务必须使用 .agents/templates/task.md 记录目标、授权、决策、验证证据和剩余风险;L1/L2 小改可不创建任务文件。

AGENTS.md 是 Claude Code 与 Codex 都会读取的仓库级入口。匹配任务后,两个工具都应按这里的路由读取 .agents/skills/<skill>/SKILL.md;技能目录遵循 Agent Skills 的 SKILL.md、references/、scripts/ 和可选 agents/openai.yaml 结构。

设计与实现原则

  1. 精简界面(适用于界面和交互任务):删除多余的标语、说明文字和次要标签。删除后若界面难以理解,应先重新设计布局或信息结构,不用文字堆叠弥补结构问题。
  2. 兼顾三类体验:每次修改都要检查以下三项,并在提案、任务记录或评审说明中用 1/2/3 编号呈现;按任务规模决定说明深度。除非任务明确要求,不得破坏当前需求和已有功能:
    1. 用户体验:信息清楚、操作顺畅、反馈及时。
    2. 开发体验:结构清晰、改动易维护、验证路径明确。
    3. AI Agent 使用体验:规则和接口易发现、描述无歧义、执行步骤可验证。
  3. 精简技能文档:技能描述使用简洁、易懂的文字,删除重复和次要内容。删减后若无法理解,应重写信息结构和说明,而不是继续堆叠文字。
  4. 保持代码简洁:优先用清晰、简单、可维护的实现完成需求。先确认底层是否已有容错处理,再决定是否补充;避免无意义的 try/catch、if/return 和其他冗余代码。
  5. 确认开发阶段:修改或重构前,依据项目文档、任务要求或负责人确认判断项目是否处于开发阶段。开发阶段可按新方案移除仅服务于旧版本的代码、历史数据和兼容分支,并使用新数据验证;当前需求功能仍需通过验收。非开发阶段则先评估兼容性,再决定迁移或保留策略。

Read the full file on GitHub · 88 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. 2d ago Changed · +11 lines · +399 tokens per session 9b1fa9261ca1
  2. 18d ago Changed · +128 tokens per session 39072ea21e4f
  3. 23d ago Changed · +22 tokens per session 20452956f1ad
  4. 1mo ago Changed · -131 lines · -1,012 tokens per session 464bd227a8eb
  5. 2mo ago First seen · 208 lines · 2,364 tokens per session scan A abe6186b0d3e

Subscribe to this mod's changes

DGame AGENTS.md is an instructions file published in the GitHub repository AmaniDawn/DGame (177 stars, last pushed 3d ago), licensed MIT. It adds 1,901 tokens to every session, about $0.0076 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