Over the previous four articles, we broke down Rules, Skills, Hooks, and MCP individually. When working solo, dropping conventions into AGENTS.md, runbooks into skills/, and external tools into mcp_config.json works cleanly enough.

The moment you maintain a moderately complex capability—or try to share your setup with teammates—that scattered layout starts breaking down:

  • A single workflow depends on an MCP Server + a Skill that drives it + a pitfall Rule + a guardrail Hook + a dedicated Subagent, spread across four or five directories;
  • When you want to disable it temporarily, you have to edit mcp_config.json, move the Skill aside, comment out the Rule, and remove the Hook;
  • When a new teammate joins, you hand them a “copy these files into 5 different paths” doc—and repeat the whole chore two weeks later on the next upgrade.

Antigravity solves this with Plugins: bundling related components into a self-contained, namespaced package where installation, enabling, disabling, and removal all collapse into a single toggle. And when a team just wants to share checked-in directories inside a monorepo without per-developer installation, .agents/skills.json and .agents/plugins.json add clean inheritance and filtering on top.

Antigravity Plugin packaging specification and team inheritance sharing workflow


1. When to Package a Plugin & How to Draw Boundaries

Not every customization belongs in a Plugin. A repository coding standard belongs in .agents/rules/; a standalone commit or review workflow is well served by a single .agents/skills/<name>/SKILL.md.

Promote a customization to a Plugin when at least one of these two conditions holds:

  1. Multi-component coupling: An external service or complex workflow relies on two or more of MCP, Skills, Rules, Hooks, and Subagents whose lifecycles should move in lockstep;
  2. Cross-repo or team-wide distribution: You want teammates to install everything with a single agy plugin install command or Marketplace card, without manually syncing loose files on every upgrade.

Three Official Cohesion Boundaries

The worst anti-pattern is the “company-wide kitchen sink”—cramming Jira, database tools, frontend rules, and code review into one team-all-in-one plugin. The second someone wants to turn off Jira’s MCP server without losing everything else, the single-toggle model collapses.

Official guidance recommends splitting plugins along one of three boundaries so each plugin serves one clear purpose:

Packaging Axis Typical Examples Components Usually Bundled
External service / data source GitHub, Jira, Strava, internal alerting platform Corresponding MCP Server + driving Skill + API pitfall Rule
Specific file / artifact type Protobuf editing, spreadsheets, log triage Parsing/validation scripts + Skill + format Rule + guard Hook
High-frequency role / workflow Data analysis, release on-call, doc review Multi-source orchestration Skill + dedicated Subagent + review Rule

Before moving an MCP Server out of ~/.gemini/config/mcp_config.json and into a plugin’s mcp_config.json, note that its lifecycle and control become completely bound to that plugin. You no longer manage it separately in your personal mcp_config.json; disabling the plugin immediately takes all of that MCP Server’s tools offline.


2. Standard Directory Layout & plugin.json Manifest Spec

Plugins can live at workspace scope (.agents/plugins/<plugin_name>/) or user-global scope (~/.gemini/config/plugins/<plugin_name>/). Create only the subdirectories you actually use—no empty placeholder folders needed:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
plugins/<plugin_name>/
├── plugin.json # Required: plugin manifest (JSONC format; comments and trailing commas allowed)
├── README.md # Optional: human-readable docs; never loaded by the Agent
├── mcp_config.json # Optional: MCP server config tied to plugin enable/disable
├── hooks.json # Optional: must live at plugin root; native plugins ignore hooks/hooks.json
├── assets/
│ └── logo.svg # Optional: plugin icon, referenced by relative path
├── rules/
│ └── AGENTS.md # Optional: plain Markdown without frontmatter; always active while enabled
├── skills/
│ └── <skill_name>/
│ └── SKILL.md # Optional: Skills exposed by the plugin
└── agents/
└── <agent_name>.md # Optional: Subagent definitions bundled with the plugin

Three directory conventions are easy to miss:

  1. README.md never enters context: It is strictly human-facing documentation or a repository landing page; the Agent never loads it as a rule.
  2. rules/AGENTS.md takes no frontmatter: Rules shipped inside a plugin remain always-on while the plugin is enabled. Official guidance recommends consolidating them into a single plain-Markdown rules/AGENTS.md (or GEMINI.md) rather than scattering many tiny rule files.
  3. hooks.json must live at the plugin root: The runtime loader only reads <plugin_dir>/hooks.json. Only when you run agy plugin import (or install) on a pure Gemini CLI or Claude Code extension does the CLI automatically stage hooks/hooks.json up to the root; native plugins (directories containing plugin.json) never perform that move.

