game-ai-adaptation

game-ai-adaptation is a skill for Codex from zhuanggenhua/BoardGame. It costs 46 tokens per session (2,363 once invoked), scanned A, original, MIT.

A workflow for adding and maintaining computer-controlled players in board games. It covers legal actions, automatic responses, stuck-game watchdogs, and safe ways to end blocked interactions.

In plain words
What is it for?
Use it when editing a game's ai.ts file, adding automatic responses or skips, fixing AI interaction loops, or connecting AI to a new game.
Why use it?
It prevents AI turns from freezing, repeating prompts, reopening finished responses, or getting stuck when no valid choice is available.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it when editing a game's ai.ts file, adding automatic responses or skips, fixing AI interaction loops, or connecting AI to a new game.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhuanggenhua/boardgame/game-ai-adaptation
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.

Any agent
npx skills add zhuanggenhua/BoardGame --skill game-ai-adaptation
Clone the repo
git clone --depth 1 https://github.com/zhuanggenhua/BoardGame

Made for: Codex.

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 game-ai-adaptation

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/game-ai-adaptation/github.svg)](https://agentmods.dev/skills/zhuanggenhua/boardgame/game-ai-adaptation)
Your own site
<a href="https://agentmods.dev/skills/zhuanggenhua/boardgame/game-ai-adaptation"><img src="https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/game-ai-adaptation/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 game-ai-adaptation

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhuanggenhua/boardgame/game-ai-adaptation"><img src="https://agentmods.dev/badge/skills/zhuanggenhua/boardgame/game-ai-adaptation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,363 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 166
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00046 $0.02363
Opus 5 $0.00023 $0.01182
Sonnet 5 $0.00009 $0.00473
Haiku 4.5 $0.00005 $0.00236

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

Security

Grade A, and why

game-ai-adaptation 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.

.spec/skills/game-ai-adaptation/SKILL.md · 174 lines

How it starts

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

Game AI Adaptation

本 skill 只管 AI 合法动作、交互闭环、卡死和兜底;AI 打法强弱、评分器、角色画像和策略重构走 game-ai-strategy-design

触发

出现以下任一情况必须使用:

  • 修改 src/games/<gameId>/ai.ts
  • 新增或修改自动响应、自动跳过、强制结束、watchdog。
  • 修 “AI 卡死 / 无法选择 / 重复交互 / 跳过后重触发 / 响应音效循环”。
  • 新游戏接 AI,需要审查交互闭环与兜底。
  • 玩家真实交互合同改变,例如确认入口、对象选择路径、阻塞层生命周期、弹窗承载物或收口按钮迁移。

必读

  • engine-systems
  • testing-audit
  • references/checklist.md
  • references/response-window-watchdog.md
  • references/vitest-templates.md

历史 evidence 只能作同类参考;不能代替本轮真实链路审计。

本仓库 AI 执行链

Interaction 链

  • 游戏层通常在 domain/execute.tsdomain/systems.ts 创建交互。
  • 引擎层 InteractionSystem 承接 sys.interaction.current / queue、choice 创建、resolve 和 playerView()
  • createSimpleChoice() 拿到空 options 是卡死前兆,不是可接受状态。
  • 非 owner 在 playerView() 中可能只看到 isBlocked=true;sharedState 看不到 current 不等于没有交互。

Response-window 链

  • ResponseWindowSystem 负责打开 / 关闭响应窗口、RESPONSE_PASS、强制关闭、允许命令和 responder 门禁。
  • 响应窗口能否闭合,取决于是否有合法响应、无响应 pass、不会因 stale queue / reopen 再卡住。
  • 必须区分:
    • human 自己回合且 human 在响应:watchdog 不得出手。
    • AI 当前阶段被 human 响应窗口卡住:watchdog 可先强制关闭窗口,再继续 AI 阶段收口。
    • AI 自己是 responder:AI 可发合法响应或 RESPONSE_PASS

在线 AI 兜底链

  • 服务端 watchdog 在 src/engine/transport/server.ts
  • AI 恢复逻辑在 src/engine/transport/onlineAiRecovery.ts
  • watchdog 是 AI seat 专属兜底,不是全局强推。
  • hidden interaction 必须用 applyPlayerView(match, playerId) 生成 seat view 后诊断。

核心合同

1. AI 只能选合法动作

  • AI legal actions 必须和 validate() / execute() 同源一致。
  • disabled=true、已失效目标、不可移除状态、已确认阶段的旧动作不得进入 AI 动作。
  • legal actions 为空时,必须走 cancel / pass / skip / advance 之一;不能继续等。
  • 真人在同一规则状态下能选择的并列合法动作,AI legal actions 也要枚举;策略不想选时在评分层降权,不在合法动作层删掉。

2. 每个交互必须可收口

每个 AI 相关 interaction / response-window 至少有一个正式收口路径:

  • SYS_INTERACTION_RESPOND
  • SYS_INTERACTION_CANCEL
  • RESPONSE_PASS
  • ADVANCE_PHASE
  • 游戏特化阶段推进命令

没有收口命令是设计缺陷,不是“之后靠 AI 补”。

3. UI 交互合同变更要同步审 AI

Read the full file on GitHub · 174 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 Changed e8762dcd4034
  2. 12d ago First seen · 174 lines · 46 tokens per session scan A 467affedd18d

Subscribe to this mod's changes

game-ai-adaptation is a skill published in the GitHub repository zhuanggenhua/BoardGame (23 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 2,363 once invoked, about $0.0002 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 skills, from other repositories

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

godot-signals-groups

Build event-driven, decoupled Godot 4.7 gameplay with signals and node groups: declare and emit custom signals, connect with Callables (incl. bind/one-shot), and broadcast to many nodes via groups and callgroup. Use when wiring node communication in a Godot project, replacing tight references with signals…

gamedev-skills/awesome-gamedev-agent-skills · 95 tokens

motion

How an agent turns a character mesh into a usable animated FBX — and how to judge whether the result is shippable.

OpenDCAI/GameFactory-3A · 0 tokens

unity-addressables

Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).

Besty0728/Unity-Skills · 25 tokens

threejs-exposure-color-grading

Build a measured exposure and grading path in Three.js. Use for a 64x36 encoded luminance meter, asynchronous readback, weighted log-average exposure, asymmetric adaptation, single tone-map ownership, and a generated 32-cube post-tone-map LUT.

scottstts/Threejs-Awesome-Graphics-Agent-Skills · 60 tokens