dojo-system

Generate Dojo system contracts implementing game logic on Starknet.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Kepler22bee/House-of-Stark --skill dojo-system-kepler22bee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dojo-system
Source: https://github.com/Kepler22bee/House-of-Stark/tree/main/contracts/.agents/skills/dojo-system
Command: npx skills add https://github.com/Kepler22bee/House-of-Stark --skill dojo-system-kepler22bee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables developers to implement deterministic game logic on Starknet by providing clear patterns to read and modify world models, emit events, and handle player actions so game behavior is consistent and auditable.

Core Features & Use Cases

  • System scaffolding: Opinionated contract structure with interface, implementation, and world access patterns to jumpstart system development.
  • Model read/write: Guidance on safely reading and writing models via world storage and on structuring stateless system logic.
  • Event-driven actions: Examples and best practices for declaring and emitting events to record game actions like movement, spawn, dig, and combat.
  • Use Case: Implement a MovementSystem that validates moves, updates Position and Moves models, and emits a Moved event for external listeners.

Quick Start

Create a move system that updates Position based on Direction, writes updated models to world storage, and emits a Moved event.

Frequently Asked Questions about dojo-system

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

FAQPage Schema
How do I write a Dojo system contract in Cairo to modify world models?

To write a Dojo system contract in Cairo, use the #[dojo::contract] macro to scaffold stateless logic that reads and writes models via world storage access patterns. Systems implement game actions and emit events to record changes for external listeners.

What is the best way to emit events for game actions like movement and combat in Starknet?

The best way to emit events for game actions in Starknet is using Dojo's event emission macros within system contracts. You declare events like Moved or Spawned, then emit them after validating actions and updating models, ensuring game behavior remains deterministic and auditable.

How do I implement player movement validation in a Dojo game system?

To implement player movement validation in a Dojo game system, create a MovementSystem that validates moves against game rules, updates Position and Moves models via world storage, and emits a Moved event. System logic remains stateless, relying on world read and write operations.

Can I use Starknet caller and timestamp utilities in Dojo system contracts?

Yes, you can use Starknet caller and timestamp utilities in Dojo system contracts. These built-in utilities allow systems to verify player identities and record action times, ensuring deterministic game logic execution when modifying model state or emitting events.

Does Dojo support stateless system logic for spawning and inventory management?

Dojo supports stateless system logic for spawning and inventory management by reading and writing models through world storage access patterns. Systems do not hold local state; instead, all game data persists in world models, which the system contract queries and updates during execution.

Why does my Dojo system contract fail to update world model state on Starknet?

A Dojo system contract fails to update world model state when it does not correctly use world storage access patterns for model read and write operations. Ensure your #[dojo::contract] properly interfaces with world storage to modify models and emit events deterministically.