# Cairo Associated Items

> Explain Cairo associated items (functions, types, constants, implementations) in traits and impls; use when a request involves associated types, constants, or clarifying trait item placement in Cairo.

- Skill: `teddyjfpender/cairo-associated-items` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add teddyjfpender/cairo-associated-items`
- Raw SKILL.md: https://api.skillmd.com/api/skills/teddyjfpender/cairo-associated-items/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: teddyjfpender (https://skillmd.com/u/teddyjfpender)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/teddyjfpender/cairo-associated-items

---


# Cairo Associated Items

## Overview
Explain associated items declared in traits and defined in impls, especially associated types.

## Quick Use
- Read `references/associated-items.md` before answering.
- Use examples with `type Result` and `Self::Result`.
- Compare associated types vs extra generic parameters when relevant.

## Response Checklist
- List associated item kinds: functions/methods, types, constants, implementations.
- Use associated types to reduce generic parameters in traits.
- Refer to items via `Self::TypeName` or `TraitImpl::TypeName`.

## Example Requests
- "What is an associated type in Cairo?"
- "Why is Self::Result used in trait methods?"
- "When should I use associated types instead of generics?"

## Cairo by Example
- [Associated items](https://cairo-by-example.xyz/generics/assoc_items)
- [The Problem](https://cairo-by-example.xyz/generics/assoc_items/the_problem)
- [Associated types](https://cairo-by-example.xyz/generics/assoc_items/types)

