# Create Agent

Comprehensive guide for creating Claude Code agents with proper structure, triggering...

- Repository: https://github.com/NeoLabHQ/context-engineering-kit (1797 stars)
- Category: AI and agents
- License: GPL-3.0
- Last updated: 2026-08-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add NeoLabHQ/context-engineering-kit --skill create-agent -g -a claude-code -y`
Codex: `npx skills add NeoLabHQ/context-engineering-kit --skill create-agent -g -a codex -y`
Cursor: `npx skills add NeoLabHQ/context-engineering-kit --skill create-agent -g -a cursor -y`
Gemini CLI: `npx skills add NeoLabHQ/context-engineering-kit --skill create-agent -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add NeoLabHQ/context-engineering-kit`

## Description

Comprehensive guide for creating Claude Code agents with proper structure, triggering conditions, system prompts, and validation - combines official Anthropic best practices with proven patterns

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

# Create Agent Command

Create autonomous Claude Code agents that handle complex, multi-step tasks independently. This command provides comprehensive guidance based on official Anthropic documentation and proven patterns.

## User Input

```text
Agent Name: $1
Description: $2
```

## What Are Agents?

Agents are **autonomous subprocesses** spawned via the Task tool that:

- Handle complex, multi-step tasks independently
- Have their own isolated context window
- Return results to the parent conversation
- Can be specialized for specific domains

| Concept | Agent | Command |
|---------|-------|---------|
| **Trigger** | Claude decides based on description | User invokes with `/name` |
| **Purpose** | Autonomous work | User-initiated actions |
| **Context** | Isolated subprocess | Shared conversation |
| **File format** | `agents/*.md` | `commands/*.md` |

## Agent File Structure

Agents use a unique format combining **YAML frontmatter** with a **markdown system prompt**:

```markdown
---
name: agent-identifier
description: Use this agent when [triggering conditions]. Examples:

<example>
Context: [Situation description]
user: "[User request]"
assistant: "[How assistant should respond and use this agent]"
<commentary>
[Why this agent should be triggered]
</commentary>
</example>

<example>
[Additional example...]
</example>

model: inherit
color: blue
tools: ["Read", "Write", "Grep"]
---

You are [agent role description]...

**Your Core Responsibilities:**
1. [Responsibility 1]
2. [Responsibility 2]

**Analysis Process:**
[Step-by-step workflow]

**Output Format:**
[What to return]
```

## Frontmatter Fields Reference

### Required Fields

#### `name` (Required)

**Format**: Lowercase with hyphens only
**Length**: 3-50 characters
**Rules**:

- Must start and end with alphanumeric character
- Only lowercase letters, numbers, and hyphens
- No underscores, spaces, or special characters

The rest: https://github.com/NeoLabHQ/context-engineering-kit/blob/HEAD/antigravity/skills/create-agent/SKILL.md
