Skip to content
Back to skills

Cairo Dictionaries

ASecurity

Explain Cairo Felt252Dict usage, insert/get/entry patterns, and dictionary squashing; use when a request involves key-value storage, dictionary performance, or borrow/ownership rules for dictionaries in Cairo.

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

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-dictionaries --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Dictionaries?

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

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

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-dictionaries
description: Explain Cairo Felt252Dict usage, insert/get/entry patterns, and dictionary squashing; use when a request involves key-value storage, dictionary performance, or borrow/ownership rules for dictionaries in Cairo.
---

# Cairo Dictionaries

## Overview
Guide correct creation and use of Cairo dictionaries with proper ownership and performance notes.

## Quick Use
- Read `references/dictionaries.md` before answering.
- Show minimal snippets using `Felt252Dict` plus `Felt252DictTrait` methods.
- Mention squashing and cost implications when discussing performance.

## Response Checklist
- Use `Felt252Dict::<T>::default()` to initialize.
- Use `insert` and `get` for basic operations; use `entry`/`finalize` for advanced patterns.
- Remind that keys are `felt252` and values are generic `T`.
- Call out that dictionary access is linear in the number of entries and squashing occurs on destruction.

## Example Requests
- "How do I store balances by address in Cairo?"
- "Why does `get` return a default value sometimes?"
- "What is dictionary squashing and when does it happen?"

## Cairo by Example
- [Dictionaries](https://cairo-by-example.xyz/core/dict)

Files in this skill

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