All skills
Skillintermediate
š Layer 3: Delegation Layer
<div align="center">
Claude Code Knowledge Pack7/10/2026
Overview
<div align="center">
<div align="center">
š Home āŗ š§ Implementation āŗ šļø Architecture āŗ š Layer 3: Delegation
ā š Main Agent Layer āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā” Execution Layer ā
</div>š Layer 3: Delegation Layer
Defines workflows and provides reusable capabilities to the š Main Agent.
Purpose
The Delegation Layer provides structured workflows (𦓠Slash Commands) and contextual methodologies (š Skills) that enhance the š Main Agent's capabilities.
Components
| Component | Emoji | Role | Triggered By |
|---|---|---|---|
| Slash Commands | 𦓠| Define multi-step workflows | User /command |
| Skills | š | Provide methodologies | Context matching |
𦓠Slash Command Flow
%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#64748b'}}}%%
sequenceDiagram
participant U as šāāļø User
participant CMD as 𦓠Slash Command
participant MA as š Main Agent
participant E as ā” Execution
U->>CMD: šāāļøš„ /generate fr-FR
CMD->>CMD: Expand to prompt
CMD->>MA: Full prompt + args
MA->>E: Execute workflow
E-->>MA: Results
MA-->>U: Response
How Slash Commands Work
- User invokes:
/generate fr-FR - System loads:
.claude/commands/generate.md - Expands template:
$ARGUMENTSāfr-FR - Passes to š Main Agent: Full expanded prompt
Example Command File
# .claude/commands/generate.md
---
description: Generate localization files for specified locales
argument-hint: [locale]
---
Generate localization files for: $ARGUMENTS
1. Check LOCALES-200.csv for valid locales
2. Create files for each locale
3. Run validation
š Skill Loading
%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#64748b'}}}%%
flowchart LR
classDef skill fill:#8b5cf6,stroke:#7c3aed,stroke-width:2px,color:#ffffff
classDef decision fill:#f59e0b,stroke:#d97706,stroke-width:2px,color:#ffffff
REQ[Request] --> CHECK{"š Matches Skill?"}:::decision
CHECK -->|Yes| LOAD["š Load Skill"]:::skill
CHECK -->|No| CONTINUE[Continue]
LOAD --> ENHANCE[Enhanced Context]
ENHANCE --> EXEC[Execute]
CONTINUE --> EXEC
How Skills Work
- Detection: Claude analyzes request context
- Matching: Compares against skill descriptions
- Loading: Injects skill content into context
- Application: Follows methodology during execution
Example Skill File
# .claude/skills/test-driven-development/SKILL.md
---
description: Use when implementing features - write tests first, then code
---
# Test-Driven Development
## Methodology
1. RED: Write a failing test
2. GREEN: Write minimal code to pass
3. REFACTOR: Clean up while tests pass
Delegation vs Execution
| Aspect | š Delegation Layer | ā” Execution Layer |
|---|---|---|
| What it does | Defines HOW to do things | Actually DOES things |
| Components | 𦓠Commands, š Skills | š¦ Subagents, š§ššāāļø Tools |
| Nature | Instructions, templates | Actions, operations |
| Triggered by | User or context | š Main Agent |
Layer Position
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā š LAYER 2: MAIN AGENT LAYER ā
ā Claude Code - orchestration, decision-making ā
āāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā š LAYER 3: DELEGATION LAYER āāāā YOU ARE HERE ā
ā š¦“ Slash Commands, š Skills - workflow definition ā
āāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā” LAYER 4: EXECUTION LAYER ā
ā š¦ Subagents, š§ Built-in, š External, šāāļø User ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
<div align="center">
ā š Main Agent Layer āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā” Execution Layer ā
</div>