Skip to content
Back to skills

Cairo Panic

ASecurity

Explain Cairo unrecoverable errors, `panic`, `panic!`, `panic_with_felt252`, `nopanic`, and `panic_with`; use when a request involves panics or panic annotations in Cairo.

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

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

Installs into .claude/skills of the current project.

Are you the author of Cairo Panic?

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

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

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-panic
description: Explain Cairo unrecoverable errors, `panic`, `panic!`, `panic_with_felt252`, `nopanic`, and `panic_with`; use when a request involves panics or panic annotations in Cairo.
---

# Cairo Panic

## Overview
Explain how panics work in Cairo, how to trigger them, and how to constrain panic behavior.

## Quick Use
- Read `references/panic.md` before answering.
- Choose the smallest panic API that fits the error message you need.
- Mention `nopanic` requirements when a caller demands panic-free code.

## Response Checklist
- Use `panic` for array-based errors, `panic_with_felt252` for a single felt, and `panic!` for strings.
- Note that panic unwinds, drops variables, and squashes dictionaries.
- Use `#[panic_with(...)]` for wrapper functions that panic on `None` or `Err`.

## Example Requests
- "How do I panic with a short error code?"
- "What does `nopanic` mean?"
- "How do I create a wrapper that panics on `None`?"

## Cairo by Example
- [Error handling](https://cairo-by-example.xyz/error)
- [panic](https://cairo-by-example.xyz/error/panic)
- [panic! (core)](https://cairo-by-example.xyz/core/panic)

Files in this skill

  • SKILL.md1.1 KB
  • references/panic.md764 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…