Agent skill

Claude Code Agent Authoring

by Galaxy-Dawn in Galaxy-Dawn/claude-scholar

Explains how to create Claude Code agents: file structure, YAML frontmatter fields, trigger descriptions with examples, model and color options, and system prompt design.

MITAuto-check passedAgent Workflows

Install Claude Code Agent Authoring

skills CLI
$ npx skills add Galaxy-Dawn/claude-scholar --skill agent-identifier -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Galaxy-Dawn/claude-scholar agent-identifier --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Galaxy-Dawn/claude-scholar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/agent-identifier .claude/skills/agent-identifier && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-identifier
GitHub stars
5.7k
Used in
1 other repo
Token cost
~2.6k tokens
SKILL.md length
951 words
Files
7 (incl. scripts, references)
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Explains how to create Claude Code agents: file structure, YAML frontmatter fields, trigger descriptions with examples, model and color options, and system prompt design.

  • Works in 4 steps: Triggering conditions ("Use this agent… → Multiple blocks showing usage → Context, user request, and assistant… → …
  • Creating a new Claude Code agent or subagent
  • SKILL.md covers Overview, When to Use, When Not to Use and Agent File Structure, plus 7 more sections
  • Runs Shell scripts from its folder

What it does

The skill treats agents as autonomous subprocesses for complex multi-step work, whereas commands are for user-initiated actions. An agent is a markdown file with YAML frontmatter. The name allows lowercase letters, numbers and hyphens, 3-50 characters long, starting and ending with an alphanumeric, so code-reviewer is fine while helper, my_agent and ag are not. The description is called the most critical field: it states the triggering conditions and includes several example blocks, each with context, request, response and commentary.

Guidance recommends two to four concrete examples that show proactive and reactive triggering, different phrasings of one intent, and when not to use the agent. The model field accepts inherit, which is recommended, or named models such as sonnet, and agents can also set colors and tools. The folder ships example prompts and full agent examples, reference notes on system prompt design and triggering examples, and scripts/validate-agent.sh. Slash commands, hooks, MCP setup and general plugin layout are out of scope.

When your agent uses it

  • Creating a new Claude Code agent or subagent
  • Writing agent frontmatter and trigger descriptions with examples
  • Choosing the model, color and tools for an agent
  • Designing an agent's system prompt

Example prompts

  • “Create a code-reviewer agent for my plugin with triggering examples.”
  • “Write the frontmatter for a test-generator agent that inherits the parent model.”
  • “Validate my agent file and tell me whether the description will trigger reliably.”

Requirements

  • bash, for scripts/validate-agent.sh

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Triggering conditions ("Use this agent when...")
  2. Multiple blocks showing usage
  3. Context, user request, and assistant response in each example
  4. explaining why agent triggers

What it can do on your machine

Read from SKILL.md and the folder at commit 9037873. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Claude Code Agent Authoring loads about 2.6k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 23 tokens; SKILL.md has 951 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~10k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Galaxy-Dawn/claude-scholar at commit 9037873, republished under its MIT licence (© Galaxy-Dawn). 951 words, ~2,644 tokens.

Download SKILL.mdSave it as .claude/skills/agent-identifier/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
agent-identifier
description
Use when creating or configuring Claude Code agents and their frontmatter.
version
0.1.0

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

Good examples:

  • code-reviewer
  • test-generator
  • api-docs-writer
  • security-analyzer

Bad examples:

  • helper (too generic)
  • -agent- (starts/ends with hyphen)
  • my_agent (underscores not allowed)
  • ag (too short, < 3 chars)
description (required)

Defines when Claude should trigger this agent. This is the most critical field.

Must include:

  1. Triggering conditions ("Use this agent when...")
  2. Multiple <example> blocks showing usage
  3. Context, user request, and assistant response in each example
  4. <commentary> explaining why agent triggers

Format:

Use this agent when [conditions]. Examples:

<example>
Context: [Scenario description]
user: "[What user says]"
assistant: "[How Claude should respond]"
<commentary>
[Why this agent is appropriate]
</commentary>
</example>

[More examples...]

Best practices:

  • Include 2-4 concrete examples
  • Show proactive and reactive triggering
  • Cover different phrasings of same intent
  • Explain reasoning in commentary
  • Be specific about when NOT to use the agent
model (required)

Which model the agent should use.

Options:

  • inherit - Use same model as parent (recommended)
  • sonnet - Claude Sonnet (balanced)
  • opus - Claude Opus (most capable, expensive)
  • haiku - Claude Haiku (fast, cheap)

Recommendation: Use inherit unless agent needs specific model capabilities.

color (required)

Visual identifier for agent in UI.

Options: blue, cyan, green, yellow, magenta, red

Guidelines:

  • Choose distinct colors for different agents in same plugin
  • Use consistent colors for similar agent types
  • Blue/cyan: Analysis, review
  • Green: Success-oriented tasks
  • Yellow: Caution, validation
  • Red: Critical, security
  • Magenta: Creative, generation
tools (optional)

Restrict agent to specific tools.

Format: Array of tool names

yaml
tools: ["Read", "Write", "Grep", "Bash"]

Default: If omitted, agent has access to all tools

Best practice: Limit tools to minimum needed (principle of least privilege)

Common tool sets:

  • Read-only analysis: ["Read", "Grep", "Glob"]
  • Code generation: ["Read", "Write", "Grep"]
  • Testing: ["Read", "Bash", "Grep"]
  • Full access: Omit field or use ["*"]

System Prompt Design

The markdown body becomes the agent's system prompt. Write in second person, addressing the agent directly.

Structure

Standard template:

markdown
You are [role] specializing in [domain].

**Your Core Responsibilities:**
1. [Primary responsibility]
2. [Secondary responsibility]
3. [Additional responsibilities...]

**Analysis Process:**
1. [Step one]
2. [Step two]
3. [Step three]
[...]

**Quality Standards:**
- [Standard 1]
- [Standard 2]

**Output Format:**
Provide results in this format:
- [What to include]
- [How to structure]

**Edge Cases:**
Handle these situations:
- [Edge case 1]: [How to handle]
- [Edge case 2]: [How to handle]
Best Practices

✅ DO:

  • Write in second person ("You are...", "You will...")
  • Be specific about responsibilities
  • Provide step-by-step process
  • Define output format
  • Include quality standards
  • Address edge cases
  • Keep under 10,000 characters

❌ DON'T:

  • Write in first person ("I am...", "I will...")
  • Be vague or generic
  • Omit process steps
  • Leave output format undefined
  • Skip quality guidance
  • Ignore error cases

Creating Agents

Method 1: AI-Assisted Generation

Use this prompt pattern (extracted from Claude Code):

Create an agent configuration based on this request: "[YOUR DESCRIPTION]"

Requirements:
1. Extract core intent and responsibilities
2. Design expert persona for the domain
3. Create comprehensive system prompt with:
   - Clear behavioral boundaries
   - Specific methodologies
   - Edge case handling
   - Output format
4. Create identifier (lowercase, hyphens, 3-50 chars)
5. Write description with triggering conditions
6. Include 2-3 <example> blocks showing when to use

Return JSON with:
{
  "identifier": "agent-name",
  "whenToUse": "Use this agent when... Examples: <example>...</example>",
  "systemPrompt": "You are..."
}

Then convert to agent file format with frontmatter.

See examples/agent-creation-prompt.md for complete template.

Method 2: Manual Creation
  1. Choose agent identifier (3-50 chars, lowercase, hyphens)
  2. Write description with examples
  3. Select model (usually inherit)
  4. Choose color for visual identification
  5. Define tools (if restricting access)
  6. Write system prompt with structure above
  7. Save as agents/agent-name.md

Validation Rules

Show full SKILL.md (389 more words)Show less
Identifier Validation
✅ Valid: code-reviewer, test-gen, api-analyzer-v2
❌ Invalid: ag (too short), -start (starts with hyphen), my_agent (underscore)

Rules:

  • 3-50 characters
  • Lowercase letters, numbers, hyphens only
  • Must start and end with alphanumeric
  • No underscores, spaces, or special characters
Description Validation

Length: 10-5,000 characters Must include: Triggering conditions and examples Best: 200-1,000 characters with 2-4 examples

System Prompt Validation

Length: 20-10,000 characters Best: 500-3,000 characters Structure: Clear responsibilities, process, output format

Agent Organization

Plugin Agents Directory
plugin-name/
└── agents/
    ├── analyzer.md
    ├── reviewer.md
    └── generator.md

All .md files in agents/ are auto-discovered.

Namespacing

Agents are namespaced automatically:

  • Single plugin: agent-name
  • With subdirectories: plugin:subdir:agent-name

Testing Agents

Test Triggering

Create test scenarios to verify agent triggers correctly:

  1. Write agent with specific triggering examples
  2. Use similar phrasing to examples in test
  3. Check Claude loads the agent
  4. Verify agent provides expected functionality
Test System Prompt

Ensure system prompt is complete:

  1. Give agent typical task
  2. Check it follows process steps
  3. Verify output format is correct
  4. Test edge cases mentioned in prompt
  5. Confirm quality standards are met

Quick Reference

Minimal Agent
markdown
---
name: simple-agent
description: Use this agent when... Examples: <example>...</example>
model: inherit
color: blue
---

You are an agent that [does X].

Process:
1. [Step 1]
2. [Step 2]

Output: [What to provide]
Frontmatter Fields Summary
FieldRequiredFormatExample
nameYeslowercase-hyphenscode-reviewer
descriptionYesText + examplesUse when... <example>...
modelYesinherit/sonnet/opus/haikuinherit
colorYesColor nameblue
toolsNoArray of tool names["Read", "Grep"]
Best Practices

DO:

  • ✅ Include 2-4 concrete examples in description
  • ✅ Write specific triggering conditions
  • ✅ Use inherit for model unless specific need
  • ✅ Choose appropriate tools (least privilege)
  • ✅ Write clear, structured system prompts
  • ✅ Test agent triggering thoroughly

DON'T:

  • ❌ Use generic descriptions without examples
  • ❌ Omit triggering conditions
  • ❌ Give all agents same color
  • ❌ Grant unnecessary tool access
  • ❌ Write vague system prompts
  • ❌ Skip testing

Additional Resources

Reference Files

For detailed guidance, consult:

  • references/system-prompt-design.md - Complete system prompt patterns
  • references/triggering-examples.md - Example formats and best practices
  • references/agent-creation-system-prompt.md - The exact prompt from Claude Code
Example Files

Working examples in examples/:

  • agent-creation-prompt.md - AI-assisted agent generation template
  • complete-agent-examples.md - Full agent examples for different use cases
Utility Scripts

Development tools in scripts/:

  • validate-agent.sh - Validate agent file structure
  • test-agent-trigger.sh - Test if agent triggers correctly

Implementation Workflow

To create an agent for a plugin:

  1. Define agent purpose and triggering conditions
  2. Choose creation method (AI-assisted or manual)
  3. Create agents/agent-name.md file
  4. Write frontmatter with all required fields
  5. Write system prompt following best practices
  6. Include 2-4 triggering examples in description
  7. Validate with scripts/validate-agent.sh
  8. Test triggering with real scenarios
  9. Document agent in plugin README

Focus on clear triggering conditions and comprehensive system prompts for autonomous operation.

© Galaxy-Dawn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in skills/agent-identifier of Galaxy-Dawn/claude-scholar.

  • SKILL.md
  • examples/agent-creation-prompt.md
  • examples/complete-agent-examples.md
  • references/agent-creation-system-prompt.md
  • references/system-prompt-design.md
  • references/triggering-examples.md
  • scripts/validate-agent.sh

Open the folder on GitHubat commit 9037873

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Galaxy-Dawn/claude-scholar, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Claude Code Agent Authoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Claude Code Agent Authoring compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Claude Code Agent Authoring this skillGalaxy-Dawn/claude-scholar5.7k1 repos~2.6kAutomated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official38k7 repos~2.8kAutomated safety check: PassApache-2.0
Agentforce GenerateSalesforceAIResearch/agentforce-adlc1141 repos~7.4kAutomated safety check: PassCustom licence
Subagent CreatorgreatSumini/cc-system438—~958Automated safety check: PassMIT
Prompt OptimizerCranot/roam-code517—~1.1kAutomated safety check: PassApache-2.0
Tapd Story ValidateTencentBlueKing/bk-bcs841—~1.7kAutomated safety check: PassCustom licence

Similar skills

  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 7 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Agentforce Generate

    SalesforceAIResearch/agentforce-adlc

    Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script.

    114 GitHub starsUsed in 1 repo~7.4k tokens
    Agent WorkflowsAuto-check passed
  • Subagent Creator

    greatSumini/cc-system

    Create specialized Claude Code sub-agents with custom system prompts and tool configurations.

    438 GitHub stars~958 tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check passed
  • Prompt Optimizer

    Cranot/roam-code

    Optimize a vague subagent brief into a structured Agent task brief carrying falsifier, invariant, source-citation rule, and concrete-noun anchors.

    517 GitHub stars~1.1k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check passed
  • Tapd Story Validate

    TencentBlueKing/bk-bcs

    迭代执行流水线校验阶段。对 implement 产出的代码做四维度并行校验(架构 / 安全 / CodeReview / 测试覆盖), 再按汇总结果原地修复(fullstack 需求按受影响文件路径分派 backend-developer / frontend-developer)。

    841 GitHub stars~1.7k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Tapd Story Plan

    TencentBlueKing/bk-bcs

    迭代执行流水线开发计划阶段。基于 spec.md 调用 /speckit.plan 以测试驱动开发模式构建 开发计划、技术调研与数据模型,并在同一 subagent 内就地做文档级合规自检,产出 plan-report.md。

    841 GitHub stars~886 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from Galaxy-Dawn/claude-scholar

All 34 skills in this repo
  • Citation Verification Guide

    Galaxy-Dawn/claude-scholar

    Reference guidance for checking every citation in academic writing against canonical sources such as DOI, arXiv, CrossRef and Semantic Scholar, to catch fake or wrong references.

    5.7k GitHub starsUsed in 2 repos~1.9k tokens
    Auto-check passed
  • Skill Improvement Plan Executor

    Galaxy-Dawn/claude-scholar

    Reads an improvement-plan file from a companion quality-review skill and applies its suggested fixes to a Claude Skill, backing up first.

    5.7k GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Skill Quality Reviewer

    Galaxy-Dawn/claude-scholar

    Scores a skill across description, content organization, writing style and structure, then produces letter grades and a prioritized improvement plan.

    5.7k GitHub starsUsed in 1 repo~3k tokens
    Auto-check passed
  • UI/UX Design System Advisor

    Galaxy-Dawn/claude-scholar

    Turns a vague UI request into a concrete design system with style, palette, typography and layout guidance from a search script, plus stack-specific implementation advice.

    5.7k GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Daily Paper Digest

    Galaxy-Dawn/claude-scholar

    Finds recent arXiv and bioRxiv papers on a topic, narrows them in stages to one pick per field, and writes bilingual Chinese and English summaries.

    5.7k GitHub stars~1k tokensUpdated 16 days ago
    Auto-check passed
  • Nature Data

    Galaxy-Dawn/claude-scholar

    Prepare, audit, or revise Nature-ready Data Availability statements, data repository plans, dataset citations, and FAIR metadata checklists for manuscripts.

    5.7k GitHub starsUsed in 3 repos~1.6k tokens
    Auto-check passed

Categories

Questions about Claude Code Agent Authoring

What does Claude Code Agent Authoring do?

Explains how to create Claude Code agents: file structure, YAML frontmatter fields, trigger descriptions with examples, model and color options, and system prompt design. The skill treats agents as autonomous subprocesses for complex multi-step work, whereas commands are for user-initiated actions. An agent is a markdown file with YAML frontmatter.

When should I use Claude Code Agent Authoring?

Claude Code Agent Authoring fits situations like: creating a new Claude Code agent or subagent; writing agent frontmatter and trigger descriptions with examples; choosing the model, color and tools for an agent; designing an agent's system prompt.

How do I install Claude Code Agent Authoring in Claude Code?

Run `npx skills add Galaxy-Dawn/claude-scholar --skill agent-identifier -a claude-code`. Or copy the skill folder (skills/agent-identifier in Galaxy-Dawn/claude-scholar) into .claude/skills/agent-identifier in your project. Claude Code loads it when a task matches its description.

How do I install Claude Code Agent Authoring in Codex?

Run `npx skills add Galaxy-Dawn/claude-scholar --skill agent-identifier -a codex`. Or copy the skill folder (skills/agent-identifier in Galaxy-Dawn/claude-scholar) into .agents/skills/agent-identifier in your project. Codex loads it when a task matches its description.

Can I use Claude Code Agent Authoring in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Galaxy-Dawn/claude-scholar --skill agent-identifier -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-identifier, .gemini/skills/agent-identifier, .github/skills/agent-identifier and .opencode/skills/agent-identifier in your project.

What does Claude Code Agent Authoring need to run?

Going by SKILL.md and its folder, Claude Code Agent Authoring needs a shell for the scripts in its folder. Our summary lists: bash, for scripts/validate-agent.sh.

Does Claude Code Agent Authoring access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Claude Code Agent Authoring safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Claude Code Agent Authoring use?

Claude Code Agent Authoring is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Claude Code Agent Authoring use?

About 2.6k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.6k tokens, read only when the agent opens those files.

What are the alternatives to Claude Code Agent Authoring?

Skills that share tags, products or a category with Claude Code Agent Authoring: Claude Code Agent Development (anthropics/claude-plugins-official, 38k stars), Agentforce Generate (SalesforceAIResearch/agentforce-adlc, 114 stars), Subagent Creator (greatSumini/cc-system, 438 stars) and Prompt Optimizer (Cranot/roam-code, 517 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Claude Code Agent Authoring?

Galaxy-Dawn (a GitHub user) maintains it in Galaxy-Dawn/claude-scholar, which has 5,717 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on September 23, 2026.

Source: Galaxy-Dawn/claude-scholar on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.