Hands-On with Sub-Agents

Hands-On with Sub-Agents

This article provides a hands-on walkthrough of creating and running a dedicated Java Code Reviewer sub-agent in the Claude Code environment, building on the concepts and principles of the Sub-Agent architecture.

Rather than manually creating and configuring agent files, we will leverage Claude Code’s built-in Create New Agent feature through the /agent command to streamline the setup process. Along the way, we will explore how to configure read-only tool permissions, enable project-scoped Auto Memory, and utilize natural language prompts and @mentions to review a Java bulletin board application containing intentionally injected issues within the PostService implementation.

By the end of this tutorial, you will have experienced the complete workflow of delegating code review tasks to a specialized sub-agent and seamlessly receiving its analysis results back in the main Claude Code session.

Site footer