dojo-model

Generate Cairo models with Dojo ECS patterns for game state.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/steebchen/proof-of-war --skill dojo-model-steebchen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dojo-model
Source: https://github.com/steebchen/proof-of-war/tree/main/.agents/skills/dojo-model
Command: npx skills add https://github.com/steebchen/proof-of-war --skill dojo-model-steebchen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create Dojo models for storing game state with proper key definitions, trait derivations, and ECS patterns.

Core Features & Use Cases

Generates Cairo model structs with:

  • #[dojo::model] attribute
  • Required trait derivations (Drop, Serde)
  • Key field configuration (#[key])
  • Field types appropriate to your data

Patterns include Player-Owned Models, Composite Keys, Global Singletons, and ECS Composition.

Quick Start

Define a new Dojo model by specifying its name, key fields, and any data fields you want to store.

Frequently Asked Questions about dojo-model

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

FAQPage Schema
How do I define a Dojo model in Cairo for game state?

Defining a Dojo model in Cairo requires adding the #[dojo::model] attribute to your struct, configuring key fields with #[key], and deriving the Drop and Serde traits for proper ECS game state serialization.

What Dojo ECS patterns are available for structuring game state?

Dojo supports several ECS patterns for structuring game state, including Player-Owned Models for individual entities, Composite Keys for multi-field identifiers, Global Singletons, and ECS Composition for flexible entity design.

When should I use composite keys in a Dojo model?

You should use composite keys in a Dojo model when a single entity requires multiple fields to form a unique identifier, allowing you to structure complex game state relationships beyond simple player-owned models.

Does a Dojo model require specific trait derivations to function?

Yes, a Dojo model requires specific trait derivations to function properly. Your Cairo structs must derive both the Drop and Serde traits to ensure the game state can be serialized correctly within the ECS framework.

How do I configure a global singleton in Dojo?

To configure a global singleton in Dojo, you define a model without player-owned key fields, creating a single source of truth for shared game state data accessible across all entities in the world.