# Creating Claude Agents

Use when creating or improving Claude Code agents.

- Repository: https://github.com/AgentWorkforce/relay (1088 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add AgentWorkforce/relay --skill creating-claude-agents -g -a claude-code -y`
Codex: `npx skills add AgentWorkforce/relay --skill creating-claude-agents -g -a codex -y`
Cursor: `npx skills add AgentWorkforce/relay --skill creating-claude-agents -g -a cursor -y`
Gemini CLI: `npx skills add AgentWorkforce/relay --skill creating-claude-agents -g -a gemini-cli -y`

## Description

Use when creating or improving Claude Code agents. Expert guidance on agent file structure, frontmatter, persona definition, tool access, model selection, and validation against schema.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Creating Claude Code Agents - Expert Skill

Use this skill when creating or improving Claude Code agents. Provides comprehensive guidance on agent structure, schema validation, and best practices for building long-running AI assistants.

## When to Use This Skill

Activate this skill when:

- User asks to create a new Claude Code agent
- User wants to improve an existing agent
- User needs help with agent frontmatter or structure
- User is troubleshooting agent validation issues
- User wants to understand agent format requirements
- User asks about agent vs skill vs slash command differences

## Quick Reference

### Agent File Structure

```markdown
---
name: agent-name
description: When and why to use this agent
allowed-tools: Read, Write, Bash
model: sonnet
agentType: agent
---

# 🔍 Agent Display Name

You are [persona definition - describe the agent's role and expertise].

## Instructions

[Clear, actionable guidance on what the agent does]

## Process

[Step-by-step workflow the agent follows]

## Examples

[Code samples and use cases demonstrating the agent's capabilities]
```

### File Location

**Required Path:**

```
.claude/agents/*.md
```

Agents must be placed in `.claude/agents/` directory as markdown files.

## Frontmatter Requirements

### Required Fields

| Field         | Type   | Description                                   | Example                                                |
| ------------- | ------ | --------------------------------------------- | ------------------------------------------------------ |
| `name`        | string | Agent identifier (lowercase, hyphens only)    | `code-reviewer`                                        |
| `description` | string | Brief overview of functionality and use cases | `Reviews code for best practices and potential issues` |

### Optional Fields

The rest: https://github.com/AgentWorkforce/relay/blob/HEAD/.claude/skills/creating-claude-agents-skill/SKILL.md
