cairo-data-types

star 3

Explain Cairo scalar and compound data types, literals, conversions, and string forms; use when a request asks about Cairo types (felt252, integers, bool, strings, tuples, arrays, unit), type annotations, or conversion errors.

teddyjfpender By teddyjfpender schedule Updated 1/23/2026

name: cairo-data-types description: Explain Cairo scalar and compound data types, literals, conversions, and string forms; use when a request asks about Cairo types (felt252, integers, bool, strings, tuples, arrays, unit), type annotations, or conversion errors.

Cairo Data Types

Overview

Explain Cairo's core data types, literals, and conversions so answers stay type-correct and safe.

Quick Use

  • Read references/data-types.md before answering.
  • State the target type explicitly and show the correct literal or conversion.
  • Prefer integer types over felt252 when safety (overflow/underflow checks) matters.

Response Checklist

  • Identify whether the value should be felt252, a specific integer type, bool, a string type, or a compound type.
  • When literals are ambiguous, use a type suffix or explicit annotation.
  • For conversions, show try_into/into patterns and mention potential failure where relevant.

Example Requests

  • "What is the difference between felt252 and u64 in Cairo?"
  • "How do I write a short string vs a long string?"
  • "Why does this integer literal need a type annotation?"

Cairo by Example

Install via CLI
npx skills add https://github.com/teddyjfpender/skill-issues --skill cairo-data-types
Repository Details
star Stars 3
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
teddyjfpender
teddyjfpender Explore all skills →