General-purpose subagent for Claude Code

Delegate a bounded multi-step coding task to Claude Code’s general-purpose subagent when it needs to inspect, edit, and validate together.

How to use the General-purpose subagent in Claude Code

  1. Start Claude Code inside the repo and state exactly which actions and files are in scope.
  2. Use the example below as a starting point and replace the sample task with your own.
Claude Code prompt · Try this example
Use the general-purpose subagent to fix the date formatter in src/date.ts and run the date unit tests. Leave unrelated files alone.

Delegate a small fix with an acceptance check

Give the agent one file or issue and a test command. Ask it to summarize changed files, the failing input it fixed, and the evidence from the named test suite.

Review permission and scope

General-purpose agents can have broader tools than Explore or Plan. Keep credentials and unrelated environments outside the task. Review the diff and run the same checks from the main session when useful.

Browse Agents