Vibe Coding for Production
Exercises

Subagents

Author two subagents and run them in parallel to audit a small library.

Goal

Practice the subagent loop: define a small set of focused workers, hand them a piece of work, and let them run in parallel. The exercise gives you a tiny library with seeded bugs and very few tests, so the subagents have something concrete to chew on.

Getting started

The repository ships a starter with two stub subagent definitions in .claude/agents/.

npm install
npm test
claude

What you do

Open the stubs. Read .claude/agents/code-reviewer.md and .claude/agents/test-finder.md. Each has frontmatter and a to-do list. Finish them so each subagent has a clear description, a focused prompt, and the right tool set.
Try one at a time. Ask Claude in this folder "use the code-reviewer subagent to review src/user-service.js". Watch it spawn. Read the output.
Run them in parallel. Ask "use the code-reviewer and test-finder subagents in parallel: code-reviewer on src/, test-finder on the whole repo. Merge their findings."
Compare the parallel run against doing both pieces of work in the main conversation by hand. Note the speed difference and whether the main thread context stays cleaner.

Done when

  • Both subagents have non-stub frontmatter and prompts.
  • You can demo a single-shot delegation to one subagent and a parallel delegation to both.
  • You can name one kind of work in your real job that is a good fit for a subagent and one that is not.

See also

On this page