n1ckyb/skills/game-rules-engine

Claude Code and agent skill by n1ckyb/skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Owns the deterministic puzzle simulation — board, pieces, placement, clearing, scoring, game-over. Use when changing any rule of how the game actually works.

Install

npx vskill@latest install n1ckyb/skills/game-rules-engine

SKILL.md

The same SKILL.md was published earlier as majiayu000/claude-skill-registry/game-rules-engine.

game-rules-engine

Purpose

Own the deterministic puzzle simulation. This skill guards the single most important asset in the project: one implementation of the rules that the client, the server, the tests and the AI all agree on.

When to invoke

  • Any change to board behaviour, piece placement, clearing, scoring, combos or game-over
  • Adding or altering a rule, however small
  • Any change to applyAction or the event log
  • When another skill's change needs a new engine capability

Inputs

  • The rule change being requested, and why
  • The current rules_version
  • docs/architecture/game-engine.md

Responsibilities

Board representation · piece representation · legal placement · line and column detection · clearing · scoring · game-over detection · deterministic simulation · the event log.

Process

  1. State the rule in prose first. If it cannot be written as one unambiguous sentence, it is

not ready to implement. Ambiguity here becomes a desync later.

  1. Write the test before the code. Including the nasty case, not just the happy path.
  2. Implement as a pure state transition: (state, action, rules) -> [newState, events].
  3. Check the rule is expressible as configuration. If it needs a literal in a function body,

the rules schema is wrong — fix the schema, not the function.

  1. Decide whether observable behaviour changed. If yes → bump rules_version and add a new

golden replay; never edit an existing one.

  1. Update docs/architecture/game-engine.md if a boundary moved.

Constraints

  • No rules change ships without tests in the same commit. This is not negotiable and it is

the main thing this skill exists to enforce.

  • Integer-only simulation math. No Math.sin/cos/pow/exp/log, no floats in anything hashed.
  • No Math.random(), no Date.now(), no performance.now(). Time and randomness are inputs.
  • No imports from /client, /server, /platform, or any renderer or audio library.
  • applyAction is pure and total: it never mutates its input, never throws on an illegal

action, and never half-applies. A partially applied action is the worst failure mode in a networked game.

  • Events must carry everything consumers need. If the renderer has to recompute what cleared,

the event is under-specified.

  • Battle mechanics extend the engine; placement logic does not learn about attacks.

Outputs

  • The rule change, its tests, and a golden replay if behaviour changed
  • An updated rules schema if the change introduced a new configurable
  • A note to game-balance if the change affects any tunable number

Testing expectations

Unit tests for the rule. Property tests for any invariant it touches. A golden replay for any behaviour change. Specifically cover: almost-full boards, simultaneous row+column clears (including the intersection-counted-twice bug), boards where no piece fits, multi-clears, and attack+defence resolving on the same turn.

Test failure output must print the board (■ · X), the action and the events. A board-game test that fails with expected true, got false has wasted an hour.

Consults

piece-generator (sequence changes) · battle-system (battle events) · board-analysis (metrics) · game-test-engineer (coverage) · game-balance (tunable numbers) · replay-debugger (version pinning)

Definition of done

The rule is stated in one sentence, expressed as configuration, covered by a test that would fail without it, and — if behaviour changed — pinned by a new rules_version with old replays still verifying.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/n1ckyb/skills/game-rules-engine/badge)](https://verified-skill.com/skills/n1ckyb/skills/game-rules-engine)

Something wrong with this skill or its page? Tell us.