How to Wire Google Antigravity Skills, Rules, and MCP Servers

Full-bleed architectural ink-and-gouache illustration of a workbench at night with modular field cards wired to a terminal screen overlooking Puget Sound harbor lights.

About Will

I run Tygart Media, an AI-first agency that gets businesses cited and recommended by AI assistants — and I write about what we do, including what breaks.

Connect on LinkedIn →

From the Workbench · November 28, 2026 · By Will Tygart

Practitioner How-To · Free Takeaway
Download the 2-Page Spec PDF & Markdown Twin
Download the 2-page workbench wiring sheet or open the raw Markdown spec covering Antigravity SKILL.md progressive disclosure, model_decision rules, and Streamable HTTP MCP.

When developers first customize an agent workspace, they almost always make the same mistake: they paste every deployment checklist, database rule, and CLI workaround straight into a single always-on instruction file. By Friday, the prompt carries thirty kilobytes of competing instructions before the first message is even typed.

As our own server logs showed in Readers Without a Web Browser, coding terminals pulled 3,405 pages in a single month because builders stay inside the terminal looking for concrete wiring specs. In Google Antigravity, keeping the loop fast comes down to separating always-on guardrails from progressive-disclosure skills and typed MCP servers.

Antigravity Loading Precedence and Progressive Disclosure

Rather than loading every runbook on turn zero, Antigravity resolves customizations across five precedence layers and injects only skill names and short YAML descriptions until a task triggers a full SKILL.md read. Here is how each layer behaves in production:

Priority & LayerFilesystem LocationContext BehaviorBest Operational Role
1. Workspace Project (Highest).agents/rules/, .agents/skills/, AGENTS.mdLoaded from CWD up to repo root; overrides globalsProject build commands, schemas, and domain-specific playbooks
2. Declared Project Configsskills.json / plugins.json in workspaceMounted explicitly via project manifest pathsShared team skill bundles outside default directories
3. Global User Config~/.gemini/config/ (rules, skills, mcp_config.json)Applies across all workspaces on the workstationPersonal core invariants under 10 KB plus local MCP tools
4. Built-in CustomizationsBundled agent tool & workflow skillsMounted by agent configuration nameDefault IDE/CLI capabilities such as web workflows
5. Antigravity CLI Settings~/.gemini/antigravity-cli/settings.jsonTUI/headless CLI runtime flags and defaultsTerminal-specific agy execution defaults and session rules

Two limits matter immediately on multi-skill workstations. First, keep each custom SKILL.md frontmatter description crisp and under 550 characters so skill indexing does not clip longer triggers under budget constraints. Second, push heavyweight SQL examples or deployment walkthroughs into relative references/ files inside the skill folder instead of the top-level SKILL.md.

Five-layer Google Antigravity customization hierarchy from workspace .agents/skills and rules to global ~/.gemini/config/mcp_config.json and built-in skills with progressive disclosure.
Progressive disclosure loads only skill names and concise descriptions upfront, keeping global rules under 10 KB.

Copy-Paste Template: Minimal Skill and Conditional Rule

A clean skill folder pairs a focused YAML header with relative helper links, while conditional Antigravity rules use trigger: model_decision so database or deployment policies load only when the active turn matches that scope:

.agents/skills/release-verify/SKILL.md + .agents/rules/db-guard.md (yaml)
---
name: release-verify
description: >-
  Verify build artifacts, run smoke checks, and confirm HTTP 200 status before closing
  a deployment. Use whenever shipping code or verifying live endpoints.
---
# Release Verification Runbook
1. Run the verification suite before reporting completion.
2. Load [references/checklist.md](references/checklist.md) only if staging drifts.
 
---
# Conditional Rule (.agents/rules/db-guard.md)
---
trigger: model_decision
description: "Apply before running database migrations or production table queries."
---
- Always verify row counts and read-only snapshots before executing schema changes.

MCP Servers and Windows Subprocess Pitfalls

For Model Context Protocol integrations, Antigravity supports local Stdio executables and remote Streamable HTTP endpoints (pointed at /mcp, not legacy 2024 /sse URLs). On Windows developer boxes, three subtle traps break scripted tool runners until you handle them explicitly:

