Claude Code によるソフトウェア開発
Dani Zysman
AI Curriculum Manager @ DataCamp

エージェントとは、Claude Code 内の専門的な AI アシスタントです。
| エージェント | 目的 | 使用場面 |
|---|---|---|
| Explore | 読み取り専用でコードベースを調査 | 「このアーキテクチャを把握したい」 |
| Plan | 調査と戦略立案 | 「どう進めるべきか?」 |
| General | すべてのツールでタスクを実行 | ほとんどの作業で既定として使用 |
/agents で利用可能なエージェントを一覧表示できます

.claude/agents/code-reviewer.mdname:エージェントの識別子description:起動条件___
# 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.
生成されたファイルを確認して承認しましょう。
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
サブエージェントなし(直接処理):
"Fix the bug in routes.py"
-> Claude handles it
"Add validation here"
-> Claude handles it
サブエージェントを起動:
"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?

| 質問の種類 | 動作 |
|---|---|
| 「この関数は何をしますか?」 | Claude が直接回答 |
| 「このコードベース全体で認証はどう機能しますか?」 | Explore エージェントが調査 |
| 「これをリファクタリングする最善の方法は?」 | Plan エージェントが調査 |
| 「code review @routes.py」 | カスタムエージェントが処理 |
Claude Code によるソフトウェア開発