Valid Top-Level Fields in plugin.json

plugin.json is parsed as JSONC, supporting // and /* */ comments plus trailing commas. Here is a complete example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"name": "release-guard",
"displayName": "Release Guard",
"description": "Pre-release change checks, ticket status verification, and rollback script generation for backend and SRE teams.",
"version": "1.2.0",
"logo": "assets/logo.svg",
"suggestedPrompts": [
"Check the current branch against main for database migrations and breaking API changes",
"Verify that all Jira tickets linked to this release checklist have passed QA",
"Generate one-step rollback instructions and verification commands for this release"
],
"author": {
"name": "Platform Team",
"url": "https://internal.example.com/platform"
},
"homepage": "https://internal.example.com/docs/release-guard",
"repository": {
"type": "git",
"url": "https://github.com/example-org/release-guard"
},
"disabled": false
}

All 10 officially supported top-level fields and their constraints:

Field Type Core Constraints & Runtime Behavior
name string Lowercase kebab-case; falls back to the directory name if omitted. Serves as the globally unique key: if two plugins share the same name, the first discovered wins and the later one is silently dropped. Note that this is not the installation directory identifier dir.
displayName string Human-readable label shown in UI titles, cards, and slash menus.
description string 1–2 sentences describing purpose and audience; Marketplace search matches this field directly.
version string Semantic version (e.g. "1.0.0"). Optional locally, but omitting it causes the Marketplace to reject the listing.
logo string Path relative to the plugin root; limited to .png, .svg, .jpg, .jpeg, or .webp. URLs and absolute paths are silently ignored. Recommend ≥128×128, transparent high-contrast square with ~10% internal padding (cards add no extra padding, and non-square images are center-cropped).
suggestedPrompts string[] Starter prompts displayed on cards and detail views; at most 3 take effect (exactly 3 is recommended for card layout). Empty strings are skipped, and the 4th entry onward is silently ignored.
author string / object Author or team name string, or {"name": "...", "url": "https://..."}.
homepage string External documentation or homepage; must be an https:// URL.
repository string / object Source repository https:// URL, or {"type": "git", "url": "https://..."}.
disabled boolean When true, the plugin ships disabled by default. However, a user’s local choice in config.json always takes precedence—reinstalling or upgrading never resets the user’s toggle.

Never invent top-level fields: Any top-level key outside these 10 (such as casually adding "tags" or misspelling "suggestedPrompts" as "prompts") is silently discarded by the loader—it neither takes effect nor throws a runtime error. Always run agy plugin validate --strict before releasing to catch typos and missing fields.


3. The agy plugin CLI & Local Verification

agy ships with a full suite of plugin management subcommands (verified locally on agy v1.5.19):

Subcommand Example What It Does
list agy plugin list [--json] Lists installed plugins, enabled state, version, and bundled component counts
install agy plugin install <target> Installs from a local directory, .zip, GitHub repo/subdir URL, or plugin[@marketplace]
uninstall agy plugin uninstall <name> Removes a user or Marketplace plugin (built-in plugins cannot be uninstalled)
enable / disable agy plugin disable abc Hot-toggles a plugin’s state via an atomic write to config.json
import agy plugin import [source] Imports from Gemini CLI (gemini-extension.json) or Claude Code (.claude-plugin/plugin.json), automatically staging hooks/hooks.json
validate agy plugin validate [target] [--strict] [--json] Runs static checks matching the real loader against a directory, .zip, GitHub URL, or full marketplace.json
link agy plugin link <mp> <target> Generates a link pointing to a plugin in a specified Marketplace

Real Local Output

With a plugin named abc installed in my global ~/.gemini/config/plugins/ directory, running list, validate, and validate --strict produces:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$ agy plugin list
Installed plugins:
- abc (enabled, 1.0.4)
Components: 4 skills

$ agy plugin validate ~/.gemini/config/plugins/abc
Validating abc (/home/user/.gemini/config/plugins/abc/plugin.json)

