How to Add Rules to Google Antigravity?
1 min
1. How to Add Rules in Google Antigravity?
Just like Cursor, Google Antigravity also supports Global Rules and Project Rules.
Here’s a step-by-step guide on how to add Global Rules (with screenshots):
- Click the three-dot icon in the top right corner of the Agent chat window;
- Click on “Customizations”;
- Click ”+ Global” - this will create a file called
GEMINI.mdin the.gemini/folder under your user directory; - Close the “Global Antigravity Rules File” prompt;
- Write your rules in plain text directly in the
GEMINI.mdfile, then save it; - After saving, you can see your updated Global Rules in the Rules section;
- To verify, type something like “Please check if the rules are applied?” in the Agent chat. Google Antigravity should confirm that the rules have been applied.

2. What Are the Common Global Rules?
Here are some useful Global Rules you might want to set:
- Agent should reply in your preferred language (e.g., Simplified Chinese);
- Code comments should be written in your preferred language;
- UI text should follow your project’s i18n settings (or use a default language if not specified).
3. Recommended Project Rules for Google Antigravity
You can easily convert your existing Cursor project rules to Google Antigravity format. For example, I’ve converted my Cursor project rules for Vue 3 frontend development into Google Antigravity project rules.
Download link: https://www.lanxk.com/files/GEMINI-project-rules-for-vue3-en.md
After downloading, rename the file to GEMINI.md and place it in the .gemini/ folder at your project root.