Cairo — StarkNet Smart Contract Reference
Use when writing Cairo smart contracts for StarkNet, looking up syntax and types, defining storage and events, generating contract templates, or reviewing test patterns.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bytesagain1/cairoWhat This Skill Does
The Cairo StarkNet Smart Contract Reference skill acts as an intelligent assistant tailored specifically for developers working within the StarkNet ecosystem. It serves as an on-demand technical manual for the Cairo programming language, providing immediate access to language syntax, type definitions, storage patterns, and event management. By streamlining access to the latest StarkNet standards, this skill eliminates the need to constantly switch between your IDE and browser documentation, keeping your development workflow fluid and error-free.
Installation
To install this skill, run the following command in your terminal within the OpenClaw environment:
clawhub install openclaw/skills/skills/bytesagain1/cairo
Once installed, you can trigger the skill by referencing the cairo command structure. Ensure your environment is properly configured to execute the underlying shell scripts provided by the skill repository.
Use Cases
- Boilerplate Generation: Quickly spin up standard contract frameworks such as ERC-20 tokens or Ownable patterns, saving time on repetitive setup.
- Debugging Syntax: Use the
syntaxcommand to verify control flow patterns or function modifiers when you run into compilation errors. - Architecting State: Consult the
storageandeventsmodules to ensure your contract state is optimized for the StarkNet architecture and that your indexing logic follows best practices for off-chain observability. - Onboarding: Help developers new to Cairo understand complex types like
felt252and custom structs by providing clear, concise examples on demand.
Example Prompts
- "cairo template erc20 -- please generate a basic implementation with mint and burn functionality."
- "cairo storage -- explain how to implement a mapping in a Cairo contract and the correct way to read from it."
- "cairo syntax -- show me the correct way to handle error propagation and panics in a StarkNet smart contract."
Tips & Limitations
- Tip: Always verify the generated templates against the latest Cairo version requirements, as the StarkNet ecosystem evolves rapidly. The template command provides a baseline, not a production-ready audit.
- Tip: When debugging, use the
typescommand to verify your data structures match the expectations of the StarkNet core library. - Limitation: This skill provides reference material and boilerplate code; it does not perform automated security audits. Always subject your smart contracts to rigorous testing and formal audits before mainnet deployment. Ensure your environment has the necessary bash execution permissions to allow the skill to function as intended.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bytesagain1-cairo": {
"enabled": true,
"auto_update": true
}
}
}Tags
Flags: code-execution
Related Skills
Zerion Api Skill
Skill by abishekdharshan
Zerion Api
Skill by abishekdharshan
solidity-guardian
Smart contract security analysis skill. Detect vulnerabilities, suggest fixes, generate audit reports. Supports Hardhat/Foundry projects. Uses pattern matching + best practices from Trail of Bits, OpenZeppelin, and Consensys.
WalletPilot-7715
Execute on-chain transactions with user-granted permissions. Built on MetaMask ERC-7715. No private keys, full guardrails.
MetaMask Agent Wallet
Control a sandboxed MetaMask browser extension wallet for autonomous blockchain transactions. Features configurable permission guardrails including spend limits, chain allowlists, protocol restrictions, and approval thresholds. MetaMask-only (other wallets not supported).