🧩

The Ecosystem

AI engines, tools, and integrations

Ecosystem Overview

Six composable primitives β€” from always-on behavioral standards to deterministic policy enforcement.

6HooksPolicy LayerDeterministic gates that enforce rules on everything belowπŸ”’ Security checkpoint
5MCP ServersConnectivityLive access to external systems, APIs, and dataπŸ”Œ API gateway
4Agent SkillsWorkflow LayerReusable runbooks with scripts, templates, and referencesπŸ“‹ Training manual
3Custom AgentsPersona LayerSpecialist roles with tool boundaries and collaboration patternsπŸ‘€ Team member
2Prompt FilesTask LayerNamed slash commands for repeatable one-shot tasksπŸ“„ Playbook page
1Custom InstructionsBehavior LayerAlways-on standards and conventions β€” the foundation everything inheritsπŸ“˜ Employee handbook

Composable by design: A custom agent can inherit instructions, invoke skills, call MCP-provided tools, and be governed by hooks β€” all simultaneously. The primitives layer together; they don’t replace each other.

πŸ€– Copilot Coding Agent

The autonomous runtime engine that executes agentic workflows in ephemeral GitHub Actions environments.

What It Does

The Copilot coding agent is an autonomous AI developer that works independently in the background. It operates in ephemeral GitHub Actions environments where it can explore code, make changes, run tests, iterate on failures, and open pull requests.

  • Fix bugs identified in issues or code review
  • Implement incremental features from scoped descriptions
  • Improve test coverage by writing missing tests
  • Address technical debt (refactoring, dependency updates)
  • Update documentation to match code changes
  • Accelerate secret scanning remediation

Key Insight

CCA β‰  Agent Mode. The Copilot coding agent works autonomously in a GitHub Actions environment and creates PRs. Agent mode in the IDE works interactively in your local environment with human-in-the-loop control.

Session Management

  • Steering β€” Provide mid-session guidance without stopping the run
  • Resume locally β€” Open in VS Code or paste a CLI command to continue
  • Archiving β€” Stopped sessions can be archived
  • Tracking β€” Monitor from CLI, Mobile, VS Code, Raycast, JetBrains

Entry Points

Entry PointHow
GitHub IssuesAssign an issue to Copilot via the assignees dropdown or @copilot mention
Pull RequestsComment @copilot on an existing PR to request changes
Agents TabRepository-level dashboard to launch and manage sessions, select agents, pick models
Agents PanelClick the ✦ button at the top of any GitHub page
Copilot ChatStart a coding agent session from Copilot Chat on GitHub.com
VS Code / JetBrainsInitiate coding agent sessions from IDE Copilot Chat
Copilot CLIPrefix any prompt with & to delegate to the cloud coding agent
GitHub CLI / APIUse gh issue edit or the REST API to assign issues programmatically

Workflow Lifecycle

πŸ“ Issue / Promptβ†’πŸ€– Agent picks up taskβ†’πŸŒΏ Creates branchβ†’πŸ” Reads codeβ†’πŸ“‹ Plans changesβ†’βš™οΈ Implementsβ†’πŸ§ͺ Runs testsβ†’πŸ”„ Iteratesβ†’βœ… Opens PR

πŸ“˜ Custom Instructions

The foundational behavioral layer β€” always-on rules that shape every interaction across an entire repository, organization, or workspace.

Six Instruction Types

