traduction
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
# Implémentation des sous-agents
|
||||
|
||||

|
||||
|
||||
<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-agent"><img src="../../!/tags/implemented-hd.svg" alt="Implemented"></a>
|
||||
|
||||
Le weather agent est implémenté dans ce repo comme exemple du pattern d'architecture **Command → Agent → Skill**, démontrant deux patterns de skill distincts.
|
||||
|
||||
---
|
||||
|
||||
## Weather Agent
|
||||
|
||||
**Fichier** : [`.claude/agents/weather-agent.md`](../../.claude/agents/weather-agent.md)
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: weather-agent
|
||||
description: Use this agent PROACTIVELY when you need to fetch weather data for
|
||||
Dubai, UAE. This agent fetches real-time temperature from Open-Meteo
|
||||
using its preloaded weather-fetcher skill.
|
||||
allowedTools:
|
||||
- "Read"
|
||||
- "Skill"
|
||||
model: sonnet
|
||||
color: green
|
||||
maxTurns: 5
|
||||
permissionMode: acceptEdits
|
||||
memory: project
|
||||
skills:
|
||||
- weather-fetcher
|
||||
---
|
||||
|
||||
# Weather Agent
|
||||
|
||||
You are a specialized weather agent that fetches weather data for Dubai,
|
||||
UAE.
|
||||
|
||||
## Your Task
|
||||
|
||||
Execute the weather workflow by following the instructions from your preloaded
|
||||
skill:
|
||||
|
||||
1. **Fetch**: Follow the `weather-fetcher` skill instructions to fetch the
|
||||
current temperature
|
||||
2. **Report**: Return the temperature value and unit to the caller
|
||||
3. **Memory**: Update your agent memory with the reading details for
|
||||
historical tracking
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
L'agent a un skill préchargé (`weather-fetcher`) qui fournit les instructions pour récupérer depuis Open-Meteo. Il renvoie la valeur de température et l'unité à la commande appelante.
|
||||
|
||||
---
|
||||
|
||||
## 
|
||||
|
||||
```bash
|
||||
$ claude
|
||||
> what is the weather in dubai?
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 
|
||||
|
||||
Tu peux créer un agent avec la commande `/agents`,
|
||||
```bash
|
||||
$ claude
|
||||
> /agents
|
||||
```
|
||||
|
||||
ou demander à Claude d'en créer un pour toi — il génère le fichier markdown avec frontmatter YAML et corps dans `.claude/agents/<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 agent est l'**Agent** dans le pattern d'orchestration Command → Agent → Skill. Il reçoit le workflow de la commande `/weather-orchestrator` et récupère la température via son skill préchargé (`weather-fetcher`). La commande invoque ensuite le skill autonome `weather-svg-creator` pour créer 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