Cairo — StarkNet Smart Contract Reference for Openclaw

A comprehensive reference skill for writing, testing, and deploying Cairo smart contracts on the StarkNet ZK-rollup.

bytesagain-lab
v2.0.1
Mar 26, 2026
0
927
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install cairo

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install cairo using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Cairo — StarkNet Smart Contract Reference?

The Cairo — StarkNet Smart Contract Reference is a specialized developer tool designed to accelerate the creation of secure and efficient smart contracts. As part of the Openclaw Skills ecosystem, it provides instant access to the unique syntax and type system requirements of Cairo 2.0. This skill acts as a bridge for developers transitioning from Solidity or Rust, offering clear mappings for felts, integers, and complex data structures.

By leveraging this skill, developers can ensure their code adheres to StarkNet standards for storage management and event emission. Whether you are building complex DeFi protocols or simple NFTs, this resource provides the technical foundation needed to navigate the StarkNet ecosystem with confidence.

Cairo — StarkNet Smart Contract Reference Use Cases

  • Rapidly looking up Cairo 2.0 syntax for variables, functions, and control flow logic.
  • Implementing secure storage patterns and event emission for StarkNet contracts.
  • Generating production-ready boilerplate for ERC20 or Ownable contract templates.
  • Debugging type-related issues involving felt252, structs, and enums.

How Cairo — StarkNet Smart Contract Reference Works

  1. The developer invokes a specific command via the Openclaw Skills interface to query the Cairo knowledge base.
  2. The skill processes the request, such as a syntax lookup or a template generation command.
  3. It retrieves formatted code snippets, best practices, or boilerplate logic specific to the StarkNet environment.
  4. The resulting output is injected directly into the development workflow, providing actionable code or documentation.

Cairo — StarkNet Smart Contract Reference Setup

To integrate this skill into your local environment, ensure you have the Openclaw Skills runner installed. You can then access the reference commands via the included script:

# List all available Cairo reference commands
bash scripts/script.sh help

# Generate an ERC20 starter contract
bash scripts/script.sh template erc20

Cairo — StarkNet Smart Contract Reference Data Schema & Taxonomy

The skill organizes StarkNet development data into logical domains to facilitate fast retrieval:

Category Description Data Format
Syntax Core language rules and control flow Markdown + Code Blocks
Types Felt252, integers, arrays, and enums Definition Tables
Storage Mappings and state variable patterns Implementation Snippets
Templates Pre-configured contract architectures Full .cairo Files

Cairo — StarkNet Smart Contract Reference Advanced Features

  • Support for multi-agent workflows by providing standardized contract interfaces.
  • One-command generation for industry-standard contract patterns like Ownable and ERC20.
  • Granular breakdown of the Cairo type system to prevent common ZK-circuit errors.
  • Integrated feedback loops for continuous improvement of the Openclaw Skills reference library.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*