game-design-patterns

game-design-patterns is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 62 tokens per session (2,376 once invoked), scanned A, original, MIT.

A guide to common architecture patterns for video games, such as entity-component systems, game loops, state machines, event buses, and object pools. These patterns organise game objects and the systems that update them.

In plain words
What is it for?
Use it to design fixed-timestep updates, character state machines, reusable object pools, collision and AI systems, event communication, and undo or replay support.
Why use it?
It helps match a design approach to problems such as unstable physics, slow collision checks, complex character behaviour, memory-allocation spikes, or tightly connected systems.

Skill for Claude CodeCodex

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

Good fit Use it to design fixed-timestep updates, character state machines, reusable object pools, collision and AI systems, event communication, and undo or replay support.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/game-design-patterns
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 khalilbenaz/claude-skills-collection --skill game-design-patterns
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

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-design-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/game-design-patterns/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/game-design-patterns)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/game-design-patterns"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/game-design-patterns/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-design-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/game-design-patterns"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/game-design-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,376 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 pass 7 Sept 2026
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.00062 $0.02376
Opus 5 $0.00031 $0.01188
Sonnet 5 $0.00012 $0.00475
Haiku 4.5 $0.00006 $0.00238

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

Security

Grade A, and why

game-design-patterns 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 9d 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.

dev-skills/game-design-patterns/SKILL.md · 318 lines

How it starts

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

Game Design Patterns

Workflow

1. Identifier le besoin avant de choisir un pattern

Symptôme Pattern adapté
Hiérarchies d'héritage explosives Component / ECS
Stutters de rendu ou physique instable Game Loop fixe/variable
Comportements personnage complexes FSM / HSM
Couplage fort entre systèmes Observer / Event Bus
GC spikes (bullets, ennemis) Object Pooling
Besoin undo/replay/réseau Command
Collisions/IA lentes sur grande map Spatial Partitioning
Manager global difficile à tester Service Locator / DI

2. Game Loop — timestep fixe + rendu variable

Principe : physique/IA à rate fixe (50–60 Hz), rendu aussi vite que possible avec interpolation.

// C# pseudocode — double timestep classique
const float FIXED_DT = 0.02f; // 50 Hz
float accumulator = 0f;

void Update(float realDeltaTime)
{
    accumulator += realDeltaTime;
    while (accumulator >= FIXED_DT)
    {
        FixedSimulate(FIXED_DT);   // physique, IA
        accumulator -= FIXED_DT;
    }
    float alpha = accumulator / FIXED_DT; // [0,1] pour interpolation
    Render(alpha);
}

Pièges :

  • Ne jamais utiliser Time.deltaTime directement pour la physique.
  • Limiter accumulator (maxAccumulator) pour éviter la "spiral of death".
  • Unity : utiliser FixedUpdate pour physique, LateUpdate pour caméra.

3. Component Pattern & ECS

Composition over inheritance — découper les entités en composants indépendants.

// Unity MonoBehaviour — composition classique
public class Player : MonoBehaviour
{
    [SerializeField] HealthComponent health;
    [SerializeField] MovementComponent movement;
    [SerializeField] WeaponComponent weapon;
}

ECS (Unity DOTS) — quand > ~1 000 entités similaires :

// Component (struct pure, zéro allocation)
public struct Velocity : IComponentData { public float3 Value; }

// System
[BurstCompile]
public partial struct MoveSystem : ISystem
{
    public void OnUpdate(ref SystemState state)
    {
        foreach (var (transform, vel) in
            SystemAPI.Query<RefRW<LocalTransform>, RefRO<Velocity>>())
        {
            transform.ValueRW.Position += vel.ValueRO.Value * SystemAPI.Time.DeltaTime;
        }
    }
}

Read the full file on GitHub · 318 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. 9d ago First seen · 318 lines · 62 tokens per session scan A 3f59bcf6b789

Subscribe to this mod's changes

game-design-patterns is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 19d ago), licensed MIT. It adds 62 tokens to every session and 2,376 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

rbx-dev

Meta-skill for complete Roblox game development with Rojo — the entry point that knows and unifies the three specialist skills /rojo (filesystem→Studio sync, project setup), /rbx-studio (editor, MCP, assets, malware scan) and /game-design (roles, workflows, GDD). Use this skill for ANY Roblox game-dev undertaking…

ellmos-ai/skills · 0 tokens

rojo

Operating Rojo — the filesystem-to-Roblox-Studio sync tool for professional Roblox development in VS Code / Claude Code instead of the Studio editor. Use this skill whenever Rojo is involved: rojo serve/rojo build, writing or debugging default.project.json, rokit/rokit.toml and tool versions (Rojo, Lune, Wally)…

ellmos-ai/skills · 0 tokens

game-design

How game development works as a process — roles, subtasks, workflows and role descriptions, especially (but not only) for Roblox. Use this skill when it's about the ORGANIZATION of game dev rather than concrete code: Which roles exist (Creative Director, Engineer, Artist, Polish/Audio, Business, QA-Tester, Game…

ellmos-ai/skills · 0 tokens

image-to-3d-pipeline

Transformez une image 2D en modèle 3D animé prêt pour le web ou le jeu en moins de 30 minutes, en utilisant le workflow Dilum Sanjaya (Hunyuan3D + Mixamo). Use when: Créer un personnage 3D pour un site web - Mascotte, avatar, illustration interactive; Prototyper un asset de jeu - Character design, props…

guia-matthieu/clawfu-skills · 140 tokens

rbx-studio

Operating Roblox Studio for game development — the visual editor in which the 3D scene is built, tested, and published. Use this skill for: Studio basics (Explorer, Workspace, play-test, saving the place as .rbxl), the interplay with Rojo (Connect, scene-vs-code mode), AI control of Studio via the Roblox-Studio-MCP…

ellmos-ai/skills · 0 tokens

level-design

Level design fundamentals, pacing, difficulty progression, environmental storytelling, and spatial design for engaging gameplay experiences.

medy-gribkov/arcana · 23 tokens