Introduction
Plugins are packages that extend the functionality of Copilot CLI. See About GitHub Copilot plugins.
Note
You can find help on using plugins by entering copilot plugin [SUBCOMMAND] --help in the terminal.
Plugin structure
A plugin consists of a directory with a specific structure and a plugin.json manifest file. Agent Plugins 1.0 requires the manifest at the plugin root. Legacy plugins support additional manifest locations. A plugin can also contain any combination of agents, skills, hooks, and MCP server configurations.
Copilot CLI supports two plugin formats:
- Agent Plugins 1.0, a portable format for skills and MCP servers. Declaring the canonical
$schemainplugin.jsonopts the plugin into this format. - The legacy Copilot format, which supports Copilot-specific components and configurable component paths. A manifest without the Agent Plugins
$schemacontinues to use this format.
Both formats are supported. Choose Agent Plugins 1.0 when you want to make skills and MCP servers portable across compatible clients. Choose the legacy format when you need custom component paths or are maintaining an existing Copilot-specific plugin. In Agent Plugins 1.0, skills and MCP servers are portable, and Copilot-specific components such as agents, commands, rules, hooks, and LSP servers come from the com.github.copilot directory in the plugin.
Creating a plugin
-
Create a directory for your plugin.
-
Choose a plugin format, then add a
plugin.jsonmanifest file to the root of the directory.To create an Agent Plugins 1.0 plugin, include the canonical
$schema:Example Agent Plugins 1.0
plugin.jsonfileJSON { "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", "name": "my-dev-tools", "description": "React development utilities", "version": "1.2.0", "author": { "name": "Jane Doe", "email": "jane@example.com" }, "license": "MIT", "keywords": ["react", "frontend"] }{ "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", "name": "my-dev-tools", "description": "React development utilities", "version": "1.2.0", "author": { "name": "Jane Doe", "email": "jane@example.com" }, "license": "MIT", "keywords": ["react", "frontend"] }The schema allows only
$schema,name,version,description,author,homepage,repository,license,keywords, andextensionsas top-level fields. Unknown top-level fields are reported and ignored. Theextensionsfield is a map of client-specific data keyed by reverse-domain namespace.To create a legacy plugin, omit the Agent Plugins
$schema. You can use component path fields in the manifest:Example legacy
plugin.jsonfileJSON { "name": "my-dev-tools", "description": "React development utilities", "agents": "agents/", "skills": ["skills/", "extra-skills/"], "hooks": "hooks.json", "mcpServers": ".mcp.json" }{ "name": "my-dev-tools", "description": "React development utilities", "agents": "agents/", "skills": ["skills/", "extra-skills/"], "hooks": "hooks.json", "mcpServers": ".mcp.json" }For details of the full set of fields you can include in this file, see GitHub Copilot CLI plugin reference.
-
Add components to your plugin.
In an Agent Plugins 1.0 plugin, skills must be immediate subdirectories of
skills/, and each skill must contain aSKILL.mdfile. MCP configuration must be inmcp.jsonat the plugin root. You cannot override these locations inplugin.json. Copilot-specific components go in thecom.github.copilotdirectory, such ascom.github.copilot/agents/for custom agents andcom.github.copilot/hooks/hooks.jsonfor hooks.In a legacy plugin, use the default component locations or the component paths configured in
plugin.json.For example:
-
Add an agent by creating a
NAME.agent.mdfile in anagentssubdirectory. In an Agent Plugins 1.0 plugin, create the file incom.github.copilot/agents/. In a legacy plugin, create it inagents/.Markdown --- name: my-agent description: Helps with specific tasks tools: ["bash", "edit", "view"] --- You are a specialized assistant that...
--- name: my-agent description: Helps with specific tasks tools: ["bash", "edit", "view"] --- You are a specialized assistant that... -
Add a skill by creating a
skills/NAMEsubdirectory of your plugin directory, whereNAMEis the name of your skill. Then, within this subdirectory, create aSKILL.mdfile that defines the skill.For example, to create a "deploy" skill, create
skills/deploy/SKILL.md:Markdown --- name: deploy description: Deploy the current project to... --- Instructions for the skill...
--- name: deploy description: Deploy the current project to... --- Instructions for the skill... -
For an Agent Plugins 1.0 plugin, add MCP servers in a root
mcp.jsonfile. The MCP configuration uses its own Agent Plugins schema:JSON { "$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json", "mcpServers": { "deployment-api": { "type": "streamable-http", "url": "https://deploy.example.com/mcp" }, "local-validator": { "type": "stdio", "command": "node", "args": ["${PLUGIN_ROOT}/server/index.js"], "cwd": "${PLUGIN_ROOT}", "env": { "DATA_DIR": "${PLUGIN_DATA}/validator" } } } }{ "$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json", "mcpServers": { "deployment-api": { "type": "streamable-http", "url": "https://deploy.example.com/mcp" }, "local-validator": { "type": "stdio", "command": "node", "args": ["${PLUGIN_ROOT}/server/index.js"], "cwd": "${PLUGIN_ROOT}", "env": { "DATA_DIR": "${PLUGIN_DATA}/validator" } } } }The
streamable-httptransport name is accepted for Streamable HTTP servers. Forstdioservers, Copilot CLI providesPLUGIN_ROOTandPLUGIN_DATAenvironment variables and expands${PLUGIN_ROOT}and${PLUGIN_DATA}inargs,envvalues, andcwd.
-
-
Install your plugin locally, so that you can test it as you develop it.
For example, where
./my-pluginis the path to your plugin directory, enter:Shell copilot plugin install ./my-plugin
copilot plugin install ./my-plugin -
Verify that the plugin loaded successfully by viewing your list of installed plugins:
Shell copilot plugin list
copilot plugin listOr you can start a new interactive session and enter:
Copilot prompt /plugin list
/plugin list -
Verify that the agents, skills, hooks, and MCP server configurations you defined are loaded correctly.
For example, in an interactive session, to check that custom agents defined in the plugin were loaded, enter:
Copilot prompt /agent
/agentTo check that skills defined in the plugin were loaded, enter:
Copilot prompt /skills list
/skills list -
Use the functionality provided by your plugin's components to verify that each component works as expected.
-
Iterate on your plugin development, as required.
Important
When you install a plugin its components are cached and the CLI reads from the cache for subsequent sessions. To pick up changes made to a local plugin install it again:
Shell copilot plugin install ./my-plugin
copilot plugin install ./my-plugin -
After you have finished testing, you can uninstall the local version of your plugin by entering:
Shell copilot plugin uninstall NAME
copilot plugin uninstall NAMENote
To uninstall a plugin, use the name of the plugin as specified in the
namefield of the plugin'splugin.jsonmanifest file, not the path to the plugin's directory.
Distributing your plugin
To distribute your plugin, you can add it to a marketplace. See Creating a plugin marketplace for GitHub Copilot CLI.