Build and review turn-based Rust game flow using turn-state enums, phase-specific schedules, intent messages, movement resolution, combat resolution, wait actions, and win/loss states.
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/16/2026
What it changes
Passed 22 of 22 test cases with the skill, and 19 of 22 without it.
Without skill86%
With skill100%
Checks it passed that the model alone missed
Delete invalid or processed intent components prior to phase advancement
Spawn a ranged attack intent component from the user interaction handler
Do not apply turn-based phase state machines or intent component lifecycles
3 fixed19 passed either way0 still failing0 broke
Pass-rate lift
+14 pp
Tokens
-17%
Agent turns
0%
Response time
-22%
Model gemini-3.6-flashMeasured 8/16/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
If a player generates a WantsToAttack intent targeting a monster, but that monster dies earlier in the same turn schedule, how does intent removal prevent invalid operations?
What was checked, without and with the skill
Checked
Without skill
With skill
Validate target existence in the attack resolution system before applying damage
Passed
Passed
Delete invalid or processed intent components prior to phase advancement
Missed
Passed
case-11 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md26 lines2 files
Rust Turn Intent Systems
Use this skill to make turn-based gameplay deterministic and easy to extend.
Separate decision systems from resolution systems: input and AI create intents;
movement, combat, inventory, and end-turn systems resolve them.
Core Workflow
Define the allowed turn phases in one enum.
Run different system schedules or branches for input, player resolution,
monster resolution, and terminal states.
Convert input and AI decisions into intent components or messages.
Resolve intents in shared systems so players and monsters use the same rules.
Remove or mark intents after processing.
Advance the turn state in one end-turn boundary.
Read Next
Read references/turn-intent-patterns.md for phase design, intent messages,
ordering rules, and review checks.
Source Notes
Guidance is transformed and paraphrased from Hands-On Rust Chapters 7, 8,
9, and 13 and from the official companion source repository. The patterns are
generalized for Rust ECS projects and do not require using Legion.