All skills
Skillintermediate

šŸ”€ Layer 3: Delegation Layer

<div align="center">

Claude Code Knowledge Pack7/10/2026

Overview

<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

ComponentEmojiRoleTriggered By
Slash Commands🦓Define multi-step workflowsUser /command
SkillsšŸ“šProvide methodologiesContext 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

  1. User invokes: /generate fr-FR
  2. System loads: .claude/commands/generate.md
  3. Expands template: $ARGUMENTS → fr-FR
  4. 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

  1. Detection: Claude analyzes request context
  2. Matching: Compares against skill descriptions
  3. Loading: Injects skill content into context
  4. 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 doesDefines HOW to do thingsActually DOES things
Components🦓 Commands, šŸ“š Skills🐦 Subagents, šŸ”§šŸ”ŒšŸ’ā€ā™€ļø Tools
NatureInstructions, templatesActions, operations
Triggered byUser 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>