One folder per agent. Claude Code loads .claude/agents//.md recursively, so the nesting is free; a file is only treated as an agent definition if its frontmatter carries a name:. Everything else in the folder is a co-located doc.
Runs before the agent uses a tool for Edit, Write, MultiEdit, NotebookEdit, Bash and Agent tool calls, executing protect-files.sh, warn-large-files.sh, scan-secrets.sh, block-dangerous-commands.sh, orchestrator-only-git.sh, require-review-receipt.sh and role-based-dispatch.py (7 commands). From chrstian6/contractor.