cairo
0
总安装量
1
周安装量
安装命令
npx skills add https://github.com/hairyf/blockchain-master --skill cairo
Agent 安装分布
mcpjam
1
claude-code
1
replit
1
junie
1
windsurf
1
zencoder
1
Skill 文档
Skill based on Cairo (starkware-libs/cairo), generated from
sources/cairo. Doc path:sources/cairo/docs/reference/src/components/cairo/modules/.
Cairo is a Turing-complete language for provable programs (Starknet, general computation). It uses a Rust-like syntax, Sierra as an intermediate representation, and compiles to CASM. Use this skill for writing and compiling Cairo programs and Starknet contracts, and for understanding types, traits, and linear semantics.
Core References
| Topic | Description | Reference |
|---|---|---|
| Modules and crates | Crates, modules, use, super, file layout | core-modules-and-crates |
| Functions | Signatures, mut/ref, methods, implicits, nopanic, local compilability | core-functions |
| Structs and enums | Definitions, instantiation, destructuring, match | core-structs-and-enums |
| Traits and impls | Traits, named impls (of), impl generics, dispatch | core-traits-and-impls |
| Types and generics | Type system, generics, Array, Felt252Dict, fixed arrays | core-types-and-generics |
| Linear types | Move, Copy, Drop, Destruct, Clone, snapshot (@) | core-linear-types |
| Derive and prelude | Derive macro, common traits, prelude | core-derive-and-prelude |
Features
Starknet
| Topic | Description | Reference |
|---|---|---|
| Starknet contracts | Storage, entry points, events, ABI, dispatchers, syscalls | features-starknet-contracts |
Tooling
| Topic | Description | Reference |
|---|---|---|
| CLI and compilation | cairo-compile, sierra-compile, cairo-run, starknet-compile | features-cli-and-compilation |
| Match and panic | Match (enum/felt252), panic, nopanic, panic_with | features-match-and-panic |
Best Practices
| Topic | Description | Reference |
|---|---|---|
| Naming and memory | Conventions, struct copy semantics, array/dict patterns | best-practices-naming-and-memory |