ecs — ecs architecture virtcon2, community, ecs architecture, ide skills, bytenetc framework, ecs setup for game development, ecs debugging techniques, ecs network synchronization, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for Game Development Agents working with bytenetc framework and requiring advanced Entity Component System management. ecs is a skill for working with the Entity Component System, including architecture, data flow, and entity serialization, using a custom sparse-set ECS framework with typed array storage

Features

Finding or modifying components, systems, or worlds using bytenetc framework
Understanding ECS architecture and data flow for efficient game development
Debugging ECS-related issues with typed array storage
Adding new components or systems to existing ECS projects
Working with entity serialization and network synchronization for seamless gameplay

# Core Topics

ThunbergOlle ThunbergOlle
[2]
[0]
Updated: 2/17/2026

Agent Capability Analysis

The ecs skill by ThunbergOlle is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for ecs architecture, bytenetc framework, ecs setup for game development.

Ideal Agent Persona

Ideal for Game Development Agents working with bytenetc framework and requiring advanced Entity Component System management.

Core Value

Empowers agents to efficiently find, modify, and debug components, systems, and worlds within the Entity Component System, leveraging bytenetc's custom sparse-set ECS framework with typed array storage, and facilitating entity serialization and network synchronization.

Capabilities Granted for ecs

Debugging ECS-related issues
Adding new components or systems
Understanding ECS architecture and data flow

! Prerequisites & Limits

  • Requires bytenetc framework
  • Specific to Entity Component System (ECS) architecture
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

ecs

Install ecs, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

ECS Skill

Use this skill when working with the Entity Component System (ECS), including:

  • Finding or modifying components, systems, or worlds
  • Understanding ECS architecture and data flow
  • Debugging ECS-related issues
  • Adding new components or systems
  • Working with entity serialization and network synchronization

Overview

This project uses bytenetc, a custom sparse-set ECS framework with typed array storage. Both server (packet_router) and client (game) maintain parallel ECS instances synchronized via Socket.io packets.

Key Locations

ECS Core Framework:

  • packages/bytenetc/src/lib/ - Core ECS implementation

Components:

  • packages/network-world-entities/src/lib/components/ - All component definitions
  • Common components: Position, Sprite, Velocity, Collider, Player, Building, Resource, Tile

Systems:

  • apps/packet_router/src/systems/ - Server-side systems (20 TPS tick loop)
  • apps/game/src/systems/ - Client-side systems (60 FPS render loop)

Entities:

  • packages/network-world-entities/src/lib/entities/ - Entity factory functions

Serialization:

  • packages/network-world-entities/src/lib/serializeConfig.ts - Component serialization config
  • packages/network-world-entities/src/lib/SerializationIDs.ts - Serialization ID definitions

Network Sync:

  • apps/packet_router/src/main.ts - Server tick loop and packet broadcasting
  • apps/game/src/scenes/Game.ts - Client packet handling and deserialization
  • apps/game/src/networking/Network.ts - Socket.io client wrapper

Quick Reference

Component Definition

