Tworzenie oprogramowania z Claude Code
Dani Zysman
AI Curriculum Manager @ DataCamp

Agenty to wyspecjalizowani asystenci AI w Claude Code:
| Agent | Cel | Kiedy używać |
|---|---|---|
| Explore | Analiza kodu w trybie tylko do odczytu | „Zmapuj tę architekturę" |
| Plan | Analiza i tworzenie strategii | „Jak powinniśmy to zrobić?" |
| General | Wykonywanie zadań z pełnym dostępem do narzędzi | Domyślny dla większości zadań |
Użyj /agents, aby wyświetlić listę dostępnych agentów

.claude/agents/code-reviewer.mdname: identyfikator agentadescription: co go uruchamia___
# 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.
Przejrzyj i zatwierdź wygenerowany plik.
music-analytics-api/
app.py
routes.py # <- We'll review this file
models.py
analytics.py
CLAUDE.md
.claude/
agents/
code-reviewer.md # <- Our custom agent
Bez subagenta (działanie bezpośrednie):
"Fix the bug in routes.py"
-> Claude handles it
"Add validation here"
-> Claude handles it
Uruchamia subagenta:
"Map the architecture"
-> Explore agent
"How should we refactor?"
-> Plan agent
> @code-reviewer review @routes.py
Review Complete
Quick Fixes:
- Remove unused `session` import (line 3)
- Replace hardcoded `* 5` popularity metric with a named constant
Structural Issues:
- Album dictionaries built twice in get_album_stats() and
get_average_tracks() extract to a shared helper
- get_artist_albums() returns empty list if artist doesn't exist;
validate artist first
- No range validation on artist_id parameter
Would you like me to fix any of these?

| Typ pytania | Co się dzieje |
|---|---|
| „Co robi ta funkcja?" | Claude odpowiada bezpośrednio |
| „Jak działa autoryzacja w tym kodzie?" | agent Explore analizuje kod |
| „Jakie jest najlepsze podejście do refaktoryzacji?" | agent Plan prowadzi analizę |
| „przegląd kodu @routes.py" | obsługiwane przez niestandardowego agenta |
Tworzenie oprogramowania z Claude Code