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:
- Asks users for their temperature unit preference
- Delegates data fetching to a specialized agent
- Invokes a skill to create visual output
Complete Implementation
Location:.claude/commands/weather-orchestrator.md
Key Implementation Details
Frontmatter Configuration
Frontmatter Configuration
- description: Shown in command menu when user types
/ - model: Uses
haikufor cost-effective orchestration (coordination, not heavy reasoning)
User Interaction
User Interaction
Agent Invocation
Agent Invocation
Task tool, NOT bash commands. The prompt includes context about the agent’s preloaded skill.Skill Invocation
Skill Invocation
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:| Component | Type | Purpose | Invocation |
|---|---|---|---|
weather-orchestrator | Command | Entry point, user interaction | User types /weather-orchestrator |
weather-agent | Agent | Data fetching with domain knowledge | Command uses Task tool |
weather-fetcher | Agent Skill | Preloaded API instructions | Injected via skills: field |
weather-svg-creator | Skill | Visual output generation | Command uses Skill tool |
Usage
Invoke the command from the Claude Code CLI:- Ask for your temperature unit preference
- Invoke the weather agent to fetch current Dubai temperature
- Invoke the SVG creator skill to generate a visual card
- Write outputs to
orchestration-workflow/weather.svgandorchestration-workflow/output.md
Creating Your Own Commands
Ask Claude to create a command for you:.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.
Related Documentation
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
