Cairo Smart Contract Setup (OpenZeppelin) for Openclaw

Automate the scaffolding and configuration of Starknet projects using Cairo and OpenZeppelin standards.

samledger67-dotcom
v1.0.1
Mar 18, 2026
0
869
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install setup-cairo-contracts

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 setup-cairo-contracts 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 Smart Contract Setup (OpenZeppelin)?

This skill provides a standardized workflow for initializing Cairo smart contract projects on Starknet. By integrating the Openclaw Skills framework, developers can quickly scaffold new projects with the Scarb toolchain, configure Starknet Foundry for testing, and manage OpenZeppelin Cairo dependencies. It ensures that projects adhere to modular architecture best practices while providing clear guidance on import conventions and component-based development.

Cairo Smart Contract Setup (OpenZeppelin) Use Cases

  • Rapidly scaffold a new Starknet project with pre-configured testing tools.
  • Integrate OpenZeppelin Cairo dependencies into existing Scarb projects.
  • Optimize build times by switching from umbrella packages to individual modular packages.
  • Implement secure smart contract components like ERC20, Ownable, and Upgradeable patterns.
  • Standardize import paths and component storage implementations across a development team using Openclaw Skills.

How Cairo Smart Contract Setup (OpenZeppelin) Works

  1. Toolchain Deployment: The skill initiates the Starkup installation to ensure the latest Cairo and Scarb environment is ready.
  2. Project Scaffolding: It generates the project structure using the Scarb CLI with Starknet Foundry pre-configured as the test runner.
  3. Dependency Resolution: The skill identifies the appropriate OpenZeppelin versions and injects them into the Scarb.toml file.
  4. Architectural Configuration: It defines the import strategy based on whether the developer chooses modular or umbrella package structures.
  5. Component Implementation: It provides the necessary boilerplate for the Cairo component macro and storage flattening required for Starknet contracts.

Cairo Smart Contract Setup (OpenZeppelin) Setup

To set up your project using this workflow from Openclaw Skills, run the following commands:

# Install the Starknet toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | sh

# Create a new project with Starknet Foundry testing
scarb new my_project --test-runner=starknet-foundry

After scaffolding, update your Scarb.toml dependencies with either the umbrella openzeppelin package or individual modules like openzeppelin_token.

Cairo Smart Contract Setup (OpenZeppelin) Data Schema & Taxonomy

The skill organizes project data and configuration using the following structure:

File/Module Role Description
Scarb.toml Configuration Defines project metadata, dependencies, and Starknet target settings.
src/lib.cairo Entry Point The main Cairo source file defining the contract or library modules.
openzeppelin_token Dependency Modular package for ERC20, ERC721, and ERC1155 logic.
openzeppelin_access Dependency Modular package for Ownable and AccessControl components.
openzeppelin_upgrades Dependency Components for implementing UUPS or other upgradeability patterns.

Cairo Smart Contract Setup (OpenZeppelin) Advanced Features

  • Modular Build Optimization: Support for individual package imports to reduce compilation overhead.
  • Component Logic Embedding: Automated implementation of embedded impls and substorage patterns for Cairo components.
  • Storage Safety Validation: Guidance on avoiding storage collisions when composing multiple Openclaw Skills components.
  • Multi-Package Management: Compatibility with umbrella packages for rapid prototyping or modular packages for production-grade efficiency.
  • Integrated Test Runner: Native support for Starknet Foundry (snforge) within the scaffolded environment.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*