Skip to content
Back to skills

Cairo Storage Vecs

ASecurity

Explain Starknet storage vectors with VecTrait and MutableVecTrait, element addressing, and operations; use when a request involves Vec-based storage in Cairo contracts.

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

Works with

  • api

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-storage-vecs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Storage Vecs?

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

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

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-storage-vecs
description: Explain Starknet storage vectors with VecTrait and MutableVecTrait, element addressing, and operations; use when a request involves Vec-based storage in Cairo contracts.
---

# Cairo Storage Vecs

## Overview
Explain how storage vectors are modeled and accessed in Cairo smart contracts.

## Quick Use
- Read `references/storage-vecs.md` before answering.
- Use `Vec<T>` only inside the storage struct.
- Use `len`, `get`, `at`, `append`, and `pop` from the trait APIs.

## Response Checklist
- Mention that the length is stored at the base slot.
- Explain element slot derivation from the base address and index.
- Note that Vec types are storage-only and cannot be instantiated as normal variables.

## Example Requests
- "How do I append to a storage Vec?"
- "How is the element address computed for a storage Vec?"
- "Why can't I create Vec in a function?"

Files in this skill

  • SKILL.md903 B
  • references/storage-vecs.md556 B

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…