LoslegenKostenlos loslegen

Fix a weak subagent config

A teammate left a code-reviewer subagent at .claude/agents/code-reviewer.md that has two problems:

  1. No stopping condition. Its system prompt just says "find problems and keep going until you are satisfied", so it tends to run for a long time and emit sprawling, unfocused reviews.
  2. Too much power. Its tools: list includes Edit and Write, which means the subagent can rewrite the very code it's supposed to be reviewing.

Fix both problems by editing the config.

Diese Übung ist Teil des Kurses

Introduction to Subagents

Kurs anzeigen

Anleitung zur Übung

  • Start Claude Code with claude.
  • Ask Claude to update @.claude/agents/code-reviewer.md to add a structured output format with the sections: Summary, Critical Issues, Major Issues, Minor Issues, Recommendations, Approval Status, and Obstacles Encountered.
  • Then ask Claude to restrict the subagent's tools to read-only plus Bash: that means Bash, Glob, Grep, Read. Edit and Write should be removed.
  • Type /exit to exit Claude Code.

Interaktive Übung

In dieser interaktiven Übung kannst du die Theorie in die Praxis umsetzen.

Übung starten