game-loop

game-loop is a skill for Claude Code, Codex from HOPPINZQ/hoppinai-mcp-red95. It costs 24 tokens per session (1,248 once invoked), scanned A, original, MIT.

A decision checklist for playing Red Alert 95, a real-time strategy game, one turn or action cycle at a time.

In plain words
What is it for?
It is for checking game state, building structures, producing units, exploring the map, defending the base, and launching attacks.
Why use it?
It helps the player choose the next useful action from the current economy, power supply, base, units, and enemy situation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for checking game state, building structures, producing units, exploring the map, defending the base, and launching attacks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoppinzq/hoppinai-mcp-red95/game-loop
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 HOPPINZQ/hoppinai-mcp-red95 --skill game-loop
Clone the repo
git clone --depth 1 https://github.com/HOPPINZQ/hoppinai-mcp-red95

Made for: Claude Code, 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-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoppinzq/hoppinai-mcp-red95/game-loop/github.svg)](https://agentmods.dev/skills/hoppinzq/hoppinai-mcp-red95/game-loop)
Your own site
<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.

agentmods 80×15 button for game-loop

Your own site · 80×15
<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>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,248 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.
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.00024 $0.01248
Opus 5 $0.00012 $0.00624
Sonnet 5 $0.00005 $0.00250
Haiku 4.5 $0.00002 $0.00125

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

Security

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 11d 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.

agent-red95/src/main/resources/skills/game-loop/SKILL.md · 115 lines

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 自动完成所有步骤
  • 智能依赖:自动处理前置建筑,无需手动建造
  • 自动放置:系统自动选择合适位置放置
  • 多实例支持:可以建造多个相同建筑

工具调用纪律

必须遵守

  1. 先查后做:不知道 actor_id 就先 get_game_state
  2. 真实ID:只传工具返回的整数ID
  3. 结果驱动:每次工具返回后判断下一步
  4. 一次一动作:不要在一个回复中调用过多工具

禁止行为

  • ❌ 连续重复调用同一个工具
  • ❌ 不看返回结果就调用下一个工具
  • ❌ 用字符串代替数字 actor_id
  • ❌ 在游戏未结束时停止行动
  • ❌ 盲守策略:持续攻击而不发展经济

卡死恢复策略

如果连续几轮没有有效进展:

恢复清单

  1. 检查游戏状态is_game_run + get_game_state
  2. 换方向行动
    • 一直在建造 → 试试侦查或进攻
    • 一直在侦查 → 试试发展经济或进攻
    • 一直在进攻 → 退回防御或发展
  3. 检查资源query_player_info 看是否没钱了
  4. 检查队列query_production_queue 看是否卡住

常见卡死原因

现象 可能原因 解决
建造不出 资金/电力不足 检查经济,等待资源积累
没发现敌人 地图未探索 移动镜头侦查
攻击失败 目标超出视野 先移动再攻击
生产卡住 前置建筑缺失 系统会自动处理

胜利条件检测

当你认为可能胜利时:

  1. 调用 get_game_state 确认敌方情况
  2. 调用 visible_units(type="敌方", range="all") 查找敌方单位
  3. 如果确实没有任何敌方单位 → 宣布 "胜利"
  4. 如果不确定 → 继续搜索残余敌人

重要提醒

⚠️ 新建造流程已简化:不需要再调用 place_buildingtry_buy_building_and_build 会自动完成所有步骤。

Read the full file on GitHub · 115 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. 11d ago First seen · 115 lines · 24 tokens per session scan A 1ee175e6818b

Subscribe to this mod's changes

game-loop is a skill published in the GitHub repository HOPPINZQ/hoppinai-mcp-red95 (21 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 1,248 once invoked, about $0.0001 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

unity-addressables

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

Besty0728/Unity-Skills · 25 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

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