typescript
1import { defineComponent, Types } from '@virtcon2/bytenetc'; 2 3export const MyComponent = defineComponent('myComponent', { 4 value: Types.i32, 5 position: Types.f32, 6 data: [Types.ui8, 32], // Fixed-size array 7});

Supported types: i8, i16, i32, f32, f64, ui8, ui16, ui32

World Management

typescript
1import { createWorld, deleteWorld, registerComponents } from '@virtcon2/bytenetc'; 2 3const world = createWorld('world-id'); 4registerComponents(world, [Position, Sprite, MyComponent]); 5deleteWorld(world); // Cleanup

Entity Operations

typescript
1import { addEntity, addComponent, removeEntity, removeComponent } from '@virtcon2/bytenetc'; 2 3const eid = addEntity(world); 4addComponent(world, Position, eid); 5 6// Set values (direct array access) 7Position.x[eid] = 100; 8Position.y[eid] = 200; 9 10removeComponent(world, Sprite, eid); 11removeEntity(world, eid);

Queries

typescript
1import { defineQuery, Has, Not, Changed, enterQuery, exitQuery } from '@virtcon2/bytenetc'; 2 3// Basic query - entities with both components 4const query = defineQuery(Position, Sprite); 5const entities = query(world); // Returns entity ID array 6 7// Modifiers 8const playerQuery = defineQuery(Position, Has(Player), Not(NPC)); 9const changedQuery = defineQuery(Changed(Position)); 10 11// Enter/Exit queries 12const newEntities = enterQuery(query)(world); 13const removedEntities = exitQuery(query)(world);

System Definition (Server)

typescript
1import { defineSystem } from '@virtcon2/bytenetc'; 2import type { SyncEntities } from '@virtcon2/network-packet'; 3 4export const createMySystem = (world: World) => { 5 const query = defineQuery(Position, MyComponent); 6 7 return defineSystem<SyncEntities>(({ worldData }) => { 8 const entitiesToSync: number[] = []; 9 const entitiesToRemove: number[] = []; 10 11 // Process entities 12 for (const eid of query(world)) { 13 Position.x[eid] += 1; 14 entitiesToSync.push(eid); 15 } 16 17 // Serialize for network 18 const serialized = defineSerializer( 19 getSerializeConfig(world)[SerializationID.MY_ENTITY] 20 )(world, entitiesToSync); 21 22 return { 23 sync: [{ serializationId: SerializationID.MY_ENTITY, data: serialized }], 24 removeEntities: entitiesToRemove, 25 worldData, 26 }; 27 }); 28};

System Definition (Client)

typescript
1export const createMyClientSystem = (world: World) => { 2 const query = defineQuery(Position, Sprite); 3 4 return (state: State) => { 5 for (const eid of query(world)) { 6 const sprite = state.spritesById[eid]; 7 if (sprite) { 8 sprite.x = Position.x[eid]; 9 sprite.y = Position.y[eid]; 10 } 11 } 12 return state; 13 }; 14};

Network Synchronization Flow

  1. Server (packet_router):

    • Runs tick loop at 20 TPS (apps/packet_router/src/main.ts)
    • Systems process entities and return serialized data
    • Broadcasts SYNC_SERVER_ENTITY and REMOVE_ENTITY packets via Socket.io
  2. Client (game):

    • Receives packets in Game.update() (apps/game/src/scenes/Game.ts)
    • Deserializes entities into local ECS world
    • Runs client systems at 60 FPS to update Phaser sprites
  3. Serialization:

    • Defined in serializeConfig.ts - maps SerializationID to component lists
    • Entities serialize to arrays: [componentName, fieldName, value]
    • Only specified components are synced per entity type

Common Tasks

Adding a New Component

  1. Create component definition in packages/network-world-entities/src/lib/components/
  2. Export from packages/network-world-entities/src/lib/components/index.ts
  3. Add to serialization config in serializeConfig.ts if network-synced
  4. Register in world initialization (both server and client if synced)

Adding a New System

Server:

  1. Create in apps/packet_router/src/systems/
  2. Import and add to tickSystems() in apps/packet_router/src/main.ts

Client:

  1. Create in apps/game/src/systems/
  2. Import and call in Game.update() in apps/game/src/scenes/Game.ts

Adding a New Entity Type

  1. Create factory function in packages/network-world-entities/src/lib/entities/
  2. Add SerializationID in SerializationIDs.ts
  3. Add serialization config in serializeConfig.ts
  4. Create spawning logic in appropriate system

Debugging

Check which entities have a component:

typescript
1const query = defineQuery(MyComponent); 2console.log('Entities with MyComponent:', query(world));

Check component values:

typescript
1console.log('Position:', { x: Position.x[eid], y: Position.y[eid] });

Track component changes:

typescript
1const changedQuery = defineQuery(Changed(Position)); 2console.log('Entities with changed Position:', changedQuery(world));

Important Notes

  • Maximum 3,000 entities per world
  • Component data stored in typed arrays for performance
  • Direct array access (e.g., Position.x[eid]) for reading/writing values
  • Server systems run at 20 TPS, client systems at 60 FPS
  • Not all components need network sync (client-only rendering components)
  • Use enter/exit queries to detect new/removed entities efficiently

Documentation

Full details: /docs/ECS_AND_NETWORK_SYNC.md

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is ecs?

Ideal for Game Development Agents working with bytenetc framework and requiring advanced Entity Component System management. ecs is a skill for working with the Entity Component System, including architecture, data flow, and entity serialization, using a custom sparse-set ECS framework with typed array storage

How do I install ecs?

Run the command: npx killer-skills add ThunbergOlle/virtcon2. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for ecs?

Key use cases include: Debugging ECS-related issues, Adding new components or systems, Understanding ECS architecture and data flow.

Which IDEs are compatible with ecs?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for ecs?

Requires bytenetc framework. Specific to Entity Component System (ECS) architecture.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add ThunbergOlle/virtcon2. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use ecs immediately in the current project.

Related Skills

Looking for an alternative to ecs or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI