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.
npx skills add HOPPINZQ/hoppinai-mcp-red95 --skill game-loopgit clone --depth 1 https://github.com/HOPPINZQ/hoppinai-mcp-red95Wrote 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.
[](https://agentmods.dev/skills/hoppinzq/hoppinai-mcp-red95/game-loop)<a href="https://agentmods.dev/skills/hoppinzq/hoppinai-mcp-red95/game-loop"><img src="https://agentmods.dev/badge/skills/hoppinzq/hoppinai-mcp-red95/game-loop/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.
<a href="https://agentmods.dev/skills/hoppinzq/hoppinai-mcp-red95/game-loop"><img src="https://agentmods.dev/badge/skills/hoppinzq/hoppinai-mcp-red95/game-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00024 | $0.01248 |
| Opus 5.5 | $0.00010 | $0.00499 |
| Sonnet 5.5 | $0.00005 | $0.00250 |
| Haiku 4.5 | $0.00002 | $0.00125 |
Grade A, and why
game-loop 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.
How it starts
The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.
红警95 游戏循环决策清单
每回合标准操作流程
每一回合(每次你被要求行动时)都必须遵循以下流程:
Step 1: 刷新状态
get_game_state()
→ 获取:金钱、电力、所有可见单位(含 actor_id)
Step 2: 评估局势
根据返回信息快速判断:
- 经济:有钱吗?有电吗?矿车在采矿吗?
- 军事:有军队吗?敌人位置在哪?有威胁吗?
- 建筑:基地完整吗?有建筑被摧毁吗?
Step 3: 选择最高优先级行动
按优先级从上到下,选第一个需要做的事:
| 优先级 | 条件 | 行动 |
|---|---|---|
| 🔴 P0 | 游戏刚开始 | deploy_mcv 展开基地 |
| 🔴 P0 | 电力 ≤ 0 | try_buy_building_and_build("电厂") |
| 🔴 P0 | 矿车 < 2 | produce("矿车", 2) |
| 🔴 P0 | 正被攻击 | 生产防御单位 + 调兵回防 |
| 🟡 P1 | 无矿场 | try_buy_building_and_build("矿场") |
| 🟡 P1 | 无兵营 | try_buy_building_and_build("兵营") |
| 🟡 P1 | 步兵 < 5 | produce("步兵", 5) |
| 🟢 P2 | 无车间 | try_buy_building_and_build("车间") |
| 🟢 P2 | 地图未探索 | 移动镜头侦查 |
| 🟢 P2 | 资金充足(>2000) | try_buy_building_and_build("核电") |
| 🔵 P3 | 发现敌人 | 组建攻击部队 |
| 🔵 P3 | 军队充足 | 发动进攻 |
Step 4: 执行行动
- 调用选定的工具
- 根据返回结果判断是否成功
- 成功 → 继续下一步计划
- 失败 → 分析原因,调整策略
Step 5: 绝不空转
- 每回合至少调用一个工具
- 不要只输出文字不行动
- 不确定做什么 →
get_game_state再看一遍
建造流程简化
新版本优势:
- 一步建造:
try_buy_building_and_build自动完成所有步骤 - 智能依赖:自动处理前置建筑,无需手动建造
- 自动放置:系统自动选择合适位置放置
- 多实例支持:可以建造多个相同建筑
工具调用纪律
必须遵守
- 先查后做:不知道 actor_id 就先
get_game_state - 真实ID:只传工具返回的整数ID
- 结果驱动:每次工具返回后判断下一步
- 一次一动作:不要在一个回复中调用过多工具
禁止行为
- ❌ 连续重复调用同一个工具
- ❌ 不看返回结果就调用下一个工具
- ❌ 用字符串代替数字 actor_id
- ❌ 在游戏未结束时停止行动
- ❌ 盲守策略:持续攻击而不发展经济
卡死恢复策略
如果连续几轮没有有效进展:
恢复清单
- 检查游戏状态:
is_game_run+get_game_state - 换方向行动:
- 一直在建造 → 试试侦查或进攻
- 一直在侦查 → 试试发展经济或进攻
- 一直在进攻 → 退回防御或发展
- 检查资源:
query_player_info看是否没钱了 - 检查队列:
query_production_queue看是否卡住
常见卡死原因
| 现象 | 可能原因 | 解决 |
|---|---|---|
| 建造不出 | 资金/电力不足 | 检查经济,等待资源积累 |
| 没发现敌人 | 地图未探索 | 移动镜头侦查 |
| 攻击失败 | 目标超出视野 | 先移动再攻击 |
| 生产卡住 | 前置建筑缺失 | 系统会自动处理 |
胜利条件检测
当你认为可能胜利时:
- 调用
get_game_state确认敌方情况 - 调用
visible_units(type="敌方", range="all")查找敌方单位 - 如果确实没有任何敌方单位 → 宣布 "胜利"
- 如果不确定 → 继续搜索残余敌人
重要提醒
⚠️ 新建造流程已简化:不需要再调用 place_building,try_buy_building_and_build 会自动完成所有步骤。
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.
- 2mo ago First seen · 115 lines · 24 tokens per session scan A 1ee175e6818b
game-loop is a skill published in the GitHub repository HOPPINZQ/hoppinai-mcp-red95 (21 stars, last pushed 3mo ago), licensed MIT. It adds 24 tokens to every session and 1,248 once invoked, about $0.0001 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.
game-loop compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| game-loopHOPPINZQ/hoppinai-mcp-red95 | Skill | 21 | 3mo ago | MIT | A | 24 | Claude Code, Codex |
| playtest-reportDonchitos/Claude-Code-Game-Studios | Skill | 36k | 19d ago | MIT | A | 20 | Claude Code |
| godot-signals-groupsgamedev-skills/awesome-gamedev-agent-skills | Skill | 6.9k | 9d ago | Apache-2.0 | A | 95 | Claude Code |
| scenario-unreal-gameplayscenario-labs/skills | Skill | 3.2k | yesterday | MIT | A | 121 | Claude Code |
| motionOpenDCAI/GameFactory-3A | Skill | 1.0k | 8d ago | Apache-2.0 | A | 0 | Claude Code, Codex |
| unity-addressablesBesty0728/Unity-Skills | Skill | 1.9k | yesterday | MIT | A | 25 | Claude Code, Codex |
| unity-manual-componentBesty0728/Unity-Skills | Skill | 1.9k | yesterday | MIT | A | 36 | Claude Code, Codex |