2.8 KiB
2.8 KiB
Sub-agents Implementation
| ← Back to Claude Code Best Practice |
The weather agent is implemented in this repo as an example of the Command → Agent → Skills architecture pattern.
Weather Agent
File: .claude/agents/weather.md
---
name: weather
description: Use this agent PROACTIVELY when you need to fetch and transform
weather data for Karachi, Pakistan. This agent fetches real-time temperature
from wttr.in API and applies transformation rules from
orchestration-workflow/input.md, writing results to
orchestration-workflow/output.md.
tools: WebFetch, Read, Write
model: sonnet
color: green
memory: project
skills:
- weather-fetcher
- weather-transformer
---
# Weather Agent
You are a specialized weather agent that fetches and transforms weather data
for Karachi, Pakistan.
## Your Task
Execute the weather workflow by following the instructions from your preloaded
skills sequentially:
1. **First**: Follow the `weather-fetcher` skill instructions to fetch the
current temperature
2. **Then**: Follow the `weather-transformer` skill instructions to apply
transformations and write results
3. **Finally**: Update your agent memory with the reading details for
historical tracking
...
The agent has two skills preloaded (weather-fetcher and weather-transformer) that provide step-by-step instructions for fetching from the wttr.in API and applying transformation rules.
How to Use
$ claude
> What is the weather in Karachi?
The weather agent is the Agent in the Command → Agent → Skills orchestration pattern. It receives the workflow from the /weather-orchestrator command and executes it using two preloaded skills (weather-fetcher, weather-transformer) within a single execution context.
| Component | Role | This Repo |
|---|---|---|
| Command | Entry point, user interaction | /weather-orchestrator |
| Agent | Orchestrates workflow with preloaded skills | weather agent |
| Skills | Domain knowledge injected at startup | weather-fetcher, weather-transformer |