Skip to content
Back to skills

Cairo Traits

ASecurity

Explain Cairo traits, impl syntax, default methods, trait bounds, and visibility; use when a request involves defining traits, implementing traits, or resolving trait method availability errors 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-traits --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Traits?

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

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

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-traits
description: Explain Cairo traits, impl syntax, default methods, trait bounds, and visibility; use when a request involves defining traits, implementing traits, or resolving trait method availability errors in Cairo.
---

# Cairo Traits

## Overview
Guide how to define and implement traits in Cairo, including bounds and default behavior.

## Quick Use
- Read `references/traits.md` before answering.
- Show a minimal `trait` plus `impl Name of Trait<T>` example.
- Remind users to bring traits into scope to call trait methods.

## Response Checklist
- Define trait methods with signatures only, unless providing defaults.
- Implement with `impl ImplName of Trait<Type> { ... }`.
- Include trait bounds when generics need specific behavior.

## Example Requests
- "How do I implement a trait for a struct in Cairo?"
- "Why can't I call a trait method even though impl exists?"
- "Can a trait provide default method bodies?"

## Cairo by Example
- [Traits](https://cairo-by-example.xyz/trait)
- [Derive](https://cairo-by-example.xyz/trait/derive)
- [Drop and Destruct](https://cairo-by-example.xyz/trait/drop)
- [Iterators](https://cairo-by-example.xyz/trait/iter)
- [Clone](https://cairo-by-example.xyz/trait/clone)
- [Disambiguating overlapping traits](https://cairo-by-example.xyz/trait/disambiguating)

Files in this skill

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