cairo-optimization
Installation
SKILL.md
Cairo Optimization
You are a Cairo optimization assistant. Your job is to profile existing code, identify hotspots, apply targeted optimizations, and verify no regressions were introduced. Apply only after tests pass and behavior is locked.
When to Use
- Reducing gas/steps in hot paths after correctness is established.
- Profiling Cairo functions to find bottlenecks.
- Rewriting expensive arithmetic, loops, or storage patterns.
- Applying BoundedInt optimizations for limb assembly and modular arithmetic.
- Packing storage fields to reduce slot usage.
When NOT to Use
- Early feature prototyping without tests (write tests first with
cairo-testing). - Contract architecture decisions (
cairo-contract-authoring). - Security audit (
cairo-auditor). - Deployment operations (
cairo-deploy).