Failure Mode on Live WorkstationsWhy It HappensDeterministic FixVerification Receipt
Backup folder .bak inside plugins/ still loadsPlugin loader scans every subdirectory inside ~/.gemini/config/plugins/Move disabled plugins or rule snapshots completely outside active config foldersConfirm clean plugin roster at startup with zero duplicate tool collisions
FileNotFoundError calling .cmd CLIs from PythonPython subprocess.run(…, shell=False) ignores Windows .cmd shims unless resolvedResolve via shutil.which('tool.cmd') or shutil.which('tool') before launchPrint resolved binary path cleanly before spawning external CLIs
CreateProcessW fails past ~32 KB inline scriptsWindows caps CommandLine at 32,767 characters under Win32 APIWrite staged .py scripts to disk and execute by file path rather than inline flagsAssert zero inline multi-kilobyte command-line payloads
Interactive SSH/CLI hangs waiting on stdinChild CLI tools inherit parent pipe and block on confirmation promptsPass stdin=subprocess.DEVNULL on every non-interactive CLI callReturn deterministic exit code and UTF-8 stdout/stderr logs
~/.gemini/config/mcp_config.json + Windows Safe subprocess.run Wrapper (python)
# 1. Clean mcp_config.json (Stdio + Streamable HTTP)
{
  "mcpServers": {
    "local-sqlite": {
      "command": "sqlite-mcp-server",
      "args": ["/workspace/data/app.db"],
      "env": {"DB_READONLY": "true"}
    },
    "remote-docs": {
      "url": "https://mcp.example.com/mcp"
    }
  }
}
 
# 2. Windows-safe CLI wrapper (Python subprocess)
import shutil, subprocess
 
def run_cli_safe(binary_stem: str, args: list[str]) -> str:
    exe = shutil.which(f"{binary_stem}.cmd") or shutil.which(binary_stem)
    if not exe:
        raise FileNotFoundError(f"Missing CLI binary for {binary_stem}")
    proc = subprocess.run(
        [exe, *args],
        shell=False,
        stdin=subprocess.DEVNULL,
        capture_output=True,
        text=True,
        encoding="utf-8",
        errors="replace",
        timeout=60,
    )
    if proc.returncode != 0:
        raise RuntimeError(proc.stderr or proc.stdout)
    return proc.stdout

Remember also that Antigravity publishes its own documentation index as clean Markdown mirrors (append .md to any docs URL), so your terminal agent can fetch live official schema specs on demand under strict CreateProcessW limits and Python subprocess rules.

Build Guardrails Before Adding More Tools

Great multi-agent workspaces share the lesson we documented in Articles as Infrastructure: structured, shallow interfaces beat giant monoliths. When rules stay under ten kilobytes, skills carry clear verification steps, and MCP configs point to verified Streamable HTTP endpoints, every terminal assistant on your machine starts fast and stays accurate.

Frequently Asked Questions

Where do Google Antigravity global vs. project customizations live?

Project-specific rules and skills live inside .agents/rules/ and .agents/skills/ (plus AGENTS.md or GEMINI.md at repo roots), while machine-wide configs live inside ~/.gemini/config/ including mcp_config.json.

Why does Antigravity limit always-on instruction size and frontmatter length?

Always-on rules are injected on every turn, whereas skills use progressive disclosure (only name and description enter upfront context). Keeping global rules concise and SKILL.md descriptions under 550 characters prevents relevant skills from being crowded out.

Should remote MCP servers in mcp_config.json point to /sse or /mcp?

Point remote entries to the Streamable HTTP endpoint (typically /mcp under the 2025-03-26 MCP transport specification). Legacy HTTP+SSE (/sse) endpoints require a stdio adapter such as mcp-remote.

Primary Documentation & References

Continue the Workbench Series
Next practitioner wiring guide: How to Serve Clean Markdown Twins and Link Headers on WordPress. For agent-ready content architecture and citation diagnostics, see our AI Citation Service or Smokejumpers Pricing.
Printable Workbench Reference
Keep This Wiring Spec Inside Your Repo
Download the 2-page workbench wiring sheet or open the raw Markdown spec covering Antigravity SKILL.md progressive disclosure, model_decision rules, and Streamable HTTP MCP.
Track the AI tools you actually use
Vendor-neutral prices & limits for ChatGPT, Claude, Gemini, Perplexity and more — tracked in AI Stack Watch.
See the live AI tracker →

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *