Files
holocron/plugins/kyberforge/docs/research/docs/github-copilot-plugins/api-reference.md
Defame1297 83e1a50a51 docs(kyberforge): add GitHub Copilot plugins and sub-agents research
## Why
Parallel research track to the Claude Code plugins research already
committed. Needed to understand GitHub Copilot's extensibility model
before designing cross-tool plugin compatibility for the kyberforge
plugin system.

## Implementation Notes
Three distinct Copilot extension tracks are covered: CLI plugins
(plugin.json + marketplaces), cloud/IDE custom agents (frontmatter .md
files committed to repos), and the SDK programmatic API. The SDK track
got its own topic file (sdk.md) because the content doesn't fit neatly
into the default topic list. Sources include Context7 (/websites/github_en_copilot),
both user-provided reference URLs, and four additional deepened pages.

## Impact
Provides a reference baseline for evaluating .claude-plugin/ / plugin.json
compatibility between Claude Code and Copilot CLI — the two formats share
a manifest discovery path and the strict:false field enables cross-tool
plugin distribution.

---
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 14:22:32 +00:00

5.6 KiB

topic, source_keys
topic source_keys
api-reference
github-cli-plugin-reference
github-plugins-finding-installing
github-custom-agents-configuration
github-sdk-custom-agents
context7-github-en-copilot

API Reference

CLI Commands

copilot plugin

Command Description
copilot plugin install SPEC Install a plugin
copilot plugin uninstall NAME Remove a plugin
copilot plugin list List installed plugins
copilot plugin update NAME Update to latest version
copilot plugin enable NAME Re-enable a disabled plugin
copilot plugin disable NAME Disable without removing
copilot plugin marketplace add SPEC Register a marketplace
copilot plugin marketplace list List registered marketplaces
copilot plugin marketplace browse NAME Browse a marketplace
copilot plugin marketplace remove NAME Unregister a marketplace

Flags:

  • --force on marketplace remove — removes even if plugins from it are installed
  • --help on any subcommand — full flag reference

Plugin Install Specification Formats

Format Example
PLUGIN@MARKETPLACE database-tools@awesome-copilot
OWNER/REPO myorg/my-copilot-plugin
OWNER/REPO:PATH myorg/monorepo:plugins/dev
Git URL https://gitlab.com/org/repo.git
Local path ./my-plugin or /abs/path

In-Session Slash Commands

All copilot plugin subcommands have equivalent /plugin interactive counterparts:

  • /plugin install, /plugin list, /plugin uninstall, /plugin update
  • /plugin marketplace list, /plugin marketplace browse NAME
  • /agent — list available agents
  • /skills list, /skills reload, /skills remove

plugin.json Field Reference

Field Type Required Constraints
name string Yes Kebab-case, max 64 chars
description string No Max 1024 chars
version string No SemVer
author object No { name, email?, url? }
homepage string No
repository string No
license string No SPDX identifier
keywords string[] No
category string No
tags string[] No
agents string or string[] No Default: agents/
skills string or string[] No Default: skills/
commands string or string[] No
hooks string or object No
extensions string, string[], or object No Use { paths, exclusive: true } to disable built-ins
mcpServers string or object No
lspServers string or object No

Manifest lookup order: .plugin/plugin.json → plugin.json → .github/plugin/plugin.json → .claude-plugin/plugin.json.

CLI Agent Frontmatter Fields

Agent files are .agent.md files. Frontmatter fields:

Field Required Notes
name Yes Agent identifier
description Yes Used for automatic selection by runtime
tools No Array; omit = all tools

Cloud / IDE Agent Frontmatter Fields

Field Required Default Notes
name No — Display name
description Yes — Drives auto-selection
target No both vscode or github-copilot
tools No all Omit = all; [] = none
model No default Model identifier
disable-model-invocation No false Prevent runtime auto-selection
user-invocable No true Allow manual invocation
mcp-servers No — Cloud agent only; ignored in most IDEs
metadata No — Annotation map; ignored in VS Code

Prompt body max: 30,000 characters.

SDK CustomAgentConfig Fields

Field Type Required Notes
name string Yes Unique identifier
displayName string No Label in lifecycle events
description string No Used for intent-based routing
tools string[] or null No null/omit = all session tools
prompt string Yes System prompt
mcpServers object No Agent-scoped; not inherited from session
infer boolean No Default true; false = explicit invocation only
skills string[] No Skill names from skillDirectories

SDK Session-Level Fields (Custom Agent Relevant)

Field Type Notes
customAgents array The agent definitions
agent string Pre-activate a named agent at session start
skillDirectories string[] Directories for skill name resolution
defaultAgent.excludedTools string[] Hide tools from main agent; sub-agents still see them
model string Default model for all agents unless overridden
onPermissionRequest function Session-wide; no per-agent override

Sub-Agent Lifecycle Events (SDK)

Event Key Fields
subagent.selected agentName, agentDisplayName, tools
subagent.started toolCallId, agentName, agentDisplayName, agentDescription
subagent.completed toolCallId, agentName, agentDisplayName
subagent.failed toolCallId, agentName, agentDisplayName, error
subagent.deselected (no data)

toolCallId is stable across started/completed/failed for a single invocation.

Environment Variables

Variable Purpose
COPILOT_HOME Override config dir (default: ~/.copilot/)
COPILOT_CACHE_HOME Override marketplace cache dir
COPILOT_SKILLS_DIRS Additional skill search paths
COPILOT_PLUGIN_DATA Persistent per-plugin data dir
CLAUDE_PLUGIN_DATA Alias for COPILOT_PLUGIN_DATA
PLUGIN_ROOT Installed plugin directory (LSP scripts / hook cwd)