Custom Agents for Claude Code
Claude Code ships with a general-purpose agent, but it doesn't know your stack, your conventions, or your workflows. Custom agents fix that. The Setup Agents live in ~/.claude/agents/. Each is a ma...

Source: DEV Community
Claude Code ships with a general-purpose agent, but it doesn't know your stack, your conventions, or your workflows. Custom agents fix that. The Setup Agents live in ~/.claude/agents/. Each is a markdown file with YAML frontmatter: --- name: code-reviewer description: "Senior-level code review with architecture focus" model: sonnet tools: - Bash - Glob - Grep - Read --- You are a principal engineer conducting code reviews... The tools list constrains what the agent can do. A reviewer doesn't need Edit or Write. It's read-only by design. What Makes a Good Agent Prompt 1. Explicit process steps Don't assume the model knows your workflow. Spell it out: ## IMPORTANT: Process 1. **Gather context** - Run `git diff`, read modified files fully 2. **Understand intent** - What problem is this solving? 3. **Analyse systematically** - Work through each category 4. **Prioritise** - Must fix β Should fix β Consider The model follows instructions better when they're numbered and imperative. 2. What N