Plugins & Team Sharing: plugin.json, Marketplaces & Config Inheritance
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.

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:
- 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;
- Cross-repo or team-wide distribution: You want teammates to install everything with a single
agy plugin installcommand 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 | plugins/<plugin_name>/ |
Three directory conventions are easy to miss:
README.mdnever enters context: It is strictly human-facing documentation or a repository landing page; the Agent never loads it as a rule.rules/AGENTS.mdtakes no frontmatter: Rules shipped inside a plugin remain always-on while the plugin is enabled. Official guidance recommends consolidating them into a single plain-Markdownrules/AGENTS.md(orGEMINI.md) rather than scattering many tiny rule files.hooks.jsonmust live at the plugin root: The runtime loader only reads<plugin_dir>/hooks.json. Only when you runagy plugin import(orinstall) on a pure Gemini CLI or Claude Code extension does the CLI automatically stagehooks/hooks.jsonup to the root; native plugins (directories containingplugin.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 | { |
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 | $ agy plugin list |

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 missinglogofalling 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 | { |
Do not open ~/.gemini/config/config.json in a text editor to toggle plugins manually, for two reasons:
- The file is atomically written with
0600permissions and also holdsuserSettingsplus your tool permission grants. Editing it by hand risks racing with a running Language Server and clobbering other state. - Bypassing the client skips hot-reload. Use
agy plugin enable/disable <name>, or toggle the switch on thecustomization://<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 rejectuninstall; if you do not want them active, disable them in the UI or via CLI. - UI links only recognize
customization://<dir>: Do not writeplugin://orplugins://(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 interpolatingnamewill 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 otherskills.json/plugins.jsonmanifests, 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 | { |
.agents/skills.json:
1 | { |
Once tools/agents/ and .agents/*.json are committed to Git, use this decision tree to pick the right rollout path for your team:
flowchart TD
S["Team needs to share Agent customizations"] --> Q1{"Existing Claude Code or<br/>Gemini CLI extension?"}
Q1 -- "Yes" --> IMP["Run agy plugin import<br/>Migrate manifest & auto-stage hooks/hooks.json"]
Q1 -- "No" --> Q2{"Bundles MCP / Hooks /<br/>multiple components needing one toggle?"}
Q2 -- "No: rules & skills only" --> VCS["Place in tools/agents/ & .agents/rules/<br/>Inherit & filter via .agents/skills.json"]
VCS --> VCS_END["Commit to Git: active on clone"]
Q2 -- "Yes: cohesive multi-component unit" --> PKG["Organize along one boundary<br/>Write plugin.json (name/version/description)"]
PKG --> VAL["Run agy plugin validate --strict<br/>Fix all Errors & Warnings"]
VAL --> Q3{"Distribution scope?"}
Q3 -- "Single-repo team sharing" --> MP1["Commit to repo & mount via .agents/plugins.json"]
Q3 -- "Cross-repo / public distribution" --> MP2["Publish Git repo or Marketplace<br/>Install via agy plugin install"]
5. Five Common Packaging & Sharing Pitfalls
Placing a native plugin’s
hooks.jsonathooks/hooks.json
Developers migrating from Claude Code plugins often create ahooks/subdirectory out of habit. Onlyagy plugin import(orinstall) on a pure Claude/Gemini extension stageshooks/hooks.jsonto the root. Wheneverplugin.jsonis present (or the plugin is mounted directly viaplugins.json), the runtime loader only readshooks.jsonat the plugin root—any hook inside a subdirectory silently never runs.Confusing
plugin.json‘snamewith the install directorydir, or colliding on globalnamenameoccupies a globally unique namespace: if two plugins in different directories declare the samename, the second one loaded is silently dropped. Meanwhile,config.jsontoggle entries and UI links (customization://<dir>) key off the installation directory namedir. If you name a folderteam-kit-v2while setting"name": "team-kit"inplugin.json, links and toggle lookups built fromteam-kitwill not match. Keep the directory name andnameidentical.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.jsonremains a flat global namespace, where generic names likedborapieasily 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.Skipping
agy plugin validate --strictbefore sharing with a team or submitting to a Marketplace
The loader fails remarkably quietly onplugin.jsonmistakes: unknown top-level fields are silently dropped, invalidlogoURLs silently show nothing,suggestedPromptspast the 3rd item are silently truncated, and a missingversiongets Marketplace submissions rejected. Eyeballing JSON misses these every time—addingagy plugin validate . --strictto repo CI is the cheapest safeguard available.Misunderstanding
skills.json/plugins.jsonscan depth andexcludescope
Two traps show up regularly. First,entriesdoes not scan recursively—it checks strictly one directory level deep. Nesting skills by domain liketools/agents/skills/backend/sql-audit/SKILL.mdwill not be discovered if you only point totools/agents/skills; list each group directory explicitly inentries. Second, adding a top-levelexcludein a repo’sskills.jsoncannot disable global skills teammates installed under~/.gemini/config/—the official docs state explicitly that top-levelexcludeapplies only to paths declared in that manifest and never filters customizations inherited from a user’s own environment.



