TypeFile LocationLoadingPlatformsPurpose
Repository-wide.github/copilot-instructions.mdAlways-on (every request)VS Code, JetBrains, Eclipse, Xcode, GitHub.comGlobal coding standards
Path-specific.github/instructions/*.instructions.mdFile-matched via applyTo globVS Code, GitHub.comLanguage/framework-specific rules
Agent instructionsAGENTS.md (any directory)When coding agent operatesVS Code, GitHub.com, CLIAutonomous agent procedures
Model-specificCLAUDE.md / GEMINI.mdWhen corresponding model is activeGitHub.comModel-specific tuning
PersonalVS Code User SettingsAlways-on (across workspaces)VS CodeIndividual preferences
OrganizationGitHub Org settingsAlways-on (org-wide)All platformsOrganization-level standards

Path-Specific Instructions

Use YAML frontmatter with an applyTo glob pattern to scope instructions to specific file types:

AGENTS.md

Added to the coding agent in August 2025. Key characteristics:

  • Placed anywhere in the repository
  • Nearest AGENTS.md in directory tree takes precedence
  • Subdirectory files scope to that directory and children
  • Root AGENTS.md applies globally
  • Follows the open agentsmd spec
  • CLAUDE.md and GEMINI.md are read in addition

Path-specific instructions example:

---
applyTo: "**/*.bicep"
---
When writing Bicep files, always use parameter
decorators, follow naming conventions, and include
resource descriptions for documentation.

Precedence Model

Layer 0: Personal Instructions (VS Code Settings)          ← Highest priority
Layer 1: copilot-instructions.md (repo-wide)                ← Always-on
Layer 2: *.instructions.md (matched by applyTo glob)        ← Conditionally loaded
Layer 3: AGENTS.md (when coding agent is operating)         ← Agent-scoped
Layer 4: Skill (if the task matches a skill description)    ← On-demand
Layer 5: Custom Agent prompt (if a specific agent selected) ← Explicitly selected

All applicable instructions are provided simultaneously β€” contradictions between layers should be avoided.

Best practice: Keep copilot-instructions.md concise (5–15 core rules, 200–500 tokens). Use path-specific instructions for language-specific conventions. Reserve AGENTS.md for autonomous agent operational procedures.

πŸ“„ Prompt Files

Reusable, named tasks invoked on demand as slash commands β€” bridging always-on instructions and full custom agents.

