Sviluppo software con Claude Code
Dani Zysman
AI Curriculum Manager @ DataCamp

Gli agent sono assistenti AI specializzati in Claude Code:
| Agent | Scopo | Quando usarlo |
|---|---|---|
| Explore | Esplorazione in sola lettura del codebase | "Mappa questa architettura" |
| Plan | Ricerca e strategia | "Come dovremmo procedere?" |
| General | Esegue compiti con tutti gli strumenti | Predefinito per la maggior parte dei lavori |
Usa /agents per elencare tutti gli agent disponibili

.claude/agents/code-reviewer.mdname: Identificatore dell'agentdescription: Quando si attiva___
# code-reviewer.md
name: code-reviewer
description: Reviews code for
best practices
___
Check for:
1. Clear naming conventions
2. Proper error handling
3. Performance concerns
> /agents> [Select] Create new agent> [Select] Project level (.claude/agents)> [Select] Generate with Claude (recommended)> Create a code reviewer agent that reviews code for naming, error handling, and performance.
Rivedi e approva il file generato.
music-analytics-api/
app.py
routes.py # <- Esamineremo questo file
models.py
analytics.py
CLAUDE.md
.claude/
agents/
code-reviewer.md # <- Il nostro agent personalizzato
Nessun sotto-agent (gestito direttamente):
"Fix the bug in routes.py"
-> Claude lo gestisce
"Add validation here"
-> Claude lo gestisce
Avvia un sotto-agent:
"Map the architecture"
-> Agent Explore
"How should we refactor?"
-> Agent Plan
> @code-reviewer review @routes.py
Revisione completata
Correzioni rapide:
- Rimuovi l'import non usato `session` (riga 3)
- Sostituisci la metrica di popolarità fissa `* 5` con una costante nominata
Problemi strutturali:
- I dizionari Album sono costruiti due volte in get_album_stats() e
get_average_tracks(): estrai in un helper condiviso
- get_artist_albums() restituisce lista vuota se l'artista non esiste;
valida prima l'artista
- Nessuna validazione di intervallo sul parametro artist_id
Vuoi che sistemi qualcuno di questi?

| Tipo di domanda | Cosa succede |
|---|---|
| "What does this function do?" | Claude risponde direttamente |
| "How does auth work across this codebase?" | L'agent Explore indaga |
| "What's the best approach to refactor this?" | L'agent Plan fa ricerca |
| "code review @routes.py" | Gestito dall'agent personalizzato |
Sviluppo software con Claude Code