⚠ plugin.json: no version: the plugin marketplace in Antigravity doesn't list a plugin without one. Add a "version", such as "1.0.0"
· plugin.json: no logo: the plugin shows a generic icon. Add "logo": "assets/logo.svg" (a .png, .svg, .jpg, .jpeg or .webp file inside the plugin)

skills 4 · agents 0 · rules 0 · hooks 0 · mcpServers 0 · sidecars 0

✔ Validation passed with 1 warning

$ agy plugin validate ~/.gemini/config/plugins/abc --strict
Validating abc (/home/user/.gemini/config/plugins/abc/plugin.json)

⚠ plugin.json: no version: the plugin marketplace in Antigravity doesn't list a plugin without one. Add a "version", such as "1.0.0"
· plugin.json: no logo: the plugin shows a generic icon. Add "logo": "assets/logo.svg" (a .png, .svg, .jpg, .jpeg or .webp file inside the plugin)

skills 4 · agents 0 · rules 0 · hooks 0 · mcpServers 0 · sidecars 0

Error: validation failed in strict mode: 1 warning

Local agy plugin list and validate static check output

There is a telling detail buried in that output: why did agy plugin list report 1.0.4, while validate warned plugin.json: no version?

Inspecting ~/.gemini/config/plugins/abc/ revealed two manifests side by side: gemini-extension.json declared "version": "1.0.4", whereas the native plugin.json contained only {"name": "abc"}. list read the version through compatibility fallback, while validate strictly audited plugin.json against Antigravity’s native loading and Marketplace publishing spec—immediately catching the missing version.

validate reports diagnostics at three severity levels:

  • Error: The loader skips the file or the entire plugin, and the command exits non-zero.
  • Warning (⚠): A field is ignored, falls back to a default, or blocks Marketplace listing/building; with --strict, warnings also exit non-zero, making it ideal for CI or pre-push quality gates.
  • Note (·): Informational hints, such as a missing logo falling back to the generic icon.

validate also accepts remote .zip archives, GitHub subdirectory URLs (https://github.com/<owner>/<repo>/tree/<branch>/<path>), or an entire marketplace.json to batch-check every plugin in a catalog. It fetches into a temporary directory for static inspection only—it never installs anything or executes code.

State Storage & UI Controls: Why You Should Not Hand-Edit config.json

Plugin enable/disable state is stored under the plugins map in ~/.gemini/config/config.json, keyed by the installation directory name (dir) rather than plugin.json‘s name:

1
2
3
4
5
{
"plugins": {
"abc": { "enabled": false }
}
}

Do not open ~/.gemini/config/config.json in a text editor to toggle plugins manually, for two reasons:

  1. The file is atomically written with 0600 permissions and also holds userSettings plus your tool permission grants. Editing it by hand risks racing with a running Language Server and clobbering other state.
  2. Bypassing the client skips hot-reload. Use agy plugin enable/disable <name>, or toggle the switch on the customization://<dir> detail page in the UI (changes take effect immediately without a restart).

Keep two additional boundaries in mind:

  • Built-in plugins cannot be uninstalled: Bundled plugins under the client’s /builtin/plugins/ directory ship with the release and reject uninstall; if you do not want them active, disable them in the UI or via CLI.
  • UI links only recognize customization://<dir>: Do not write plugin:// or plugins:// (the client ignores them and renders dead text). Moreover, <dir> must be the actual installation directory name—older Marketplace installs can even use a numeric catalog ID (such as -1870732469773246571), so interpolating name will fail to open.

4. Team Repository Sharing: skills.json & plugins.json Inheritance

Not every team workflow needs a “package, publish, and ask everyone to run agy plugin install“ cycle. If your team already collaborates inside a monorepo—or mounts a shared read-only directory on an internal network—checking skills and plugins into Git and declaring them via config files lets new hires pick them up automatically on git clone.

Antigravity provides two isomorphic JSON configs for this, placed under a project’s .agents/ directory (or globally in ~/.gemini/config/):

  • .agents/skills.json: Explicitly mounts and inherits Skills from external directories;
  • .agents/plugins.json: Explicitly mounts and inherits Plugins from external directories.

Upward Traversal & Path Resolution Rules

Just like AGENTS.md, starting a session inside a repository walks upward from the current working directory (CWD) to the Git root, loading every .agents/skills.json and .agents/plugins.json encountered along the way. Commit the manifests once under the repo root’s .agents/, and teammates get the shared configuration regardless of which service subdirectory they launch agy from.

Each path entry is resolved according to three rules:

path Format Resolution Base Example
Starts with / Absolute local filesystem path "/opt/company-agents/base-plugins.json"
Starts with ~/ Current user’s home directory "~/team-shared/skills"
Relative path Parent directory of the .agents/ folder first; falls back to the repository root if not found "tools/agents/plugins"

Schema: inherits Composition + One-Level entries Scanning

skills.json and plugins.json share the exact same schema, consisting of two top-level arrays:

  • inherits: Pulls in other skills.json / plugins.json manifests, merged in declaration order;
  • entries: Declares directories to scan directly—each directory is scanned strictly one level deep (never recursively).

Every object in both arrays accepts the same three fields: path (required), include_only (optional allowlist pattern array), and exclude (optional regex array matched against directory names).

A Multi-Team VCS Sharing Pattern

Suppose your company maintains a shared base kit repository, while your product monorepo keeps project-specific customizations under tools/agents/ and prefixes unfinished experiments with experimental-*. Commit two files at the repo root:

.agents/plugins.json:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"inherits": [
{
"path": "~/company-ai-kit/plugins.json",
"exclude": ["legacy-deploy"]
}
],
"entries": [
{
"path": "tools/agents/plugins",
"exclude": ["experimental-.*"]
}
]
}

