gecs

Implement Entity-Component-System frameworks for Godot 4.x with verified API usage.

511|44|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/RandallLiuXin/GodotMaker --skill gecs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gecs
Source: https://github.com/RandallLiuXin/GodotMaker/tree/main/skills/core/gecs
Command: npx skills add https://github.com/RandallLiuXin/GodotMaker --skill gecs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

gecs eliminates unreliable, invented ECS API usage by providing an authoritative, reference-backed Entity-Component-System framework spec for Godot 4.x, so your agent can generate real, correct ECS code instead of guessing.

Core Features & Use Cases

  • ECS API coverage for GodotMaker: Defines the expected behavior and relationships between Entity, Component, System, World, queries, observers, and safe structural mutation via CommandBuffer.
  • Querying, relationships, and reactivity: Supports common patterns like component composition queries, entity-to-entity relationships, and observer callbacks for component lifecycle/property changes.
  • Safety-focused ECS coding guidance: Includes mandatory gotchas and naming/file conventions to prevent common runtime and compilation failures (e.g., Resource export defaults, class vs instance usage, cmd for structural changes during iteration).

Use it when your task involves ECS architecture in Godot 4.x—creating entities with components, writing systems that process queried entities, setting up the ECS World and system groups, debugging query/caching behavior, or implementing observers/relationships.

Quick Start

Ask for gecs help like: "Using gecs for Godot 4.x, create the ECS components C_Health and C_Position, define a Player Entity that returns fresh component instances in define_components(), and write a HealthSystem that queries entities with both components and safely updates component data each frame."

Frequently Asked Questions about gecs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement an Entity-Component-System framework in Godot 4?

To implement an Entity-Component-System framework in Godot 4, define entities with fresh component instances, construct system queries to process matching entities, and manage structural mutations safely via CommandBuffer to prevent runtime errors.

How do you safely change entity components during system iteration in Godot ECS?

Safely change entity components during system iteration by routing structural mutations through a CommandBuffer, ensuring system queries remain stable and preventing runtime failures when adding or removing components mid-frame.

How do system queries work when processing entities with multiple components in Godot?

System queries work by filtering entities that possess specific component combinations, allowing systems to iterate exclusively over matching instances and update their component data efficiently each frame.

Can I set up observers for component lifecycle changes in Godot 4 ECS?

Yes, you can set up observers in Godot 4 ECS to trigger reactive callbacks for component lifecycle and property changes, enabling event-driven logic when specific components are added, modified, or removed.

What are common pitfalls when defining components and entities in Godot ECS?

Common pitfalls include using class-level access instead of fresh component instances for entities, improper Resource export defaults, and unsafe structural mutations during iteration, which cause compilation and runtime failures.

How do you define entity-to-entity relationships in a Godot 4 ECS World?

Define entity-to-entity relationships in a Godot 4 ECS World by linking specific components that reference other entities, allowing systems to query and process hierarchical or interconnected gameplay data reliably.