patterns
Skill1 starsChanged yesterdayApache-2.0View on GitHub
Use when structuring a new Godot game or system, separating gameplay rules and state from visuals, or when a design question names a pattern such as state machine, object pool, event bus, singleton or component.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- adelaidasofia/claude-patternstheir own version, first seen Nov 29, 2026
- anthropics/claude-plugins-officialtheir own version, first seen Nov 8, 2026
- e-reitbauer/habitstheir own version, first seen Nov 8, 2026
- nklisch/skilltaptheir own version, first seen Nov 8, 2026
- tizonai/hyperuitheir own version, first seen Oct 9, 2026
- nklisch/krometrailtheir own version, first seen Sep 30, 2026
Used with
Projects with it also use setup.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillsetup
Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- anthropics/claude-plugins-official★ 49ksame name
- ai-analyst-lab/ai-analyst★ 304same name
- nklisch/claude-code-modes★ 116same name
- mycelium-hq/ai-brain-starter★ 60same name
- jmylchreest/aide★ 19same name
- zllovesuki/cloudflare-agent-skills★ 9same name
- nklisch/skills★ 8same name
- nklisch/skilltap★ 7same name
- Lukasbrujula/claude-code-framework★ 4same name
- nklisch/krometrail★ 3same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- algorithmsSkill
- animationSkill
- anti-cheatSkill
- asset-pipelineSkill
- automation-hooksSkill
- calendarSkill
- cameraSkill
- console-certSkill
- debug-toolsSkill
- determinismSkill
- game-aiSkill
- game-audioSkill
- game-dataSkill
- game-designSkill
- game-juiceSkill
- game-planSkill
- game-playtestSkill
- gameSkill
- game-telemetrySkill
- godot-addonsSkill
- godot-diagnoseSkill
- godot-editor-bridgeSkill
- godot-export-releaseSkill
- godot-pitfallsSkill
- godot-shaders-vfxSkill
- godot-test-loopSkill
- inputSkill
- kit-reviewSkill
- kitSkill
- legalSkill
- llmSkill
- localizationSkill
- lookSkill
- mathSkill
- mobile-webSkill
- moddingSkill
- multiplayerSkill
- narrativeSkill
- new-gameSkill
- performanceSkill
- procgenSkill
- progressionSkill
- release-readinessSkill
- retroSkill
- savesSkill
- serversSkill
- steamSkill
- store-pageSkill
- typographySkill
- ui-accessibilitySkill
- ui-flowsSkill
- verify-before-doneSkill
- weekly-reviewSkill
- xrSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Keep gameplay deterministic, testable without a renderer and easy for an agent to verify: run it in the simplest space that works, and …
- Very specific: line 26
Run state (RunState, the map, encounters) as plain C# classes owned by one autoload, not spread over nodes.
- Very specific: line 68
Singleton: put the run's state in plain C# classes owned by one autoload (State in plain C#, above), so it is testable without Godot.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Game programming patterns in Godot 4
Robert Nystrom's Game Programming Patterns (gameprogrammingpatterns.com) names the problems games keep solving. Godot already solves many of them; reach for the engine first, add a pattern when the problem actually shows up, and never for its own sake. Each row links the book's chapter; the summaries are ours.
Simulate simple, present rich
Keep gameplay deterministic, testable without a renderer and easy for an agent to verify: run it in the simplest space that works, and mirror it onto the visuals every frame.
- Physics and rules in 2D (
CharacterBody2DwithMoveAndCollide, one-way platforms), presentation in 3D: a view node copies positions with a fixed scale (40 px = 1 m). Visual styles become swappable, and gameplay stays deterministic and testable headless. - A
Visualwrapper owns flash, tint and squash for every actor, so effects are added in one place. - Style definitions (stage, actors, colour grade) as data classes, so a level's look is a value, not a scene fork.
- Visuals mirror state; nothing in a visual decides gameplay.
State in plain C#
Run state (RunState, the map, encounters) as plain C# classes owned by one autoload, not spread over nodes. Plain
classes are testable with xUnit in milliseconds (godot-test-loop), can be saved by serialising one object, and survive
scene changes. Nodes read state and send intents; they do not own the rules. Every random decision comes from a seeded,
per-decision generator (procgen).
What Godot gives you, and when to add your own
| Pattern | Godot already has | Add it yourself when | Not when |
| Command | InputMap actions; UndoRedo | you need replays, undo, AI and player sharing one action type, or input recorded for a bot | a button just calls a method |
| Flyweight | shared Resources (a .tres loads once); MultiMesh | thousands of instances share data (tiles, foliage, bullets) | local_to_scene or Duplicate() on resources that never change |
| Observer | signals; C# events | a child reports up, or many systems react to one event | the caller needs a result back: call a method |
| Prototype | PackedScene.Instantiate(); Resource.Duplicate() | you spawn variants of a configured template | - |
| Singleton | autoloads | state must outlive scene changes (the run, settings, save) | as a shortcut to reach any node; keep autoloads few (too-many-autoloads) |
| State | AnimationTree state machine (animation only) | behaviour depends on mode: an enum and match/switch for a few states, a class per state for many | two booleans would do |
| Double Buffer | the renderer | every entity must read last tick's state while writing this tick's (cellular automata, simultaneous moves) | updates are naturally sequential |
| Game Loop | the engine; _PhysicsProcess at a fixed rate | never; tune physics_ticks_per_second, and --fixed-fps for bots | - |
| Update Method | _Process per node | thousands of similar entities: one manager loops plain data instead | a node is idle: SetProcess(false) |
| Bytecode | GDScript; the Expression class | designers or mods script behaviour safely at runtime | data in Resources is enough |
| Subclass Sandbox | inheritance in C# and GDScript | many similar behaviours (abilities, power-ups) share helpers in one base class | composition fits better: Component |
| Type Object | custom Resource types with [Export] fields | content types (enemy kinds, items) should be data, not classes | there are two kinds |
| Component | node composition; scenes | an entity mixes reusable behaviours (health, hitbox, loot) as child nodes | one script stays small and clear |
| Event Queue | CallDeferred; deferred signal connections | a sender must not wait for, or be re-entered by, the handler (audio requests, achievements) | the reaction must happen now |
| Service Locator | autoloads | tests or modes swap an implementation (audio, saves) behind an interface | the dependency can be passed in |
| Data Locality | MultiMesh; the servers (RenderingServer, PhysicsServer2D) | thousands of objects per frame: arrays of C# structs, no node each | a few hundred nodes are fine |
| Dirty Flag | global transforms are cached this way | a derived value is costly (UI text, paths, layout): recompute only when its input changed | the value is cheap |
| Object Pool | none | many short-lived objects (bullets, particles, damage numbers) and creating them hitches | creating them does not show in bench |
| Spatial Partition | the physics broadphase; Area2D/Area3D; space-state queries | many non-physics proximity queries per frame: a uniform grid | physics queries answer it |
Turns as named phases
A turn-based game (cards, tactics, board games, a battle menu) writes its turn as named phases in a plain class: an
enum such as Draw, Main, Combat, End and one method that moves to the next, rather than booleans scattered over nodes.
Each transition is a rule (Combat only after Main; End discards and passes play; a phase with nothing to do is skipped),
and each gets a test: start in one phase, act, assert the next phase and what it changed. Log every transition
([Turn] 3 Main -> Combat), so a replay or a bug report shows where a turn went wrong, and let nodes animate a phase
change, never decide one.
Godot-specific consequences
- Observer: C# events and lambdas on an autoload outlive the node that subscribed: unsubscribe in
_ExitTree(event-not-unsubscribed). In GDScript, a signal connected to a lambda is not dropped when its node is freed either. - Singleton: put the run's state in plain C# classes owned by one autoload (State in plain C#, above), so it is
testable without Godot; UI sends intents to it rather than writing its fields (
ui-mutates-state). - Component: reach siblings through exported
NodePaths or%UniqueName, not../..(parent-path). - Object Pool: pooled nodes kept off the tree are orphans; free the pool in
_ExitTree, or the orphan count climbs and every scene change leaks. Pre-warm the pool before gameplay so the first use does not hitch (performance). - Update Method / Data Locality: find nodes once in
_Ready, never in_Process(per-frame-lookup); allocate nothing per frame in C# (per-frame-alloc). Far from the player, run the simulation as plain data at a lower rate and give actors nodes only near the player (A-Life's offline mode); every AI system that runs this way gets a debug view, pause and time scale.
The names in brackets are the architecture runner's rules, which warn when the code drifts from these. A change that adds a
system, an autoload or a dependency between scenes goes to the godot-architect subagent first, which records the decision.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

