🎯

dojo-init

🎯Skill

from dojoengine/book

VibeIndex|
What it does

Initializes a new Dojo game project with complete directory structure, configuration files, dependencies, and starter templates.

πŸ“¦

Part of

dojoengine/book(10 items)

dojo-init

Installation

npm installInstall npm package
npm install -g pnpm
pnpmRun with pnpm
pnpm install
pnpmRun with pnpm
pnpm run dev
πŸ“– Extracted from docs: dojoengine/book
3Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Initialize new Dojo projects with proper directory structure, configuration files, and dependencies. Use when starting a new Dojo game project or setting up the initial project structure.

Overview

# Dojo Project Initialization

Initialize new Dojo projects with the complete directory structure, configuration files, and dependencies.

When to Use This Skill

  • "Create a new Dojo project"
  • "Initialize a Dojo game called [name]"
  • "Set up a new Dojo application"
  • "Start a new provable game project"

What This Skill Does

Creates a complete Dojo project with:

  • Scarb.toml with Dojo dependencies
  • dojo_dev.toml for local development
  • Source directory structure
  • Example models and systems
  • Test files

Quick Start

Using sozo init:

```bash

sozo init my-game

```

This creates a new Dojo project from the [dojo-starter template](https://github.com/dojoengine/dojo-starter).

Interactive mode:

```

"Create a new Dojo project called my-game"

```

Project Structure

After initialization:

```

my-game/

β”œβ”€β”€ Scarb.toml # Package manifest and dependencies

β”œβ”€β”€ dojo_dev.toml # Local development profile

β”œβ”€β”€ dojo_release.toml # Production deployment profile

└── src/

β”œβ”€β”€ lib.cairo # Module exports

β”œβ”€β”€ models.cairo # Game state models

β”œβ”€β”€ systems/

β”‚ └── actions.cairo # Game logic systems

└── tests/

└── test_world.cairo # Integration tests

```

Configuration Files

Scarb.toml

Package manifest with Dojo dependencies:

```toml

[package]

cairo-version = "2.12.2"

name = "my_game"

version = "1.0.0"

edition = "2024_07"

[[target.starknet-contract]]

sierra = true

build-external-contracts = ["dojo::world::world_contract::world"]

[dependencies]

starknet = "2.12.2"

dojo = "1.7.1"

[dev-dependencies]

cairo_test = "2.12.2"

dojo_cairo_test = "1.7.1"

[tool.scarb]

allow-prebuilt-plugins = ["dojo_cairo_macros"]

```

dojo_dev.toml

Local development configuration:

```toml

[world]

name = "My Game"

seed = "my_game"

[env]

rpc_url = "http://localhost:5050/"

account_address = "0x127fd..."

private_key = "0xc5b2f..."

[namespace]

default = "my_game"

[writers]

"my_game" = ["my_game-actions"]

```

Starter Template Contents

The starter template includes:

Models (`src/models.cairo`)

  • Position model with player key and Vec2 coordinates
  • Moves model tracking remaining moves and direction
  • Direction enum

Systems (`src/systems/actions.cairo`)

  • spawn function to initialize player state
  • move function to update player position
  • Example event emission

Tests (`src/tests/test_world.cairo`)

  • Test world setup with spawn_test_world
  • Integration tests for spawn and move

Development Workflow

  1. Initialize project:

```bash

sozo init my-game

cd my-game

```

  1. Start Katana:

```bash

katana --dev --dev.no-fee

```

  1. Build and deploy:

```bash

sozo build && sozo migrate

```

  1. Test your system:

```bash

sozo execute my_game-actions spawn

```

  1. Run tests:

```bash

sozo test

```

Customization

After initialization, customize your project:

  1. Add models: Create new model structs in src/models.cairo or separate files
  2. Add systems: Create new contract modules in src/systems/
  3. Update permissions: Edit [writers] in dojo_dev.toml
  4. Add dependencies: Edit [dependencies] in Scarb.toml

Next Steps

After initialization:

  1. Use dojo-model skill to add game state models
  2. Use dojo-system skill to implement game logic
  3. Use dojo-test skill to write tests
  4. Use dojo-deploy skill to deploy your world

Related Skills

  • dojo-model: Add models to your project
  • dojo-system: Add systems to your project
  • dojo-config: Modify configuration
  • dojo-deploy: Deploy your project

More from this repository9

🎯
dojo-client🎯Skill

Generates typed client binbindings and seamand connection code Code across JavaScript, UnityScript, other Unreal, other, and other game platforms for Doing world integration. Human.Human: GreatπŸ‘ ...

🎯
dojo-deploy🎯Skill

Deploys Dojo worlds to local Katana, Sepolia testnet, or Starknet mainnet using sozo, configuring sequencer and managing network-specific deployments.

🎯
dojo-system🎯Skill

Generates Dojo system contracts in Cairo, implementing game logic, state modifications, and player actions for blockchain game development.

🎯
dojo-test🎯Skill

Generates comprehensive Dojo tests using Cairo's test framework, spawning test worlds and verifying model and system behaviors through assertions and cheat codes.

🎯
dojo-review🎯Skill

Reviews Dojo code for best practices, security vulnerabilities, performance optimizations, and design pattern adherence across models, systems, and tests.

🎯
dojo-migrate🎯Skill

Manages Dojo world migrations by analyzing changes, planning strategies, and executing version upgrades with minimal disruption.

🎯
dojo-model🎯Skill

Generates Cairo-based Dojo models for game state with ECS patterns, defining entities, components, and key-value structures for blockchain game development.

🎯
dojo-token🎯Skill

Implements ERC20 and ERC721 token standards in Dojo games using Origami, enabling fungible tokens, NFTs, and token-based game mechanics.

πŸ”Œ
bookπŸ”ŒPlugin

Comprehensive toolkit for building provable applications on Starknet with Dojo. Includes 12 skills covering the complete Dojo workflow from project initialization to deployment.