Skip to main content

Overview

Commands serve as entry points for multi-step workflows in Claude Code. They orchestrate user interaction, invoke subagents, and coordinate skills to accomplish complex tasks. This page shows real implementations from the Claude Code Best Practice repository, demonstrating the Command → Agent → Skill orchestration pattern.

Weather Orchestrator Command

The /weather-orchestrator command demonstrates a complete workflow that:
  1. Asks users for their temperature unit preference
  2. Delegates data fetching to a specialized agent
  3. Invokes a skill to create visual output

Complete Implementation

Location: .claude/commands/weather-orchestrator.md

Key Implementation Details

  • description: Shown in command menu when user types /
  • model: Uses haiku for cost-effective orchestration (coordination, not heavy reasoning)
Commands can gather user input before delegating to agents. This keeps the agent focused on data fetching, not UI interaction.
Critical: Use the Task tool, NOT bash commands. The prompt includes context about the agent’s preloaded skill.
Skills are invoked via the Skill tool. The temperature data from Step 2 is available in the conversation context.

Orchestration Pattern

The weather orchestrator demonstrates the Command → Agent → Skill pattern:

Usage

Invoke the command from the Claude Code CLI:
Claude will:
  1. Ask for your temperature unit preference
  2. Invoke the weather agent to fetch current Dubai temperature
  3. Invoke the SVG creator skill to generate a visual card
  4. Write outputs to orchestration-workflow/weather.svg and orchestration-workflow/output.md

Creating Your Own Commands

Ask Claude to create a command for you:
Claude will generate a markdown file at .claude/commands/deploy-preview.md with YAML frontmatter and workflow instructions.

Best Practices

Use Commands for Entry Points

Commands handle user interaction and orchestrate workflows. Keep them focused on coordination, not implementation details.

Delegate to Agents

Use the Task tool to invoke specialized agents for domain-specific work. Never use bash commands to invoke agents.

Choose the Right Model

Use haiku for simple orchestration, sonnet for reasoning, opus for complex tasks.

Clear Instructions

Provide step-by-step workflow instructions. Include critical requirements and expected outputs.

Subagents Implementation

See how agents are implemented with preloaded skills

Skills Implementation

Learn about agent skills vs standalone skills

Orchestration Workflow

Understand the complete Command → Agent → Skill pattern