Format & Configuration

  • Markdown files in .github/prompts/*.prompt.md
  • Invoked with / in Copilot Chat (e.g., /security-review)
  • Support YAML frontmatter: agent, tools, model, description, mode
  • Built-in variables: ${selection}, ${file}, ${input:variableName}
  • Can reference a custom agent via the agent field

Example

---
mode: agent
tools: ['search/codebase', 'edit/editFiles',
        'read/problems']
description: Create a structured implementation
             plan for a new feature
---
# Feature Planning

You are a senior software architect.
Create an implementation plan for the
following feature: ${input:featureDescription}

## Requirements
- Break down into discrete tasks
- Identify affected files using codebase search
- Estimate complexity per task

When to use Prompt Files: Repeatable tasks you type the same prompt for, tasks benefiting from dynamic variables, and named slash commands the whole team can share via source control.

πŸ‘€ Custom Agents

Specialized AI personas with defined roles, tool boundaries, and collaboration patterns. Defined as .agent.md files with YAML frontmatter.

Configuration Fields

FieldPurpose
nameDisplay name (defaults to filename)
descriptionRole description (influences discovery)
toolsAllowed-tool whitelist
modelModel selection (supports fallback lists)
handoffsInter-agent transition configuration
agentsInvocable sub-agent whitelist
mcp-serversMCP server configs embedded in frontmatter
metadataKey-value annotation pairs

Configuration Scope

LevelLocationScope
Repository.github/agents/*.agent.mdCurrent project
User~/.copilot/agents/*.agent.mdAll projects
Organization.github-private repoAll org repos
EnterpriseEnterprise agent registryAll enterprise repos

Runs On

GitHub.com (Agents tab, issues, PRs, panel) Β· VS Code (GA) Β· JetBrains, Eclipse, Xcode (preview) Β· Copilot CLI (β€”agent= flag)

Collaboration Patterns

🀝 Handoffs User-Guided

Relay-race style transitions where the user explicitly confirms each switch. Shared conversation history across the chain.

πŸ”„ Sub-agents Programmatic

Manager-delegate style where the parent agent autonomously invokes child agents without user intervention.

Handoffs example:

---
name: Planner
description: Generate implementation plans
tools: ['search', 'fetch']
handoffs:
  - label: Start Implementation
    agent: Implementer
    prompt: "Implement the plan above."
    send: false  # User must click
---

Handoff flow: Planner β†’ [User clicks] β†’ Implementer β†’ [User clicks] β†’ Reviewer

  • Human-in-the-loop control
  • Shared conversation history
  • Unlimited depth

Sub-agents example:

---
name: Feature Builder
description: Build features by researching
             first, then implementing
tools: ['agent']
agents: ['Researcher', 'Implementer']
---

Sub-agent flow: Feature Builder autonomously delegates β†’ Researcher β†’ Implementer

  • Agent-autonomous (no user clicks)
  • Isolated context (clean session)
  • Single level depth only
DimensionHandoffsSub-agents
TriggerUser clicks a buttonParent agent invokes programmatically
ControlUser-driven (human-in-the-loop)Agent-autonomous
ContextShared conversation historyIsolated context (clean session)
VisibilityUser sees the agent switchTransparent β€” user sees only the result
DepthUnlimitedSingle level only
Best forMulti-stage pipelines needing human reviewAutomated divide-and-conquer tasks

MCP Servers in Agent Profiles

Custom agents can embed MCP server configurations directly in their frontmatter:

---
name: my-custom-agent-with-mcp
description: Custom agent description
tools: ['tool-a', 'tool-b', 'custom-mcp/tool-1']
mcp-servers:
  custom-mcp:
    type: 'local'
    command: 'some-command'
    args: ['--arg1', '--arg2']
    tools: ["*"]
    env:
      ENV_VAR_NAME: ${{ secrets.COPILOT_MCP_ENV_VAR_VALUE }}
---

Secret syntax supports: $COPILOT_MCP_*, ${COPILOT_MCP_*}, and ${{ secrets.COPILOT_MCP_* }}.

πŸ“‹ Agent Skills

The workflow packaging layer β€” reusable runbooks that bundle instructions, scripts, templates, and reference materials into self-contained capability packages.

Open Standard: Agent Skills follow the agentskills.io specification (originally developed by Anthropic). A skill defined once works in GitHub Copilot, Claude Code, and any other skills-compatible agent.

Progressive Loading Model (Three-Tier)

TierContentToken BudgetWhen Loaded
Tier 1 Metadataname + description (YAML frontmatter)~50–100 tokens/skillAlways in context
Tier 2 BodySKILL.md body contentRecommended < 500 tokensWhen Copilot determines relevance
Tier 3 ReferencesFiles under references/, scripts/, etc.Recommended < 1,000 tokens/fileWhen explicitly referenced

At startup, agents load only the name and description of each available skill β€” just enough to know when it might be relevant. Full content is loaded progressively.

Directory Structure

SKILL.md Format

Directory structure:

.github/skills/incident-triage/
β”œβ”€β”€ SKILL.md              # Required: primary instructions
β”œβ”€β”€ LICENSE.txt            # Recommended: license terms
β”œβ”€β”€ scripts/               # Optional: executable scripts
β”‚   β”œβ”€β”€ collect-metrics.sh
β”‚   └── notify-oncall.ps1
β”œβ”€β”€ references/            # Optional: on-demand docs
β”‚   β”œβ”€β”€ runbook.md
β”‚   └── escalation-matrix.md
β”œβ”€β”€ assets/                # Optional: static resources
β”‚   └── triage-template.md
└── templates/             # Optional: scaffolds
    └── incident-report.md

SKILL.md format:

---
name: github-actions-failure-debugging
description: >
  Guide for debugging failing GitHub Actions
  workflows. Use this when asked to debug
  failing GitHub Actions workflows.
---

To debug failing GitHub Actions workflows:

1. Use `list_workflow_runs` to look up
   recent runs and their status
2. Use `summarize_job_log_failures` for
   an AI summary of failed jobs
3. Use `get_job_logs` for full failure
   logs if needed
4. Reproduce locally, then fix and verify

Critical: The description field is the sole criterion Copilot uses to determine whether to load a skill. Include both what-it-does and when-to-use-it.

Storage Locations

TypeLocationScope
Project skills.github/skills/<name>/Current repository
Claude-compatible.claude/skills/<name>/Current repository (cross-agent)
Personal skills~/.copilot/skills/<name>/All projects for this user
Personal (Claude)~/.claude/skills/<name>/All projects for this user

Real-World Skill Examples

πŸ”’ api-security-review

Reviews APIM configs against OWASP Top 10

πŸ—οΈ architecture-design

Designs Azure architectures with WAF alignment

πŸ’° azure-pricing

Real-time Azure retail pricing lookups via MCP

⚑ gh-aw-operations

Creating, compiling, debugging GitHub Agentic Workflows

πŸ”§ terraform-provider-upgrade

Safe Terraform provider upgrades

πŸ“Š waf-assessment

Well-Architected Framework assessment across all five pillars

Skills vs Instructions

ConcernInstructionsSkills
LoadingAlways-on or pattern-matchedOn-demand (description-matched)
AssetsText onlyScripts, templates, references
Token costAlways in contextProgressive β€” loaded when relevant
PortabilityCopilot-specificOpen standard (multi-agent)
Best forSimple rules for every interactionDetailed workflows for specific tasks

πŸ”Œ MCP Integration

Model Context Protocol β€” an open standard defining how applications share context with large language models, connecting AI agents to live external systems.

Four Capability Categories

πŸ”§ Tools

Actions the agent can invoke β€” create issues, query databases, deploy services, call APIs.

πŸ“¦ Resources

Data the agent can pull into context β€” files, API responses, database rows.

πŸ’¬ Prompts

Pre-configured prompt templates contributed by the MCP server.

πŸ–₯️ MCP Apps

Interactive UI components β€” forms and visualizations rendered in chat.

Important: The Copilot coding agent on GitHub.com currently only supports tools from MCP servers. Resources, prompts, and apps are available in IDE agent mode.

GitHub MCP Server

GitHub provides a built-in MCP server giving agents native access to GitHub platform capabilities:

Issues β€” List, create, update, search
Pull Requests β€” Create, diff, files, status
Workflow Runs β€” List runs, job logs, failure summaries
Repositories β€” Search code, file contents, branches
Code Search β€” Symbols, patterns across repos
Code Scanning β€” Security analysis (GHAS)

Remote Config (Recommended)

Coding Agent Config (Cloud)

Remote MCP config:

{
  "servers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}

Uses one-click OAuth β€” no PAT or additional software required.

Coding agent MCP config:

{
  "mcpServers": {
    "sentry": {
      "command": "npx",
      "args": ["-y", "@sentry/mcp-server"],
      "env": {
        "SENTRY_AUTH_TOKEN":
          "$COPILOT_MCP_SENTRY_TOKEN"
      }
    }
  }
}

Secrets must be prefixed with COPILOT_MCP_ and stored in the copilot environment.

Configuration Locations

SurfaceConfiguration LocationNotes
VS Code (workspace).vscode/mcp.jsonShared via source control
VS Code (user)User-level mcp.jsonPersonal MCP servers
GitHub.com (repo)Repo settings β†’ Copilot β†’ Coding agentJSON config for cloud agent
Custom Agent frontmattermcp-servers property in .agent.mdMCP embedded in agent def
Organization policyGitHub org/enterprise settingsCentrally managed access
JetBrains / Eclipse / XcodeIDE-specific mcp.jsonAgent mode in IDEs

Toolsets

The GitHub MCP server supports toolsets β€” groups of related tools that can be enabled or disabled. Fewer tools means better performance and security.

https://api.githubcopilot.com/mcp/

Full access (use X-MCP-Toolsets header to filter)

πŸ”’ Hooks System

The policy enforcement layer β€” deterministic shell commands that run at strategic points in an agent’s workflow. Unlike instructions (advisory), hooks are deterministic: a deny is a deny.

Eight Hook Types

Hook TypeWhen It FiresKey Capability
sessionStartNew session begins or resumesInitialize environments, validate project state, show banners
sessionEndSession completes or terminatesCleanup resources, generate reports, session summaries
userPromptSubmittedUser submits a promptLog requests for auditing, scan for threat signals
preToolUseBefore any tool executionApprove or deny tool executions (most powerful hook)
postToolUseAfter tool completesLog results, track metrics, send alerts
agentStopMain agent finishes respondingPost-processing, notifications
subagentStopSub-agent completesValidate sub-agent results
errorOccurredError during agent executionError logging, notifications

Configuration Format

Hooks are JSON files in .github/hooks/*.json:

Input / Output Format

Hooks receive detailed JSON via stdin:

Hook configuration example:

{
  "version": 1,
  "hooks": {
    "sessionStart": [
      {
        "type": "command",
        "bash": "./scripts/session-banner.sh",
        "powershell": "./scripts/session-banner.ps1",
        "cwd": ".github/hooks",
        "timeoutSec": 10
      }
    ],
    "preToolUse": [
      {
        "type": "command",
        "bash": "./scripts/security-check.sh",
        "powershell": "./scripts/security-check.ps1",
        "cwd": "scripts",
        "env": {
          "LOG_LEVEL": "INFO"
        }
      }
    ]
  }
}

preToolUse input:

{
  "timestamp": 1704614600000,
  "cwd": "/path/to/project",
  "toolName": "bash",
  "toolArgs": "{\"command\":\"rm -rf /\"}"
}

preToolUse output (to deny):

{
  "decision": "deny",
  "reason": "Destructive command blocked"
}

postToolUse input includes results:

{
  "toolResult": {
    "resultType": "success",
    "result": "..."
  }
}

Where Hooks Run

PlatformStatusConfig Location
Copilot coding agent (GitHub.com)GA.github/hooks/*.json (default branch)
GitHub Copilot CLIGA.github/hooks/*.json (current working directory)
VS CodePreview.github/hooks/*.json

Governance Example: Comprehensive Audit Trail

{
  "version": 1,
  "hooks": {
    "sessionStart":          [{ "type": "command", "bash": "./audit/log-session-start.sh" }],
    "userPromptSubmitted":   [{ "type": "command", "bash": "./audit/log-prompt.sh" }],
    "preToolUse":            [{ "type": "command", "bash": "./audit/log-tool-use.sh" }],
    "postToolUse":           [{ "type": "command", "bash": "./audit/log-tool-result.sh" }],
    "sessionEnd":            [{ "type": "command", "bash": "./audit/log-session-end.sh" }]
  }
}

Governance Audit Hook (Community)

The governance-audit hook from awesome-copilot provides:

Threat detection β€” Scans for data exfiltration, privilege escalation, prompt injection
Governance levels β€” Open, Standard, Strict, Locked (allowlist-only)
Audit trail β€” Append-only JSON log; full prompts are never logged

Configure governance level in hooks.json env:

{
  "env": {
    "GOVERNANCE_LEVEL": "strict",
    "BLOCK_ON_THREAT": "true"
  }
}

Performance: Hooks run synchronously and block agent execution β€” keep them under 5 seconds. Default timeout is 30s. Always validate/sanitize JSON input and never log sensitive data.

πŸ”— How They Compose

The six primitives are designed to layer together. They compose β€” they don’t replace each other.

πŸ”’ HOOKS β€” Policy enforcement wraps everything below

πŸ”Œ MCP SERVERS β€” External tools available to any layer

πŸ“‹ SKILLS β€” On-demand workflows

πŸ‘€ AGENTS β€” Specialist personas

πŸ“„ PROMPT FILES β€” Named slash commands

πŸ“˜ INSTRUCTIONS β€” Always-on foundation everything inherits

Composition Rules

Layering

  • A custom agent can reference instruction files via Markdown links
  • A prompt file can set agent: to run inside a specific custom agent
  • A skill can bundle scripts that any agent or prompt file invokes
  • An MCP server provides tools any agent, prompt, or skill can call
  • Hooks enforce policy regardless of which primitive triggered the action

Decision Flow

  1. Need a rule on every request? β†’ Instructions
  2. Need a named, repeatable task? β†’ Prompt File
  3. Need a specialist persona with limited tools? β†’ Custom Agent
  4. Need a reusable runbook with scripts? β†’ Skill
  5. Need live external data? β†’ + MCP
  6. Must be enforced deterministically? β†’ + Hook

Questions 1–4 are β€œpick one” decisions. Questions 5–6 are additive layers stacked on top.

Comprehensive Comparison

DimensionInstructionsPrompt FilesCustom AgentsSkillsMCP ServersHooks
Location.github/copilot-instructions.md, AGENTS.md.github/prompts/.github/agents/.github/skills/.vscode/mcp.json, repo settings.github/hooks/
TriggerAlways-on or pattern-matchedManual slash commandUser selects or agent delegatesAuto-discovered by descriptionTool call from any surfaceAgent lifecycle events
LoadingInjected every requestOn invocationWhen selectedProgressive (3 tiers)When tools are calledOn lifecycle event
AssetsText onlyText + variablesText + tool config + MCPText + scripts + templates + refsExternal service integrationShell scripts
EnforcementAdvisoryAdvisoryAdvisory (tools bounded)AdvisoryDeterministic (success/fail)Deterministic (approve/deny)
PortabilityCopilot-specificCopilot-specificCopilot-specificOpen standardOpen standardCopilot CCA + CLI

A Mature gh-aw Repository

.github/
β”œβ”€β”€ copilot-instructions.md              # Global standards
β”œβ”€β”€ instructions/
β”‚   β”œβ”€β”€ terraform.instructions.md        # applyTo: "**/*.tf"
β”‚   β”œβ”€β”€ typescript.instructions.md       # applyTo: "**/*.ts"
β”‚   └── pipeline.instructions.md         # applyTo: "**/*.yml"
β”œβ”€β”€ prompts/
β”‚   β”œβ”€β”€ security-review.prompt.md        # /security-review
β”‚   β”œβ”€β”€ release-notes.prompt.md          # /release-notes
β”‚   └── generate-module.prompt.md        # /generate-module
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ planner.agent.md                 # Planning specialist
β”‚   β”œβ”€β”€ implementer.agent.md             # Code implementation
β”‚   β”œβ”€β”€ security-reviewer.agent.md       # Read-only security review
β”‚   └── cost-optimizer.agent.md          # Cloud cost analysis
β”œβ”€β”€ skills/
β”‚   β”œβ”€β”€ incident-triage/
β”‚   β”‚   β”œβ”€β”€ SKILL.md
β”‚   β”‚   β”œβ”€β”€ scripts/collect-metrics.sh
β”‚   β”‚   └── templates/incident-report.md
β”‚   β”œβ”€β”€ postmortem/
β”‚   β”‚   β”œβ”€β”€ SKILL.md
β”‚   β”‚   └── references/rca-template.md
β”‚   └── ci-troubleshooting/
β”‚       β”œβ”€β”€ SKILL.md
β”‚       └── scripts/diagnose-pipeline.sh
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ security-gates.json              # preToolUse: block risky commands
β”‚   └── audit-logging.json               # postToolUse: log all tool calls
AGENTS.md                                # Multi-agent operational procedures

πŸ“… Ecosystem Evolution

Key milestones in the gh-aw ecosystem.

DateMilestone
Nov 2024MCP open standard published
Jul 2025Copilot coding agent enters public preview
Aug 2025Copilot coding agent adds AGENTS.md support
Sep 2025Copilot CLI enters public preview
Nov 2025Custom agents announced for GitHub Copilot
Dec 2025Agent Skills support launched (open standard from Anthropic)
Jan 2026Agents Tab introduced for repository-level session management
Feb 2026Copilot CLI reaches GA Β· Hooks system launched
Mar 2026Custom agents in JetBrains, Eclipse, Xcode Β· GitHub MCP Registry preview Β· VS Code hooks preview