windbot: Instructions file for Codex

AGENTS.md

windbot AGENTS.md is an instructions file for Codex, OpenCode from IceYGO/windbot. It costs 5,254 tokens per session, scanned A, original, MIT.

Project guidance for WindBot, a C# program that plays the card game Yu-Gi-Oh! through compatible game servers. It explains the project structure, information limits, and how decisions travel through the program.

In plain words
What is it for?
Use it when changing WindBot's network handling, game state, card-deck decision logic, startup flow, or project files.
Why use it?
It gives coding agents the project-specific rules they need to avoid guessing hidden card information or misusing this older .NET Framework codebase.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/iceygo/windbot/agents-md"><img src="https://agentmods.dev/badge/instructions/iceygo/windbot/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,254 This file is loaded in full into every session.
When invoked 5,254 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.05254 $0.05254
Opus 5.5 $0.02102 $0.02102
Sonnet 5.5 $0.01051 $0.01051
Haiku 4.5 $0.00525 $0.00525

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

Security

Grade A, and why

windbot 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 2mo 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 · 169 lines

How it starts

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

AGENTS.md

项目定位

  • WindBot 是面向 YGOPro/YGOSharp/SRVPro 协议的 C# 决斗机器人,本质上是一个自动操作的 YGOPro 客户端。
  • 主程序基于 .NET Framework 4.8,解决方案支持 Any CPU 和 x86,当前默认平台与 CI 主验证平台为 Any CPU;项目是旧式非 SDK .csproj,不要默认使用仅适用于现代 .NET/SDK 项目的工具和 API。
  • 机器人只能使用服务器发给当前客户端的信息。对方手牌、牌组、盖卡等未公开信息通常只有数量或 Id == 0 的占位对象,不能读取、推断或硬编码其真实内容。
  • 服务器在要求客户端响应时已经给出了合法操作候选。牌组 AI 的职责主要是判断“现在是否值得这样做”以及“选哪个目标”,而不是复述发动条件。

解决方案与运行链路

解决方案包含两个项目:

  • WindBot.csproj:控制台主程序,包含网络协议、客户端状态和全部决斗 AI;输出 WindBot.exe。
  • BotWrapper/BotWrapper.csproj:供 YGOPro 人机模式调用的轻量启动器,整理启动参数并启动 WindBot.exe;输出 Bot.exe。

主程序的调用链如下:

  1. Program.cs 读取命令行或配置文件,初始化牌组注册表和 cards.cdb,然后以单实例模式或 HTTP server 模式启动机器人。
  2. Game/GameClient.cs 建立连接、进入房间并把收到的数据包交给 GameBehavior。
  3. Game/GameBehavior.cs 按 StocMessage/GameMessage 解包,更新 Duel、ClientField、ClientCard 等客户端可见状态,并在需要响应时调用 GameAI。
  4. Game/GameAI.cs 整理服务端给出的合法候选,按优先级查询当前牌组的 Executor 并返回决策;GameBehavior 负责验证、编码并把响应发回服务器。
  5. Game/AI/DecksManager.cs 通过反射发现带 [Deck] 的执行器,并为每局实例化对应牌组 AI。
  6. Game/AI/Executor.cs 定义公共回调和有序的 CardExecutor 列表;各牌组通常继承 DefaultExecutor。

server 模式会为每个 HTTP 请求创建独立线程和独立的 GameClient/Duel/Executor。不要把单局可变状态放进静态字段,也不要让不同机器人实例共享未同步的牌组状态。

目录职责

  • Game/:决斗状态、消息处理、主阶段/战斗阶段动作模型。
  • Game/AI/:AI 调度、选择队列、通用决策、卡片扩展方法和领域常量。
  • Game/AI/Decks/:各牌组的专用执行器,是新增或调整牌组逻辑的首选位置。
  • Game/AI/Enums/:跨牌组共享的已知卡分类,例如压制卡、危险怪兽、不可取对象等。
  • YGOSharp.Network/:TCP 数据帧和 CTOS/STOC 协议层。
  • YGOSharp.OCGWrapper/、YGOSharp.OCGWrapper.Enums/:卡片数据库模型和协议/规则枚举。
  • Decks/:运行时 .ydk 牌组文件。
  • Dialogs/:运行时 JSON 对话资源。
  • BotWrapper/:外部 bot 启动包装器及其配置。

层次边界应保持清晰:

  • 协议解析和客户端状态同步放在 GameBehavior/网络层。
  • 通用、确实能被多个牌组复用的决策放在 DefaultExecutor、AIUtil、CardExtension 或共享枚举中。
  • 单一牌组的展开路线、卡片优先级和临时标志留在对应牌组执行器中。
  • 不要为了一个牌组的特例污染协议层或全局默认逻辑。

AI 决策模型

AddExecutor 顺序就是优先级

GameAI 会按注册顺序遍历 Executor.Executors,再遍历服务器给出的候选卡;第一个匹配且返回 true 的执行器立即胜出。因此:

  • 构造函数中的 AddExecutor 顺序具有决定性影响,调整顺序属于行为修改,不是格式整理。
  • 更具体、更紧急的响应放在前面,通用处理和兜底放在后面。
  • 同一张卡的不同效果或不同局面可以注册多次;需要用 Card、ActivateDescription、CurrentTiming 和当前连锁状态区分。
  • AddExecutor(type, cardId) 表示匹配后无条件接受;只应在所有合法出现时都适合执行的场景使用。
  • GoToBattlePhase、GoToEndPhase、Surrender 等没有卡片上下文,其条件函数不能依赖 Card。

Read the full file on GitHub · 169 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. 2mo ago First seen · 169 lines · 5,254 tokens per session scan A 6261d7e4c834

Subscribe to this mod's changes

windbot AGENTS.md is an instructions file published in the GitHub repository IceYGO/windbot (103 stars, last pushed 1mo ago), licensed MIT. It adds 5,254 tokens to every session, about $0.0210 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

windbot AGENTS.md compared with instructions from other repositories

windbot AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
windbot AGENTS.mdIceYGO/windbotInstructions file1031mo agoMITA5,254Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot