> ## Documentation Index
> Fetch the complete documentation index at: https://gnero.genetind.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Agents

## Custom Agents

### 10.1 Agent Definition File Format

Agent definition files are stored at `.claude/agents/{name}.md`, using YAML front matter:

```markdown theme={null}
---
name: agent-name
description: |
  One-line description of what this agent does.
tools: Read, Write, Edit, Bash, Glob, Grep
model: opus
---
# Agent Name

Agent instructions go here...
```

### 10.2 Available Tools and Model Selection

**Available tools**:

| Tool                                  | Description        |
| ------------------------------------- | ------------------ |
| Read                                  | Read files         |
| Write                                 | Write files        |
| Edit                                  | Edit files         |
| Bash                                  | Execute commands   |
| Glob                                  | File search        |
| Grep                                  | Content search     |
| Task                                  | Invoke sub-Agents  |
| Skill                                 | Invoke Skills      |
| mcp\_\_exa\_\_web\_search\_exa        | Web search         |
| mcp\_\_exa\_\_get\_code\_context\_exa | Code search        |
| mcp\_\_chrome-devtools\_\_\*          | Browser automation |

**Model selection**:

| Model    | Use Case                                            |
| -------- | --------------------------------------------------- |
| `opus`   | Complex tasks (implementation, checking, debugging) |
| `sonnet` | Medium tasks                                        |
| `haiku`  | Simple, fast tasks                                  |

### 10.3 Modifying Existing Agents

For example, adding timeout control to the Check Agent:

```markdown theme={null}
---
name: check
description: |
  Code quality check expert with 10-minute timeout.
tools: Read, Write, Edit, Bash, Glob, Grep
model: opus
timeout: 600000
---
```

### 10.4 Creating a New Agent

````markdown theme={null}
---
name: test
description: |
  Test writing expert. Writes comprehensive tests for code changes.
tools: Read, Write, Edit, Bash, Glob, Grep
model: opus
---
# Test Agent

You are the Test Agent in the Trellis workflow.

## Core Responsibilities

1. **Analyze code changes** - Understand what was modified
2. **Write unit tests** - Cover new functionality
3. **Write integration tests** - Test cross-module interactions
4. **Run tests** - Verify all tests pass

## Workflow

### Step 1: Get Changes

```bash
git diff --name-only
````

### Step 2: Identify Testable Code

For each changed file, identify functions/components that need tests.

### Step 3: Write Tests

Follow existing test patterns in the codebase.

### Step 4: Run Tests

```bash theme={null}
pnpm test
```

```

---
```
