Free toolGenerate .mcp.json configs for Claude Code, Cursor & Codex →
A

Google · Antigravity IDE · Antigravity CLI (replaced Gemini CLI) · Antigravity app

Google Antigravity rules files explained

Which instruction files Google Antigravity reads (AGENTS.md, GEMINI.md, .agents/rules/*.md), where to put them, and how to convert from other agents.

Files Antigravity reads

  • AGENTS.md
  • GEMINI.md
  • .agents/rules/*.md

AGENTS.md: Yes: AGENTS.md or GEMINI.md at any directory level, always on.

Skills folders: .agents/skills/, ~/.gemini/config/skills/

Who reads what

AgentRules filesAGENTS.md
ClaudeCLAUDE.md, .claude/rules/*.mdOnly when no CLAUDE.md / CLAUDE.local.md exists (default, v2.1.277+); or import it with @AGENTS.md
CodexAGENTS.md, AGENTS.override.mdYes: global ~/.codex/AGENTS.md plus one AGENTS.md (or AGENTS.override.md) per directory from the repo root down
Cursor.cursor/rules/*.mdc, AGENTS.md, .cursorrules (legacy)Yes, in the project root and in subdirectories (nested files combine)
Copilot.github/copilot-instructions.md, .github/instructions/*.instructions.md, AGENTS.mdYes on most surfaces (cloud agent, CLI, VS Code chat, code review); not Copilot Chat on GitHub.com
AntigravityAGENTS.md, GEMINI.md, .agents/rules/*.mdYes: AGENTS.md or GEMINI.md at any directory level, always on
Convert your rules file →

Antigravity rule scopes, triggers and limits

Antigravity combines rules from every scope rather than replacing them, and more specific directory rules win on conflicts. When it reads or edits a file it walks up to the workspace root, loading AGENTS.md or GEMINI.md, .agents/AGENTS.md, and .agents/rules/*.md at each level. Global rules live in ~/.gemini/AGENTS.md or GEMINI.md (always on, no frontmatter) and ~/.gemini/config/rules/*.md (frontmatter required).

Every file in a rules/ folder must start with YAML frontmatter and a valid trigger: always_on, model_decision, glob or manual. Google warns that a missing trigger or a camelCase value like alwaysOn makes Antigravity silently discard the rule. model_decision rules need a description, and only the path and description are injected until a task matches. glob rules need globs, and manual rules load only when @-mentioned. Only immediate .md children of .agents/rules/ are scanned; nested folders need .agents/rules.json.

Limits: a single rule file is truncated past 24,000 bytes, and all global and always_on rules share a 20,000-token budget.

Source: antigravity.google · Checked Oct 24, 2026

Featured spot on the rules libraryReach developers choosing tools for their coding agent. Labeled, and it never affects ratings.

Guides, pricing & comparisons