5,439,582 AI resources indexedWorking toward the world’s largest AI resource index.

PDF

Cairo Components

Explain Starknet components, embedding into contracts, and component interfaces; use when a request involves reusable contract logic or component-based design in Cairo.

Installable skillApache-2.0By David-Li0406Updated Oct 30, 2026
INTENDED FORClaude CodeInstall in a listed agent.

instructions.md

---
name: cairo-components-f6c3c2cf5336
description: Explain Starknet components, embedding into contracts, and component interfaces; use when a request involves reusable contract logic or component-based design in Cairo.
---

# Cairo Components

## Overview
Explain how to define, embed, and use components to share contract logic safely.

## Quick Use
- Read `references/components.md` before answering.
- Use `#[starknet::component]` and `component!` for embedding.
- Show both embeddable external functions and internal functions.

## Response Checklist
- Define component storage with `#[storage]` and an `Event` enum.
- Use `#[embeddable_as]` on impls to expose entry points.
- Embed component storage and events in the host contract.
- Add `#[abi(embed_v0)]` impl aliases when embedding.

## Example Requests
- "How do I create a reusable component?"
- "How do I embed a component into a contract?"
- "What is the difference between embeddable and internal component functions?"

Discuss this resource

Platform guidance

Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.