.agents/skills.json:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"inherits": [
{
"path": "~/company-ai-kit/skills.json",
"include_only": ["code-review", "sql-audit", "incident-triage"]
}
],
"entries": [
{
"path": "tools/agents/skills",
"exclude": ["draft-.*"]
}
]
}

Once tools/agents/ and .agents/*.json are committed to Git, use this decision tree to pick the right rollout path for your team:


5. Five Common Packaging & Sharing Pitfalls

  1. Placing a native plugin’s hooks.json at hooks/hooks.json
    Developers migrating from Claude Code plugins often create a hooks/ subdirectory out of habit. Only agy plugin import (or install) on a pure Claude/Gemini extension stages hooks/hooks.json to the root. Whenever plugin.json is present (or the plugin is mounted directly via plugins.json), the runtime loader only reads hooks.json at the plugin root—any hook inside a subdirectory silently never runs.

  2. Confusing plugin.json‘s name with the install directory dir, or colliding on global name
    name occupies a globally unique namespace: if two plugins in different directories declare the same name, the second one loaded is silently dropped. Meanwhile, config.json toggle entries and UI links (customization://<dir>) key off the installation directory name dir. If you name a folder team-kit-v2 while setting "name": "team-kit" in plugin.json, links and toggle lookups built from team-kit will not match. Keep the directory name and name identical.

  3. Confusing user-level MCP naming with plugin-level namespacing, or picking overly generic names
    Antigravity automatically prefixes plugin-bundled MCP servers as <plugin>_<server> (e.g. local-k3s-mcp_db) to prevent cross-plugin collisions, but user-level ~/.gemini/config/mcp_config.json remains a flat global namespace, where generic names like db or api easily overwrite local services. Even inside a plugin with automatic prefixing, semantic server names (readonly-db, release-jira) make the model far less likely to pick the wrong tool when similar plugins coexist across environments.

  4. Skipping agy plugin validate --strict before sharing with a team or submitting to a Marketplace
    The loader fails remarkably quietly on plugin.json mistakes: unknown top-level fields are silently dropped, invalid logo URLs silently show nothing, suggestedPrompts past the 3rd item are silently truncated, and a missing version gets Marketplace submissions rejected. Eyeballing JSON misses these every time—adding agy plugin validate . --strict to repo CI is the cheapest safeguard available.

  5. Misunderstanding skills.json / plugins.json scan depth and exclude scope
    Two traps show up regularly. First, entries does not scan recursively—it checks strictly one directory level deep. Nesting skills by domain like tools/agents/skills/backend/sql-audit/SKILL.md will not be discovered if you only point to tools/agents/skills; list each group directory explicitly in entries. Second, adding a top-level exclude in a repo’s skills.json cannot disable global skills teammates installed under ~/.gemini/config/—the official docs state explicitly that top-level exclude applies only to paths declared in that manifest and never filters customizations inherited from a user’s own environment.


Series Navigation