DGame AGENTS.md

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

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/amanidawn/dgame/agents-md
Clone the repo
git clone --depth 1 https://github.com/AmaniDawn/DGame

Made for: Codex, OpenCode.

Per session 2,364 This file is loaded in full into every session.
When invoked 2,364 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.02364 $0.02364
Opus 5 $0.01182 $0.01182
Sonnet 5 $0.00473 $0.00473
Haiku 4.5 $0.00236 $0.00236

Measured 3d ago against content hash abe6186b0d3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 208 lines

How it starts

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

AGENTS.md

请使用中文写提案和回答。 这个文件为 Codex 提供指导,用于处理此代码库中的代码。

主启动场景位于 GameUnity/Assets/Scenes/GameStart/GameStart.unity


⚡ 强制工作流

第零步:判断任务等级

等级 判断标准 知识查询策略
L1 简单 typo、注释、日志文案、单行变量改名;前提是不涉及框架 API、UI 节点前缀、事件定义、资源路径、Luban 配置 可跳过 skill,直接处理
L2 调用 调用已知 API、单模块局部修改 使用 $dgame-dev 查询对应主题
L3 功能 新功能、跨文件修改、新增 UI / 资源 / 事件 / 模块逻辑 使用 $dgame-dev 查询全量相关主题;涉及配置先用 luban-dev
L4 架构 模块设计、系统重构、多模块协作、架构决策 使用 $dgame-dev 并按需并行查询多个 reference;配置链路同时使用 luban-dev

不确定时上调一级。凡涉及 DGame API 名称、程序集边界、资源地址、UI 节点前缀、事件接口、热更流程、Luban 表结构,都不要按 L1 处理。

第一步:按主题获取规范

同一会话中已查过的主题可复用摘要;只有涉及新主题或发现文档与源码冲突时才重新查询。配置表相关任务优先 luban-dev,业务落位和运行时代码再补 dgame-dev

场景 必须查询主题
文件落位 / 程序集边界 architecture.md
UI 生命周期 / 窗口 / Widget / IUIController ui-lifecycle.mdui-patterns.md
资源加载 / 释放 / 场景切换资源整理 resource-api.mdresource-patterns.md
热更资源包 / YooAsset 下载链路 hotpatch-workflow.md
整包 / AB 打包 / Jenkins 自动化 / ReleaseTools build-pipeline.md
热更代码 / HybridCLR / AOT 泛型 hotfix-workflow.md
模块 API / DataCenterModule / MemoryPool / Audio / Fsm modules.md
事件系统 / EventCenter / 事件反模式 event-system.mdevent-antipatterns.md
Luban 配置消费 luban-config.md;编辑配置表时使用 luban-dev
红点系统 reddot-system.md
命名 / UI 节点前缀 / 代码规范 naming-rules.md
MCP 工具链 mcp-tools.mdmcp-visual.md
排障 troubleshooting.md

第二步:输出代码或方案

基于已查询规范实现。若 reference 与源码冲突:

  1. rg 搜索实际签名和调用点。
  2. 优先信任当前源码。
  3. 在回复中标注冲突点;如果任务本身是维护 skill,直接修正 .codex/skills/dgame-dev/references/ 对应文档。

DGame 开发指导

处理 DGame 代码时优先使用 $dgame-dev。该 skill 的结构参考 TEngine 项目的 tengine-dev,但内容必须以 DGame 当前源码、目录和 API 为准。

知识源.codex/skills/dgame-dev/references/

使用方式

使用 $dgame-dev 在 DGame 仓库中实现或修改功能。
描述需要查询的技术问题或功能点

专用 skill 优先级

  • Luban 配置表、Excel、__tables__.xlsx / __beans__.xlsx / __enums__.xlsx、导表脚本、GameConfig/ 数据:优先使用 luban-dev
  • 代码落位、程序集边界、HotFix/Runtime/AOT 分层、资源模块生命周期、UI/事件/模块架构:使用 dgame-dev
  • 同时涉及配置和业务代码时,先用 luban-dev 处理配置链路,再用 dgame-dev 处理业务落位与调用方式。

Read the full file on GitHub · 208 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 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 (149 stars, last pushed 9d ago), licensed MIT. It adds 2,364 tokens to every session, about $0.0118 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.