Skip to content
Back to skills

Cairo Arrays

ASecurity

Explain Cairo Array usage, ArrayTrait methods, array! macro, Span, and array read/write constraints; use when a request involves creating, updating, reading, or passing arrays 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-arrays --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Arrays?

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

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

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-arrays
description: Explain Cairo Array usage, ArrayTrait methods, array! macro, Span, and array read/write constraints; use when a request involves creating, updating, reading, or passing arrays in Cairo.
---

# Cairo Arrays

## Overview
Explain Cairo Array semantics, method choices, and safe access patterns.

## Quick Use
- Read `references/arrays.md` before answering.
- Provide minimal, compile-ready snippets using `ArrayTrait` or `array!`.
- Call out whether `get` or `at` is appropriate for bounds safety.

## Response Checklist
- Use `ArrayTrait::new()` or `array![]` to construct arrays.
- Use `append` to add to the end and `pop_front` to remove from the front.
- Use `get` for Option-based bounds handling; use `at` or `arr[index]` when panicking is desired.
- Mention `Span` when read-only views are needed.

## Example Requests
- "Why can't I modify an element in a Cairo array?"
- "When should I use `get` vs `at`?"
- "How do I create an array literal?"

## Cairo by Example
- [Arrays and Slices](https://cairo-by-example.xyz/primitives/array)

Files in this skill

  • SKILL.md1.1 KB
  • references/arrays.md1.1 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…