Skip to content
Back to skills

Cairo Generic Data Types

ASecurity

Explain Cairo generic data types and syntax for generic functions, structs, enums, methods, and impls; use when a request involves type parameters or generic signatures 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-generic-data-types --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Generic Data Types?

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

Security grade badge for Cairo Generic Data Types
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-cairo-generic-data-types/badge)](https://www.skillsdirectory.com/skills/david-li0406-cairo-generic-data-types)

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-generic-data-types
description: Explain Cairo generic data types and syntax for generic functions, structs, enums, methods, and impls; use when a request involves type parameters or generic signatures in Cairo.
---

# Cairo Generic Data Types

## Overview
Explain how to declare and use generic types and functions in Cairo with correct syntax.

## Quick Use
- Read `references/generic-data-types.md` before answering.
- Show short examples for generic structs, enums, and functions.
- Use explicit type annotations when inference is ambiguous.

## Response Checklist
- Place generic parameters after the item name: `struct Name<T>` or `fn foo<T>()`.
- Support multiple parameters: `struct Pair<T, U>`.
- Emphasize that generics work with functions, structs, enums, traits, impls, and methods.

## Example Requests
- "How do I write a generic struct in Cairo?"
- "Can I have multiple type parameters?"
- "Why does the compiler need a type annotation for this generic?"

## Cairo by Example
- [Generics](https://cairo-by-example.xyz/generics)
- [Functions](https://cairo-by-example.xyz/generics/gen_fn)
- [Implementation](https://cairo-by-example.xyz/generics/impl)

Files in this skill

  • SKILL.md1.2 KB
  • references/generic-data-types.md606 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…