1---2name: cairo3description: Cairo language and compiler—Rust-like syntax, Sierra/CASM pipeline, Starknet contracts, linear types, and tooling.4metadata:5 author: hairy6 version: "2026.2.24"7 source: Generated from https://github.com/starkware-libs/cairo, scripts at https://github.com/antfu/skills8---910> Skill based on Cairo (starkware-libs/cairo), generated from `sources/cairo`. Doc path: `sources/cairo/docs/reference/src/components/cairo/modules/`.1112Cairo 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.1314## Core References1516| Topic | Description | Reference |17|-------|-------------|-----------|18| Modules and crates | Crates, modules, use, super, file layout | [core-modules-and-crates](references/core-modules-and-crates.md) |19| Functions | Signatures, mut/ref, methods, implicits, nopanic, local compilability | [core-functions](references/core-functions.md) |20| Structs and enums | Definitions, instantiation, destructuring, match | [core-structs-and-enums](references/core-structs-and-enums.md) |21| Traits and impls | Traits, named impls (of), impl generics, dispatch | [core-traits-and-impls](references/core-traits-and-impls.md) |22| Types and generics | Type system, generics, Array, Felt252Dict, fixed arrays | [core-types-and-generics](references/core-types-and-generics.md) |23| Linear types | Move, Copy, Drop, Destruct, Clone, snapshot (@) | [core-linear-types](references/core-linear-types.md) |24| Derive and prelude | Derive macro, common traits, prelude | [core-derive-and-prelude](references/core-derive-and-prelude.md) |2526## Features2728### Starknet2930| Topic | Description | Reference |31|-------|-------------|-----------|32| Starknet contracts | Storage, entry points, events, ABI, dispatchers, syscalls | [features-starknet-contracts](references/features-starknet-contracts.md) |3334### Tooling3536| Topic | Description | Reference |37|-------|-------------|-----------|38| CLI and compilation | cairo-compile, sierra-compile, cairo-run, starknet-compile | [features-cli-and-compilation](references/features-cli-and-compilation.md) |39| Match and panic | Match (enum/felt252), panic, nopanic, panic_with | [features-match-and-panic](references/features-match-and-panic.md) |4041## Best Practices4243| Topic | Description | Reference |44|-------|-------------|-----------|45| Naming and memory | Conventions, struct copy semantics, array/dict patterns | [best-practices-naming-and-memory](references/best-practices-naming-and-memory.md) |