Build an Agent Plugin (Educational Reference Example)
An educational reference plugin and authoring guide for building harness-agnostic Agent Plugins that work across GitHub Copilot, Claude Code, and Google Antigravity.
Educational / Non-Installable Example: This directory lives under
examples/build-an-agent-plugin/(outsideplugins/and omitted from.claude-plugin/marketplace.json) so it is not installed when users add the marketplace or runagy plugin install .. Use it as a template and reference when creating new installable plugins underplugins/<your-plugin>/.
Dual-Manifest Layout
Every portable plugin in this marketplace keeps its shared components (such as skills/<name>/SKILL.md) at the plugin root and ships two plugin-level manifests:
examples/build-an-agent-plugin/
├── plugin.json # Agent Plugins v1.0.0 (Copilot, VS Code, Cursor)
├── .antigravity-plugin/
│ └── plugin.json # Google Antigravity v1 (shadows root plugin.json)
├── README.md
└── skills/
└── build-an-agent-plugin/
├── SKILL.md # Short activation guide (progressive disclosure)
└── references/
├── layout.md # Multi-harness layout & marketplace.json
├── manifests.md # Validated plugin.json examples
├── skills.md # SKILL.md frontmatter & disclosure checklist
└── mcp-config.md # Validated mcp.json & mcp_config.json examples
- Root
plugin.jsonimplements Agent Plugins v1.0.0 (https://agent-plugins.org/schemas/1.0.0/plugin.schema.json), consumed directly by GitHub Copilot CLI and other Agent Plugins 1.0 clients. .antigravity-plugin/plugin.jsonimplements Google Antigravity v1 (https://antigravity.google/schemas/v1/plugin.json). It takes precedence over rootplugin.jsonat runtime in Antigravity while keeping the portable manifest intact.- Claude Code reads the plugin entry from the repository catalog at
.claude-plugin/marketplace.jsonand discoversskills/<name>/SKILL.mddirectly from the plugin root..claude-plugin/plugin.jsonis intentionally omitted to avoid a third manifest and duplicate-versionwarnings. - No live MCP config files: This example does not bundle an MCP server executable, so it omits live
mcp.jsonandmcp_config.jsonfiles. Validated reference snippets live inskills/build-an-agent-plugin/references/mcp-config.md.
Using This Example
Copy this directory structure to plugins/<your-plugin>/ when scaffolding a new installable plugin, update name and version in plugin.json and .antigravity-plugin/plugin.json, and register it in .claude-plugin/marketplace.json.
You can validate this educational example at any time with:
# Repository validator (validates both plugins/ and examples/)
npm run validate
# Antigravity CLI validator (run without --strict due to shadowed portable root plugin.json)
agy plugin validate ./examples/build-an-agent-plugin
Versioning Reminder
Whenever you modify files inside an installable plugin under plugins/<plugin>/, bump version consistently across all four places so harnesses detect updates and repository validation passes:
plugins/<plugin>/plugin.jsonplugins/<plugin>/.antigravity-plugin/plugin.json.claude-plugin/marketplace.json- Each modified skill's
SKILL.mdmetadata.version(when present)