Guide implementing custom numeric types in Cairo with invariant enforcement, overflow safety, and standard trait implementations; use when implementing fixed-point, signed integers, or other numeric...
SKILL.md
Cairo Numeric Types
Overview
Guide implementing production-quality custom numeric types (fixed-point, big integers, signed integers) in Cairo following Ekubo-style patterns.
Quick Use
Read references/numeric-types.md before answering.
Study Ekubo's i129 - the gold standard for signed integers in Cairo.
Use constructor functions to enforce invariants (e.g., no negative zero).
Provide both checked (returns Option) and unchecked (panics) API variants.