Google Antigravity Directory

The #1 directory for Google Antigravity prompts, rules, workflows & MCP servers. Optimized for Gemini 3 agentic development.

Resources

PromptsMCP ServersAntigravity RulesGEMINI.md GuideBest Practices

Company

Submit PromptAntigravityAI.directory

Popular Prompts

Next.js 14 App RouterReact TypeScriptTypeScript AdvancedFastAPI GuideDocker Best Practices

Legal

Privacy PolicyTerms of ServiceContact Us

© 2025 Antigravity AI Directory. All rights reserved.

The #1 directory for Google Antigravity IDE

This website is not affiliated with, endorsed by, or associated with Google LLC. "Google" and "Gemini" are trademarks of Google LLC.

Antigravity AI Directory
PromptsMCPBest PracticesUse CasesLearn
Home
GEMINI.md Guide

GEMINI.md: Global Rules for Google Antigravity

GEMINI.md is the global configuration file for Google Antigravity that applies your preferences across ALL projects. This guide explains how to create and optimize your GEMINI.md file.

What is GEMINI.md?

GEMINI.md is a special Markdown file that Google Antigravity reads automatically when you start a session. It contains global rules that apply to every project you work on, regardless of which workspace you're in.

Think of it as your personal AI coding preferences - the instructions that make Antigravity feel like your perfect coding partner every time.

File Location

GEMINI.md lives in your home directory's .gemini folder:

# macOS / Linux:

~/.gemini/GEMINI.md

# Windows:

C:\Users\YourName\.gemini\GEMINI.md

How to Create GEMINI.md

Method 1: Via Google Antigravity UI

  1. Open Google Antigravity
  2. Click the ... menu in the agent chat panel
  3. Select Customizations
  4. Click + Global under Rules
  5. Antigravity will create GEMINI.md and open it for editing

Method 2: Manual Creation

# Create the directory and file:

mkdir -p ~/.geminitouch ~/.gemini/GEMINI.md

Example GEMINI.md

Here's a comprehensive example you can use as a starting point:

# GEMINI.md - Global Rules for Google Antigravity

## My Coding Preferences

### Language & Framework Defaults
- Always use TypeScript over JavaScript
- Prefer functional programming patterns
- Use async/await instead of .then() chains
- Prefer named exports over default exports

### Code Style
- Use descriptive variable names (isLoading, hasError, userData)
- Keep functions under 30 lines when possible
- Add JSDoc comments for public functions
- Use early returns to reduce nesting

### Error Handling
- Always handle errors explicitly
- Use try/catch for async operations
- Log errors with context (function name, parameters)
- Never silently swallow errors

### Testing
- Write tests for business logic
- Use descriptive test names that explain the scenario
- Mock external dependencies
- Prefer integration tests over unit tests for React components

### Git & Commits
- Use conventional commit format (feat:, fix:, docs:, etc.)
- Keep commits atomic and focused
- Write clear commit messages explaining "why" not "what"

### Documentation
- Add README.md to new projects
- Document complex algorithms inline
- Keep API documentation up to date

## Things to Avoid
- No console.log in production code (use proper logging)
- No any types in TypeScript (use unknown if needed)
- No hardcoded credentials or API keys
- No inline styles in React (use CSS modules or Tailwind)

Best Practices for GEMINI.md

Keep It Universal

Only include rules that apply to ALL your projects. Framework-specific rules (Next.js, Django, etc.) should go in project-level .antigravity files instead.

Start Small, Iterate

Begin with 5-10 essential rules and add more as you discover patterns in your workflow. Too many rules at once can be overwhelming.

Include "Don't" Rules

Telling the agent what NOT to do is just as important. Include a "Things to Avoid" section for common mistakes you want to prevent.

Stay Under 6,000 Characters

GEMINI.md has a character limit. Be concise. If you need more space, move some rules to project-level files.

GEMINI.md vs .antigravity Files

AspectGEMINI.md.antigravity
ScopeAll projectsSingle project
Location~/.gemini/Project root
Version ControlPersonal (not shared)Shared with team
PriorityLower (fallback)Higher (overrides)
Best ForPersonal preferencesTeam standards

Ready to Get Started?

Browse our library of pre-made prompts and rules. Copy any prompt to your GEMINI.md or .antigravity file to get started instantly.

Browse PromptsLearn About Rules

Frequently Asked Questions

Do I need GEMINI.md to use Google Antigravity?

No, GEMINI.md is optional. Google Antigravity works perfectly without it. However, adding global rules significantly improves the consistency and quality of AI-generated code by teaching the agent your preferences.

Can I have multiple GEMINI.md files?

No, there's only one global GEMINI.md per user. If you need different rules for different contexts, use project-level .antigravity files which can vary per project.

How often should I update GEMINI.md?

Update it whenever you discover new patterns or frustrations. If you find yourself repeatedly correcting the agent for the same thing, add a rule to prevent it. Most developers update their GEMINI.md monthly.

Related Resources

  • →Complete Guide to Google Antigravity Rules
  • →Getting Started with Google Antigravity
  • →MCP Servers Directory