randallliuxin/godotmaker/gecs
Claude Code and agent skill by randallliuxin/godotmaker
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
gecs ECS framework API reference — the Entity-Component-System addon for Godot 4.x used by this project. Covers Entity, Component, System, World, QueryBuilder, Relationship, Observer, CommandBuffer, SystemTimer. Use when the task involves ECS architecture: creating entities with components, defining component data classes (C_ prefix), writing game logic systems, querying entities by component composition, entity relationships or links, reactive observers for component changes, safe structural changes during iteration, system tick rates, ECS world setup, debugging ECS queries or cache, or deferred entity destruction. Also trigger on gecs API calls: q.with_all(), ECS.world, ECS.process(), define_components(), cmd.add_component(). gecs has zero LLM training data — without this skill all ECS API calls will be fabricated. NOT relevant for standard Godot subsystems (physics, animation, UI, tilemap, shader, particles, navigation, signals, audio) unless explicitly connected to ECS.
Install
npx vskill@latest install randallliuxin/godotmaker/gecsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as randallliuxin/godotmaker/gecs.
gecs — ECS Framework for Godot 4.x
$ARGUMENTS
gecs is the ECS backend for GodotMaker. It has zero LLM training data coverage — all API knowledge must come from this skill.
Core Concept Mapping
| gecs Class | Godot Base | Key Insight | |
|---|---|---|---|
Entity | extends Node | Entity IS a Node — lives in scene tree, can have child nodes | |
Component | extends Resource | Pure data, @export properties with defaults, no logic | |
System | extends Node | Contains game logic, queries entities, placed in scene tree | |
World | extends Node | Manages all entities/systems, archetype storage, query engine | |
QueryBuilder | extends RefCounted | Chain API: with_all/with_any/with_none, auto-cached | |
Relationship | extends Resource | Pair (relation_component, target), archetype-level indexing | |
Observer | extends Node | Reactive: fires on component add/remove/change events | |
CommandBuffer | extends RefCounted | Safe structural changes during iteration via cmd | |
ECS | Autoload singleton | Global access: ECS.world, ECS.process(delta, group) |
Quick Start
Naming Conventions
| Type | Class Name | File Name | Example | |
|---|---|---|---|---|
| Component | C_Name | c_name.gd | C_Health / c_health.gd | |
| System | NameSystem | s_name.gd | MovementSystem / s_movement.gd | |
| Entity | Name | e_name.gd | Player / e_player.gd | |
| Observer | NameObserver | o_name.gd | HealthUIObserver / o_health_ui.gd | |
| Relationship component | R_Action | r_action.gd | R_ChildOf / r_child_of.gd |
Common Operations
Entity
Query
CommandBuffer (safe structural changes during iteration)
Relationships
System Groups & Scene Architecture
SystemGroup nodes auto-assign their name as the group property of child Systems.
Reference Files
Read the relevant file when you need detailed API beyond this quick reference:
| Need | File | When to read | |
|---|---|---|---|
| Entity lifecycle, prefabs, spawning | `references/entity.md` | Creating entities, scene prefab setup, on_ready/on_destroy | |
| Component design, @export patterns | `references/component.md` | Defining new components, constructor patterns | |
| System impl, CommandBuffer, timers | `references/system.md` | Writing systems, sub_systems, tick rates, deps, parallel | |
| World setup, entity management | `references/world.md` | World init, add/remove entities/systems, process groups | |
| Queries, Relationships, Observers | `references/query.md` | Complex queries, entity linking, reactive systems | |
| Debug tools, profiling | `references/debug.md` | Runtime inspection, editor debugger, performance | |
| Naming, file org, scene architecture | `references/patterns.md` | Project structure, cross-cutting patterns, ECS_DESIGN adaptation |
MANDATORY: Read gotchas.md Before Writing ECS Code
Before writing ANY gecs code, read `gotchas.md`. It contains 19 hard-won pitfalls with wrong→correct code examples.
If you hit a compile or runtime error, check gotchas.md first — most ECS errors are covered there.
Critical Gotchas (summary)
- All `@export` properties MUST have default values — Godot errors on Resource export without defaults
- `get_component()` takes the CLASS, not an instance —
entity.get_component(C_Health)notentity.get_component(health_instance) - Never put logic in Components — all behavior belongs in Systems
- Use `cmd` for structural changes during iteration — direct add/remove during
process()causes entity skipping - Avoid `with_group()` in queries — ~50x slower than
with_all([C_Tag])due to SceneTree traversal. Use tag components instead - `define_components()` must return fresh `.new()` instances — returning cached/shared instances causes state leakage between entities
- Entity extends Node, NOT Node2D —
entity.positiondoes NOT work. Store position in aC_Positioncomponent. See gotchas.md G1 - Component `_init()` must have default params —
func _init(v: float = 0.0)soComponent.new()works for duplication - Components are inaccessible before `add_entity()` —
get_component()returns null until entity enters scene tree. See gotchas.md G2 - Never call `system.process()` directly in tests — causes Array[Entity] type error + CommandBuffer not flushed. Never write `test_system_has_query` —
qis null outside World. See G10, G14 - `add_system()` second param is `bool`, not group name — set
system.groupbeforeadd_system(). See G15 - `world.process(delta)` without group skips grouped systems — must pass group name. See G16
- NodePath `@export` in `.tscn` unreliable for World — set
entity_nodes_root/system_nodes_rootin_init(). See G17 - Area2D overlap data stale in `_process` — overlap systems must run in
physicsgroup. See G18 - `:=` type inference fails with ternary + null — use explicit type annotation. See G19
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/core/gecs/SKILL.md
Popularity
- Repository stars
- 547
- Repository forks
- 48
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
pluginCustom plugin integration
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
[](https://verified-skill.com/skills/randallliuxin/godotmaker/gecs)