component-workflow

Guide ECS component creation with serialization, editor UI, and DI registration.

13|2|Updated Jul 17, 2023
One-click install
npx skills add https://github.com/kateusz/GameEngine --skill component-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-workflow
Source: https://github.com/kateusz/GameEngine/tree/main/.claude/skills/component-workflow
Command: npx skills add https://github.com/kateusz/GameEngine --skill component-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers in creating new Entity Component System (ECS) components, ensuring consistency with established architectural patterns. It covers everything from component class definition to JSON serialization, editor UI implementation, and dependency injection registration, preventing inconsistent or incorrect component implementations.

Core Features & Use Cases

  • Component Class Creation: Follow best practices for defining data-only component classes.
  • Serialization Support: Implement standard or custom JSON serialization for component data.
  • Editor UI Implementation: Create intuitive component editors for the Properties panel using the engine's UI infrastructure.
  • Dependency Injection: Properly register component editors and their dependencies within the DryIoc container.
  • Use Case: When adding a new ParticleEmitterComponent to the engine, this Skill ensures it's correctly structured, serializes its properties (like MaxParticles, EmissionRate), has a visual editor in the Properties panel, and integrates seamlessly with the engine's DI system.

Quick Start

Guide me through creating a new ParticleEmitterComponent including its class definition, editor UI, and DI registration.

Frequently Asked Questions about component-workflow

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

FAQPage Schema
How do I create a new ECS component with serialization support?

Creating an ECS component involves defining a data-only class, implementing JSON serialization for its properties, and registering it in the dependency injection container. This Skill guides you through each step—from component class structure to serialization patterns—ensuring your component integrates correctly with the engine's architecture and persists data reliably.

What's the best way to build a component editor UI for the Properties panel?

Component editors leverage the engine's UI infrastructure—UIPropertyRenderer, VectorPanel, and LayoutDrawer—with instance-based IComponentEditor implementations using constructor injection. This Skill covers implementing these editors with drag-and-drop support and integrating them into ComponentSelector, so your component properties appear and function correctly in the editor UI.

How do I register a component editor in the DryIoc dependency injection container?

Component editor registration in DryIoc requires proper dependency mapping in your editor project's DI setup. This Skill shows how to wire component editors and their dependencies so they're discoverable by the engine's UI workflow and available when users interact with components in the Properties panel.

Can I use custom JSON serialization for ECS component data?

Yes. This Skill covers both standard and custom JSON serialization patterns for component properties, allowing you to control how data is persisted and loaded. Custom serialization is useful when component properties require special formatting or transformation beyond default handling.

Do I need to implement IComponentEditor for every new component?

IComponentEditor implementation is required to provide a visual editor in the Properties panel. This Skill explains why instance-based editors with constructor injection are the established pattern, and walks through building one so users can inspect and modify your component's properties in the editor UI.