Course contents

Antigravity CLI rules and skills: GEMINI.md, AGENTS.md and .agents/

beginner3 min readUpdated
  • Antigravity CLI
On this page

Antigravity CLI replaced Gemini CLI for personal accounts

On June 18, 2026, Gemini CLI stopped serving requests for free, Google AI Pro and Google AI Ultra personal accounts. Google's path forward is Antigravity CLI, run with agy (Gemini CLI announcement, Google Developers Blog). Enterprise Gemini Code Assist licenses and API-key use of Gemini CLI were not affected.

Your GEMINI.md files carry over unchanged. Workspace skills moved: .gemini/skills/ becomes .agents/skills/ (migration guide).

Where rules go

Antigravity reads rules from your start folder and each parent folder up to the repo root (Antigravity rules):

FileFrontmatterLoads
AGENTS.md or GEMINI.mdNoneAlways
.agents/AGENTS.md or .agents/GEMINI.mdNoneAlways
.agents/rules/*.mdRequired triggerDepends on trigger

Global rules: ~/.gemini/AGENTS.md, ~/.gemini/GEMINI.md, ~/.gemini/config/AGENTS.md, ~/.gemini/config/GEMINI.md, or ~/.gemini/config/rules/*.md.

Rules are cumulative. Antigravity combines everything it finds, so the same text in both GEMINI.md and AGENTS.md loads twice.

It doesn't load rules from subfolders below the start folder, even when the agent edits files there. Start agy in the folder whose rules you need, or keep shared rules at the root.

Rule files with triggers

Files in .agents/rules/ must start with frontmatter and a valid trigger. A missing or misspelled trigger (like alwaysOn) means the rule is silently discarded.

.agents/rules/migrations.md
---
trigger: model_decision
description: "Apply when writing or reviewing database migrations or schema changes."
---

- Never drop or rename a column in one deploy. Use expand and contract.
- Create indexes on existing Postgres tables with CONCURRENTLY.
triggerBehavior
always_onFull content every turn
model_decisionOnly path and description up front; the agent reads the rule when relevant
globActivates for files matching globs (quote patterns that start with *)
manualOnly on @ mention; Antigravity CLI doesn't support rule mentions

Only files directly inside .agents/rules/ are scanned. .agents/rules/frontend/react.md is skipped unless you list it in .agents/rules.json.

Size limits

  • 24,000 bytes per rule file. Anything past that is truncated.
  • 20,000 tokens for all always-on and global rules combined. Over budget, Antigravity demotes the largest files to pointers the agent reads on demand.

Including files

@[label](path) inlines another file's contents into a rule. Plain @path doesn't inline; it gives the agent an exact file reference.

Skills: .agents/skills/

LocationScope
.agents/skills/<name>/Workspace (and each parent folder up to the repo root)
~/.gemini/config/skills/<name>/Global, shared with the Antigravity App
~/.gemini/antigravity-cli/skills/, ~/.gemini/skills/Global, CLI only; these take priority over same-named skills elsewhere

Every skill becomes a slash command automatically: a skill named deploy-staging gives you /deploy-staging (Antigravity skills). If you add a skill while the CLI is running, run /skills reload. Skill folders must sit directly inside skills/.

Install a preset

npx presets-dev add nextjs --tool antigravity
created GEMINI.md
created .agents/skills/nextjs-code-review/SKILL.md
2 file action(s), 0 skipped. https://presets.dev

The standards are appended to GEMINI.md inside presets.dev markers, and your existing content is kept. To append to AGENTS.md instead, for example because Codex already uses it, add --agents-md:

npx presets-dev add nextjs --tool antigravity --agents-md

Use one or the other, never both. The skill goes to the shared .agents/skills/ folder, which Codex reads too, so it's written once even if you install for both tools.

Preview: Next.js rules for Antigravity CLI and Next.js code review skill for Antigravity CLI.

Check that it loaded

  • /context opens a token breakdown with rows for Rules and Skills, plus tracked system files such as GEMINI.md and .agents/rules/ (/context docs).
  • /rules and /skills list what's active. In the /skills panel, press Enter on a skill to see its path and instructions.

Common mistakes

  • Same section in GEMINI.md and AGENTS.md. Both load. Pick one.
  • Leftover .gemini/skills/. Antigravity CLI reads .agents/skills/ for workspace skills. Move the folder.
  • Rules in subfolders below the start folder. They don't load. Start agy closer to the code, or move the rule up.
  • camelCase triggers. alwaysOn and modelDecision are invalid; use always_on and model_decision.

Recap

  • Antigravity CLI (agy) replaced Gemini CLI for personal accounts on June 18, 2026.
  • GEMINI.md and AGENTS.md are both always on and cumulative; use one for a given section.
  • .agents/rules/*.md need a valid trigger; .agents/skills/ holds skills that become slash commands.
  • Limits: 24,000 bytes per rule file and 20,000 tokens of always-on rules.

Next step

You've seen all seven tools. Now learn to write a rule that changes behavior.