Skip to content
Back to skills

Cairo Deref Coercion

ASecurity

Explain Cairo deref coercion with Deref/DerefMut traits and Target associated type; use when a request involves wrapper types, field access through wrappers, or deref behavior 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-deref-coercion --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Deref Coercion?

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

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

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-deref-coercion
description: Explain Cairo deref coercion with Deref/DerefMut traits and Target associated type; use when a request involves wrapper types, field access through wrappers, or deref behavior in Cairo.
---

# Cairo Deref Coercion

## Overview
Guide how deref coercion works via `Deref` and `DerefMut`, and when it applies.

## Quick Use
- Read `references/deref-coercion.md` before answering.
- Show the `Deref` trait and a wrapper example.
- Note that `DerefMut` only applies to mutable variables.

## Response Checklist
- Implement `Deref<T>` with `type Target` and `fn deref(self: T) -> Target`.
- Use deref coercion to access fields on the wrapped type.
- Use `DerefMut` when you need mutable-only coercion; it does not make the target mutable by itself.

## Example Requests
- "Why can I access fields on a wrapper type?"
- "How do I implement Deref for a custom type?"
- "Why does DerefMut require a mut variable?"

Files in this skill

  • SKILL.md949 B
  • references/deref-coercion.md542 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…