Subagent files

A subagent is a markdown file with a fence around it

# ~/.claude/agents/repo-scout.md
---
name: repo-scout
description: Mechanical search and
  inventory across a codebase...1
model: haiku2
tools: Read, Grep, Glob, mcp__brain3
disallowedTools: Agent, mcp__gingugu4
---
You are a search and inventory
specialist. Answer with evidence,
never with a summary...
  1. 1
    The description decides when it gets used. Claude reads it to pick a subagent, so say what sets this one apart.
  2. 2
    Pin the model. A search job never needs Opus.
  3. 3
    Allowlist the tools. With no Bash on the list, it can't run a shell command at all. Taking a tool away beats asking it not to use one.
  4. 4
    No subagents of its own, and no full-access memory. It gets a fenced copy instead (two slides on).
🛡️It pays for itselfOur security-reviewer caught a data-loss bug in an install path after hand testing and seven unit tests had passed.