Skip to main content

Creating Agents

Folder: .github/skills/tsh-creating-agents/ Used by: Copilot Engineer

Provides templates, guidelines, and a structured process for building custom agent definitions (.agent.md) that describe behavior, personality, responsibilities, and problem-solving approaches.

Core Design Principles

  • Separation of concerns — An agent file defines WHO the agent is. It must NOT define HOW specific workflows are executed (that belongs in skills) or WHAT triggers them (that belongs in prompts).
  • XML syntax — All structured content inside the agent body uses XML-like tags for reliable parsing across LLM model tiers.
  • Minimal scope — Only include context the LLM doesn't already have. Every token competes for context window space.

Agent File Structure

SectionPurpose
YAML Frontmatterdescription, tools, model (optional), user-invocable flag
Agent RoleWHO the agent is, responsibilities, boundaries
Behavior GuidelinesDecision-making rules, communication style
Skills UsageWhich skills to load and when
Tool UsageHow to use each configured tool
HandoffsTransitions to other agents with intent and prompt references

Validation Checklist

  • YAML frontmatter is syntactically valid
  • All required sections present
  • No workflow steps embedded (skill territory)
  • No coding standards embedded (instructions territory)
  • Tools listed match the agent's stated role
  • Handoff references use correct tsh- prefixed names

Connected Skills

  • tsh-creating-skills — For creating matching skills that complement the agent.
  • tsh-creating-prompts — For creating prompts that route to the agent.
  • tsh-creating-instructions — For scoped coding conventions the agent should follow.