traduction
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
# Implémentation des commandes
|
||||
|
||||

|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><a href="../">← Retour à Claude Code Best Practice</a></td>
|
||||
<td align="right"><img src="../../!/claude-jumping.svg" alt="Claude" width="60" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
---
|
||||
|
||||
<a href="#weather-orchestrator"><img src="../../!/tags/implemented-hd.svg" alt="Implemented"></a>
|
||||
|
||||
La commande weather orchestrator est implémentée dans ce repo comme point d'entrée du pattern d'architecture **Command → Agent → Skill**, démontrant comment les commandes orchestrent des workflows multi-étapes.
|
||||
|
||||
---
|
||||
|
||||
## Weather Orchestrator
|
||||
|
||||
**Fichier** : [`.claude/commands/weather-orchestrator.md`](../../.claude/commands/weather-orchestrator.md)
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: Fetch weather data for Dubai and create an SVG weather card
|
||||
model: haiku
|
||||
---
|
||||
|
||||
# Weather Orchestrator Command
|
||||
|
||||
Fetch the current temperature for Dubai, UAE and create a visual SVG weather card.
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1: Ask User Preference
|
||||
Use the AskUserQuestion tool to ask the user whether they want the temperature
|
||||
in Celsius or Fahrenheit.
|
||||
|
||||
### Step 2: Fetch Weather Data
|
||||
Use the Agent tool to invoke the weather agent:
|
||||
- subagent_type: weather-agent
|
||||
- prompt: Fetch the current temperature for Dubai, UAE in [unit]...
|
||||
|
||||
### Step 3: Create SVG Weather Card
|
||||
Use the Skill tool to invoke the weather-svg-creator skill:
|
||||
- skill: weather-svg-creator
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
La commande orchestre l'ensemble du workflow : elle demande à l'utilisateur sa préférence d'unité de température, invoque le `weather-agent` via l'outil Agent, puis invoque le skill `weather-svg-creator` via l'outil Skill.
|
||||
|
||||
---
|
||||
|
||||
## 
|
||||
|
||||
```bash
|
||||
$ claude
|
||||
> /weather-orchestrator
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 
|
||||
|
||||
Demande à Claude d'en créer une pour toi — il génère le fichier markdown avec frontmatter YAML et corps dans `.claude/commands/<name>.md`
|
||||
|
||||
---
|
||||
|
||||
<a href="https://github.com/shanraisshan/claude-code-best-practice#orchestration-workflow"><img src="../../!/tags/orchestration-workflow-hd.svg" alt="Orchestration Workflow"></a>
|
||||
|
||||
Le weather orchestrator est la **Command** dans le pattern d'orchestration Command → Agent → Skill. Il sert de point d'entrée — gérant l'interaction utilisateur (préférence d'unité de température), déléguant la récupération des données au `weather-agent`, et invoquant le skill `weather-svg-creator` pour la sortie visuelle.
|
||||
|
||||
<p align="center">
|
||||
<img src="../../orchestration-workflow/orchestration-workflow.svg" alt="Flux d'architecture Command Skill Agent" width="100%">
|
||||
</p>
|
||||
|
||||
| Composant | Rôle | Dans ce repo |
|
||||
|-----------|------|-----------|
|
||||
| **Command** | Point d'entrée, interaction utilisateur | [`/weather-orchestrator`](../../.claude/commands/weather-orchestrator.md) |
|
||||
| **Agent** | Récupère les données avec un skill préchargé (skill d'agent) | [`weather-agent`](../../.claude/agents/weather-agent.md) avec [`weather-fetcher`](../../.claude/skills/weather-fetcher/SKILL.md) |
|
||||
| **Skill** | Crée la sortie indépendamment (skill) | [`weather-svg-creator`](../../.claude/skills/weather-svg-creator/SKILL.md) |
|
||||
Reference in New Issue
Block a user