smithery.ai

cairo-references-snapshots

Explain Cairo references, snapshots (`@`), `ref` parameters, and desnap (`*`); use when a request involves borrowing, avoiding moves, or mutating data through references in Cairo.

First seen Apr 8, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,290 B
  • docs SUMMARY.md 213 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Cairo References and Snapshots

Overview

Explain when to pass by value, snapshot, or mutable reference, and how to read or mutate safely.

Quick Use

  • Read references/references-snapshots.md before answering.
  • Show the correct parameter form (value, @value, or ref value).
  • Use *snapshot only for Copy types.

Response Checklist

  • Use snapshots (@T) to read without moving ownership.
  • Use ref when the callee must mutate and the caller must regain ownership.
  • Remind that ref requires a mut variable at the call site.
  • Call out that snapshots are immutable and cannot be mutated directly.

Example Requests

  • "Why does passing this array move ownership?"
  • "How do I modify a struct inside a function and keep it?"
  • "What does @ mean in a type annotation?"

Cairo by Example