Skip to content
Back to skills

Cairo Recoverable Errors

ASecurity

Explain Cairo recoverable errors using `Result`, `ResultTrait`, and the `?` operator; use when a request involves returning, matching, or unwrapping `Result` values in Cairo.

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

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-recoverable-errors --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Recoverable Errors?

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

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

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-recoverable-errors
description: Explain Cairo recoverable errors using `Result`, `ResultTrait`, and the `?` operator; use when a request involves returning, matching, or unwrapping `Result` values in Cairo.
---

# Cairo Recoverable Errors

## Overview
Show how to model recoverable failures with `Result<T, E>` and handle them safely.

## Quick Use
- Read `references/recoverable-errors.md` before answering.
- Prefer `match` or `?` over `unwrap` in non-test code.
- Mention `expect` when a custom panic message is desired.

## Response Checklist
- Return `Result<T, E>` from fallible functions.
- Use `Ok(...)` and `Err(...)` explicitly.
- Apply `?` to propagate errors from called functions.

## Example Requests
- "How do I use `Result` in Cairo?"
- "What is the difference between `unwrap` and `expect`?"
- "How does the `?` operator work?"

## Cairo by Example
- [Option & unwrap](https://cairo-by-example.xyz/error/option_unwrap)
- [Unpacking options with ?](https://cairo-by-example.xyz/error/option_unwrap/question_mark)
- [Combinators: map](https://cairo-by-example.xyz/error/option_unwrap/map)
- [Combinators: and_then](https://cairo-by-example.xyz/error/option_unwrap/and_then)
- [Result](https://cairo-by-example.xyz/error/result)
- [Introducing ?](https://cairo-by-example.xyz/error/result/enter_question_mark)
- [Multiple error types](https://cairo-by-example.xyz/error/multiple_error_types)
- [Core Result](https://cairo-by-example.xyz/core/result)

Files in this skill

  • SKILL.md1.4 KB
  • references/recoverable-errors.md540 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…