PRODUCTION SCENARIO
A team wants a code-review helper that scans files and reports findings but must never modify the repository. The same helper should be available to every engineer who clones the repo.
How should the helper be defined?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: A subagent in .claude/agents/ with tools limited to Read, Grep, and Glob
Project subagents live in .claude/agents/ and ship with the repository, so every engineer who clones it gets the helper. The tools field is an allowlist and omitting it inherits every tool including editing; a file under the home directory is personal to one machine.
Official Source: https://code.claude.com/docs/en/sub-agents ↗