# Cairo Component Dependencies

> Explain component dependency patterns, trait bounds, and dependency access helpers; use when a request involves components that rely on other components in Cairo.

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

---


# Cairo Component Dependencies

## Overview
Explain how components depend on other components without embedding them directly.

## Quick Use
- Read `references/component-dependencies.md` before answering.
- Use trait bounds on impl blocks to require dependent components.
- Use the helper macros to access dependencies from a component state.

## Response Checklist
- Declare dependencies with trait bounds on the host contract type.
- Use `get_dep_component!` or `get_dep_component_mut!` to access the dependency.
- Ensure the host contract embeds all required components.

## Example Requests
- "How can my component call another component?"
- "Why do I need trait bounds for components?"
- "How do I access a dependency from ComponentState?"

