Skip to content
Back to skills

Cairo Ownership

ASecurity

Explain Cairo ownership, moves, Copy/Drop/Destruct traits, and scope-based destruction; use when a request involves use-after-move errors, copying values, or ownership semantics in Cairo.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
documentation

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill cairo-ownership --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Ownership?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cairo Ownership
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-cairo-ownership/badge)](https://www.skillsdirectory.com/skills/david-li0406-cairo-ownership)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cairo-ownership
description: Explain Cairo ownership, moves, Copy/Drop/Destruct traits, and scope-based destruction; use when a request involves use-after-move errors, copying values, or ownership semantics in Cairo.
---

# Cairo Ownership

## Overview
Guide Cairo's ownership rules, move semantics, and destruction traits so code compiles without ownership errors.

## Quick Use
- Read `references/ownership.md` before answering.
- Identify whether the type is moved, copied, dropped, or destructed.
- Provide small examples showing the move or copy that fixes the error.

## Response Checklist
- State the three ownership rules and apply them to the failing line.
- If a value is used after move, suggest borrowing (snapshot/ref) or copying (Copy trait).
- Mention Drop vs Destruct when dictionaries or resource-like types are involved.

## Example Requests
- "Why is this variable unavailable after I pass it to a function?"
- "How do I make my struct Copy?"
- "Why can't I derive Drop for a struct containing a dictionary?"

## Cairo by Example
- [Scoping rules](https://cairo-by-example.xyz/scope)
- [RAII](https://cairo-by-example.xyz/scope/raii)
- [Ownership and moves](https://cairo-by-example.xyz/scope/move)
- [Mutability](https://cairo-by-example.xyz/scope/move/mut)
- [Drop and Destruct](https://cairo-by-example.xyz/trait/drop)

Files in this skill

  • SKILL.md1.3 KB
  • references/ownership.md1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…