# Agent Frontmatter Setup

Creates and configures Claude Code agents and their frontmatter fields.

- Repository: https://github.com/Galaxy-Dawn/claude-scholar (5959 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-19
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Galaxy-Dawn/claude-scholar --skill agent-identifier -g -a claude-code -y`
Codex: `npx skills add Galaxy-Dawn/claude-scholar --skill agent-identifier -g -a codex -y`
Cursor: `npx skills add Galaxy-Dawn/claude-scholar --skill agent-identifier -g -a cursor -y`
Gemini CLI: `npx skills add Galaxy-Dawn/claude-scholar --skill agent-identifier -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Galaxy-Dawn/claude-scholar`

## Description

Use when creating or configuring Claude Code agents and their frontmatter.

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

# Agent Development for Claude Code Plugins

## Overview

Agents are autonomous subprocesses that handle complex, multi-step tasks independently. Understanding agent structure, triggering conditions, and system prompt design enables creating powerful autonomous capabilities.

**Key concepts:**
- Agents are FOR autonomous work, commands are FOR user-initiated actions
- Markdown file format with YAML frontmatter
- Triggering via description field with examples
- System prompt defines agent behavior
- Model and color customization

## When to Use

Use this skill when the user asks to:
- Create an agent
- Add an agent
- Write a subagent
- Define agent frontmatter
- Decide when to use description examples
- Configure agent tools, colors, or model behavior
- Design autonomous agent structure, triggering conditions, or system prompts

## When Not to Use

Do not use this skill for:
- Slash command design
- Hook configuration
- MCP server setup
- General plugin layout questions that belong to `plugin-structure`

## Agent File Structure

### Complete Format

```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

### name (required)

Agent identifier used for namespacing and invocation.

**Format:** lowercase, numbers, hyphens only
**Length:** 3-50 characters
**Pattern:** Must start and end with alphanumeric

The rest: https://github.com/Galaxy-Dawn/claude-scholar/blob/HEAD/skills/agent-identifier/SKILL.md
