dojo-system

Generate Cairo Dojo contract systems for game logic and on-chain model state.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/shariqazeem/Prophecy-Roguelite --skill dojo-system-shariqazeem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dojo-system
Source: https://github.com/shariqazeem/Prophecy-Roguelite/tree/main/.agents/skills/dojo-system
Command: npx skills add https://github.com/shariqazeem/Prophecy-Roguelite --skill dojo-system-shariqazeem

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the friction of hand-crafting Dojo/Cairo system contracts by providing clear patterns and templates to implement game logic, model access, event emission, and caller authorization so teams can iterate faster and reduce subtle on-chain bugs.

Core Features & Use Cases

  • System scaffolding: Generate Dojo contract skeletons with interface traits and #[dojo::contract] implementations ready for world access.
  • Model I/O and events: Read and write models using ModelStorage/ModelValueStorage, emit structured events using EventStorage, and generate helper functions for world namespaces.
  • Common game systems: Produce movement, combat, inventory, and spawn systems that validate input, update models, and emit events; include guidance on permissions and writer configuration.
  • Developer guidance: Includes recommended imports, patterns for self.world_default(), caller retrieval, UUID generation, and suggestions for testing and deployment.

Quick Start

Create a Dojo system that updates a player's Position, validates available moves, writes updated models, 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 create a Dojo system contract in Cairo for Starknet game logic?

Emit structured events in Dojo by utilizing EventStorage within your Cairo contract implementation, defining event structures, and triggering them during model state updates to maintain an immutable on-chain activity log.

How do I read and write on-chain model state using Dojo ModelStorage?

Read and write on-chain model state in Dojo by applying ModelStorage or ModelValueStorage traits to your Cairo models, using world namespace helpers and self.world_default() to access and update player data.

What is the best way to implement caller authorization in Starknet Dojo systems?

Implement caller authorization in Starknet Dojo systems by retrieving the caller identity within your Cairo contract logic, validating permissions before modifying ModelStorage data, and configuring writers to restrict system access.

Does dojo-system support scaffolding movement and combat systems for on-chain games?

Yes, dojo-system supports scaffolding movement, combat, inventory, and spawn systems for on-chain games by generating Cairo contracts that validate input, update models, and emit events according to Dojo conventions.

What are common limitations when configuring Dojo model IO and world namespaces?

Limitations when configuring Dojo model IO involve ensuring correct ModelStorage trait usage and proper writer configuration for world namespaces, as incorrect caller authorization or UUID generation can cause subtle on-chain bugs.