Skip to content
Back to skills

Cairo Match

ASecurity

Explain Cairo match expressions, pattern matching on enums, exhaustiveness, and wildcard arms; use when a request involves matching Option/Result or enum values in Cairo.

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

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

Installs into .claude/skills of the current project.

Are you the author of Cairo Match?

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

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

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-match
description: Explain Cairo match expressions, pattern matching on enums, exhaustiveness, and wildcard arms; use when a request involves matching Option/Result or enum values in Cairo.
---

# Cairo Match

## Overview
Explain how to use `match` for branching on enum values and destructuring data safely.

## Quick Use
- Read `references/match.md` before answering.
- Include an exhaustive `match` with a `_` fallback when appropriate.
- Emphasize that all arms must return the same type when used as an expression.

## Response Checklist
- Use fully qualified variants like `EnumName::Variant` in patterns.
- Bind inner data with patterns like `EnumName::Variant(value)`.
- Keep match arms exhaustive; add `_` only when appropriate.

## Example Requests
- "How do I match on an Option in Cairo?"
- "Why is my match non-exhaustive?"
- "How do I extract the value from an enum variant?"

## Cairo by Example
- [match](https://cairo-by-example.xyz/flow_control/match)
- [Destructuring](https://cairo-by-example.xyz/flow_control/match/destructuring)
- [Destructuring enums](https://cairo-by-example.xyz/flow_control/match/destructuring/destructure_enum)
- [Destructuring structs](https://cairo-by-example.xyz/flow_control/match/destructuring/destructure_structures)

Files in this skill

  • SKILL.md1.3 KB
  • references/match.md783 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…