new-component

Add ECS components to Rogueverse with serialization and inspector registration.

Updated Nov 16, 2025
One-click install
npx skills add https://github.com/clagraff/Rogueverse --skill new-component-clagraff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-component
Source: https://github.com/clagraff/Rogueverse/tree/main/.claude/skills/new-component
Command: npx skills add https://github.com/clagraff/Rogueverse --skill new-component-clagraff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes the process of adding a new ECS component to the Rogueverse codebase, ensuring consistent patterns, serialization, and inspector/UI integration.

Core Features & Use Cases

  • Adds a new ECS component class to lib/ecs/components.dart following the project conventions (marker, data, or intent).
  • Generates or updates the mapper via build_runner and integrates inspector metadata for the UI.
  • Registers the component in the properties panel and considers whether a System or Interaction Definition is needed.
  • Supports a repeatable workflow for future components, reducing boilerplate and friction.

Quick Start

Create the component in lib/ecs/components.dart, run dart run build_runner build --delete-conflicting-outputs, add inspector metadata, export in sections.dart, and register the metadata in properties_panel.dart.

Frequently Asked Questions about new-component

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

FAQPage Schema
How do I add a new ECS component to a Dart project using build_runner?

Adding a new ECS component requires defining the class in components.dart, running build_runner to generate mappers, and wiring inspector metadata for UI registration. This ensures consistent serialization and inspector integration.

What types of ECS components can I create for the Rogueverse codebase?

You can create marker, data, or intent ECS components. Each type follows standardized patterns for serialization, inspector metadata generation, and properties panel registration within the Rogueverse architecture.

Do I need to manually update the properties panel when registering a new ECS component?

Yes, you must register the component metadata in properties_panel.dart and export it in sections.dart. These manual steps ensure the new ECS component appears correctly in the inspector UI.

Why does build_runner need to run after adding an ECS component?

Running build_runner generates or updates the mapper required for the new ECS component. This step ensures serialization logic is correctly generated before wiring inspector metadata and UI registration.

When should I add a System or Interaction Definition after creating an ECS component?

You should consider adding a System or Interaction Definition when the new ECS component requires active processing or user interaction. The workflow evaluates whether these additional definitions are necessary for component functionality.

What is the standard workflow for adding ECS components to reduce boilerplate?

The standard workflow involves creating the class in components.dart, running build_runner, adding inspector metadata, exporting in sections.dart, and registering in properties_panel.dart. This repeatable process reduces boilerplate and friction.