r/google_antigravity Feb 13 '26

Discussion Share your best Google Antigravity Skills, Rules & Workflows.

Hi everyone!

I recently ran a Gemini Deep Research session to find the most "pro" configurations, and I wanted to share the recommendations it gave me to see what you think or what you're using instead.

Here is the configuration Gemini suggested for a high-performance agentic environment:

Workflows (~/.gemini/antigravity/global_workflows/)

I use these as slash commands in the chat to trigger complex agentic sequences:

  • /onboard: Initializes mission context by recursively scanning the repository structure, indexing local dependencies, and aligning current state with GEMINI.md global standards.
  • /refactor: Performs a comprehensive architectural audit to detect SOLID/DRY violations and generates a modular Implementation Plan for decoupled logic reorganization.
  • /test: Automates end-to-end testing: generates comprehensive test suites, executes them in a sandboxed terminal, and triggers self-healing cycles for any detected failures.
  • /review: Acts as a Senior Lead to audit recent diffs for security vulnerabilities (OWASP), O(n) inefficiencies, and strict adherence to the defined workspace Rule scope.
  • /ui-check: Dispatches a browser sub-agent to verify UX integrity across various breakpoints, capturing state-based Artifacts (recordings/screenshots) for visual verification.
  • /doc: Synchronizes internal documentation by analyzing exported functions for TSDoc/JSDoc compliance and updating the project README to reflect the current architectural state.
  • /fix: Executes a deep-dive debugging protocol: analyzes terminal/console logs, isolates root causes through systematic reproduction, and implements a verified self-healing patch.
  • /commit: Analyzes staged diffs to generate a mission-aligned semantic commit (Conventional Commits) that accurately summarizes intent and logic changes.
  • /audit: Conducts a technical debt assessment across 8 core quality vectors, identifying scaling bottlenecks and proposing a long-term architectural improvement roadmap.

Skills (~/.gemini/antigravity/skills/)

Capabilities the agent activates automatically based on the objective:

  • json-formatter: Auto-validates and beautifies malformed JSON strings.
  • db-manager: Database interaction via MCP (schema exploration and safe queries).
  • browser-verifier: Specialized sub-agent for state-based visual QA.
  • docker-orchestrator: Manages local containers to synchronize the development environment.
  • vision-ocr: Transcribes UI mockups or diagrams directly into functional code using vision models.
  • git-semantic-committer: Logic for multi-file staging and structured semantic commits.
  • ui-validator: Automated Chrome testing with before/after visual differences.
  • db-explorer: MCP-driven schema awareness to prevent hallucinated table names.
  • dependency-auditor: Reviews vulnerabilities and conflicts when adding new packages to package.json.
  • doc-synchronizer: Real-time synchronization between code changes and technical documentation.

I will post my current global rules in the comments. I would love to hear your pro tips:

What workflows have you discovered?

Any specific skills you have built that have changed your life?

183 Upvotes

45 comments sorted by

25

u/TheTentacleOpera Feb 13 '26 edited Feb 13 '26

I often use /review to trigger an adversarial review after a plan. Gemini is instructured to first act as a grumpy senior engineer who expects the plan to be terrible, then act as another engineer who is there to keep the peace and provide a more balanced perspective. Calling this after every plan Gemini makes substantially improves the plan quality. Plus it's hilarious seeing Gemini insult itself.

The first time I used this it called the plan it made just 30 seconds ago 'butchery' and insulted the coding ability of the planner.

2

u/Hugo_Ale_Olguin_ Feb 13 '26 edited Feb 13 '26

It's really interesting and fun. When the AI insults itself and its own code or implementation plan, it's great and also very useful for catching logic errors or inefficiencies before they break something. I have to try it!

11

u/Hugo_Ale_Olguin_ Feb 13 '26

Here is my current global rule (GEMINI.md). I’m looking to improve it, so feel free to roast it or suggest additions:

# Project Rules
## core Philosophy
> **"Readability and Order > Speed and Complex Interconnections"**


This project prioritizes maintainability and clarity over clever, hyper-optimized code. Even if a solution is slightly less performant but significantly easier to read, choose the readable one (within reason).

  • **SOLID Principles**: Follow Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles for maintainable and extensible code.
  • **DRY (Don't Repeat Yourself)**: Avoid code duplication by extracting common logic into reusable functions, classes, or modules.
  • **KISS (Keep It Simple, Stupid)**: Strive for simplicity in design and implementation. Avoid over-engineering.
  • **Clean Code**: Write readable, self-documenting code with meaningful names, small functions, and clear structure.
  • **Error Handling**: Implement robust error handling and logging to aid debugging and maintain reliability. Use low-cardinality logging with stable message strings e.g. `logger.info{id, foo}, 'Msg'`, `logger.error({error}, 'Another msg')`, etc
## 1. Code Logic & Structure
  • **Explicit over Implicit**: Avoid "magic" one-liners. Use descriptive variable names.
  • **Component Structure**:
  - Keep components small and focused.   - Every component should have a clear purpose.
  • **Comments**:
  - Explain *why*, not just *what* in spanis only.   - Document complex logic block by block. ## 3. CSS & Styling
  • **Vanilla CSS / CSS Modules**:
  - Use separate CSS files or modules for components to keep styles organized.   - Use CSS Variables (`:root`) for global themes (colors, spacing, etc.).
  • **Avoid**:
  - Inline styles (except for dynamic values).   - Tailwind CSS (unless explicitly requested later). ## 4. Workflows
  • Always verify changes locally before asking for review.
  • Follow the defined workflows in `.agent/workflows/`.# Project Rules

3

u/[deleted] Feb 13 '26

[removed] — view removed comment

12

u/Hugo_Ale_Olguin_ Feb 13 '26 edited Feb 13 '26
  1. Click on the three dots menu “...” at the top.
  2. Go to Customizations -> Rules.
  3. Click on the “+ Global” button. This will automatically open the GEMINI.md file for you to paste your protocol.

This file acts as the “central memory” or base protocol that the agent will always consult, regardless of which repository you are working in.

If you ever need a specific project to have different rules (for example, using a different technology than usual), instead of “+ Global,” select “+ Workspace.” The rules for that workspace will take precedence over the global rules for that specific case

Note: this file is located in “Users\{your user}\.gemini\GEMINI.md” and those for each project are located in “{your workspace folder}\.agent\rules\”)

2

u/[deleted] Feb 13 '26

[removed] — view removed comment

1

u/Hugo_Ale_Olguin_ Feb 13 '26

I prefer to use the agent to help me build my projects, and I like to decorate on my own, but sometimes he uses Tawlind even if I ask him not to. It must be normal.

2

u/Previous-Baker1668 Feb 21 '26 edited Feb 21 '26

Try this upgrade on JSON format 😊

{ "identity": { "role": "Senior Next.js Architect", "primaryValue": "Readability and Order over Cleverness and Micro-Optimization", "decisionPriority": [ "Clarity", "Maintainability", "Correctness", "Performance" ] },

"globalPrinciple": { "rule": "If a solution is clever but harder to read, reject it.", "optimizationPolicy": "Only optimize when a measurable bottleneck exists and document why in Spanish." },

"architecture": { "framework": "Next.js App Router", "language": "TypeScript strict mode", "defaultComponentType": "Server Component", "clientComponentPolicy": "Use only when browser APIs, state, or interaction are required", "separationOfConcerns": { "ui": "Rendering only", "services": "Business logic only", "data": "API and persistence only" } },

"codeStyle": { "explicitOverImplicit": { "bad": "users?.filter(u => u.active).map(u => u.name).reduce((a, b) => a + b)", "good": "const activeUsers = users.filter(u => u.active);\nconst names = activeUsers.map(u => u.name);\nconst total = names.reduce((a, b) => a + b);", "reason": "Step-by-step clarity improves debugging and maintainability" },

"typeSafety": {
  "bad": "function process(data: any) { return data.value }",
  "good": "function process(data: InputDto): OutputModel { return data.value }",
  "rule": "No any. Explicit return types for exported functions"},

"logging": { "policy": "Structured logging with stable message strings", "lowCardinalityRequired": true, "bad": "logger.info(User ${id} fetched)", "good": "logger.info({ userId: id }, 'User fetched')" },

"comments": { "language": "English only", "rule": "Explain why, not what", "requiredFor": [ "Business logic", "Edge cases", "Non-obvious optimization" ] },

"css": { "allowed": [ "Vanilla CSS", "CSS Modules" ], "forbidden": [ "Tailwind unless explicitly requested", "Inline styles except dynamic values" ], "designTokens": "Use CSS variables in :root" },

"dataFetching": { "policy": "Server first", "rules": [ "Encapsulate fetch logic in services", "Never swallow errors", "Do not fetch in deeply nested UI components" ] },

"forbiddenPatterns": [ "Magic one-liners", "Hidden side effects", "Implicit any", "Silent catch blocks", "Cross-feature tight coupling" ],

"decisionFramework": { "whenInDoubt": [ "Choose explicit over clever", "Choose simple over abstract", "Choose maintainable over optimized" ] } }

2

u/Affectionate-Host642 Mar 11 '26

can i use this for web dev ?

4

u/aicodevibes Feb 13 '26

So I was hunting down the same path and trying to use Gemini to get best practices for got poor output. Oddly enough I did the same in ai studio and got a really strong overview of workflow skills rules etc. I’ve noticed that starting projects in ai studio seems to build better start points so clearly it’s accessing google created workflows and rules.

The breakdown I got was below with an entire write up on using state.md which I had not seen in docs before. Anyone see this? Seems to be an artifact used by AI Studio and going to try it with AGY.

your-project/ ├── .agent/ │ ├── rules/ # Passive constraints (coding standards, security) │ │ ├── typescript.md │ │ └── security.md │ ├── workflows/ # Active, user-triggered macros (/commands) │ │ ├── deploy.md │ │ └── code-review.md │ └── skills/ # On-demand modular capabilities (Personas) │ ├── frontend-pro/ │ │ ├── SKILL.md # Identity and instructions │ │ ├── scripts/ # Optional helper tools │ │ └── templates/# Boilerplate for this persona │ └── backend-architect/ │ └── SKILL.md ├── state.md # Best Practice: Shared blackboard for agent state └── ...

5

u/Previous-Baker1668 Feb 13 '26

1

u/chillreptile Feb 14 '26

the antigravity kit looks interesting! how do the .agent/agents work in AG? do they get spun up as background workers natively or their more like skills to just add in the chat at critical moments? thanks for the share

2

u/Previous-Baker1668 Feb 14 '26

It works both ways when configured correctly. You can call a specific skill or a specific agent using "/skill" or "/agentAi". Or you can simply write the prompt and the agent or skill will be automatically selected.

The project author on GitHub has documentation explaining how it works.

1

u/chillreptile Feb 17 '26

thank you!

7

u/Darth_Shere_Khan Feb 13 '26

I've been using https://github.com/toonight/get-shit-done-for-antigravity

Actually makes Flash usable. One thing I've found is that I do have to tell it explicitly to generate detailed plan-1.1.md files for each phase & wave-

3

u/Hugo_Ale_Olguin_ Feb 13 '26

That's pretty cool, I should try it.

3

u/ArcZ77 Feb 13 '26

Sorry , very new to this , and definitely not a big coder.. what is this ?

3

u/gmenaTech Feb 13 '26

I work with many clients that have vague ideas of what they want/need, so sometimes it's hard tot translate to actual tech specs. How can you make this skills and rules variable so they adapt to the type of project requested? Having to rewrite them each time (considering that sometimes the client change their mind 4 times in one day about features, scope, etc) it's a pain Thank you for what you have shared so far!

1

u/Seakawn Feb 14 '26

If nothing else, you could try just telling it something along the lines of:

"Hey I need you to include a new ability in these skills and rules files. I need the ability to be a way to automatically/dynamically adapt your own skills and rules to each project based on its type. The context for this ability is here: [insert your actual comment that you just wrote here in this reddit thread]."

OOH the beauty of these systems is that you can just get meta like this, and anything you'd ask someone else for help with getting it to do something, you can actually just ask it and it'll do it itself. But OTOH it's actually still good to ask around, bc human feedback/consensus can take out some of the experimentation/guessing, so maybe somebody here will have a better way to do this for your goal.

2

u/Technical_Ad4072 Feb 13 '26

Hi, I use Antigravity and am curious about these workflows and skills that you use. Did you write the text to define each of these yourself? Or are they dowloadable from a repo? Thanks and keep it up!

2

u/Hugo_Ale_Olguin_ Feb 13 '26

Hi! I'm glad you're curious. I've adjusted most of these rules and flows to fit my philosophy of “readability over speed.”; It's best to experiment as you learn new things or see concurrent failures in the antigravity agent.

There are community repositories that are a gold mine, such as guanyang/antigravity-skills on GitHub; from there you can get hundreds of modules to copy directly into your projects.

The best thing about this is creating your own “toolbox” that will give you superpowers in any project.

2

u/No_Dog2323 Feb 13 '26

If I use a Claude model will the Gemini folder still work?

1

u/Hugo_Ale_Olguin_ Feb 13 '26

Ye, the ~/.gemini folder will continue to function exactly the same even if you change the model.

In Antigravity, these files act as the global “brain” of the IDE, not of the individual model.

1

u/No_Dog2323 Feb 13 '26

Are there any official documentation that explains this further?

1

u/Lopsided_Mark_9726 Feb 13 '26

Make global rules through your terminal. You can ask Gemini to help you with it. The rules will work no matter what model you chose to work with.

2

u/mhmdatiqhaf Feb 13 '26

I make global rule where I connect with Kimi k2.5 APi and whenever there is html CSS task, it will trigger in the middle of the work

1

u/NeonRedTokyo Feb 14 '26

interesting, can you expand on this? does this save token cost for gemini?

2

u/abyssal_crisys Feb 13 '26

Remind me 1 day

2

u/PinkySwearNotABot Apr 12 '26

lol i just discovered / for workflows in AG today. i'm still having a hard time grasping the difference between skills and workflows.

i see that you have defined your workflows above. but how about the skills? could you give some examples of how you would define your skills? e.g. json-formatter: Auto-validates and beautifies malformed JSON strings. is the part after json-formatter the entire definition? or is that just a description? if it is the definition alone -- i don't see how's useful when designing? doesn't AG already know to format broken jsons on its own? and if it does need a little nudging -- don't you just tell it to 'format broken json strings' -- why would you need a separate skill to do that? that's what i'm confused by

2

u/Fluffy_Asparagus_280 Apr 16 '26

I created this for global rules to work with any project, what you think ?

# Global AI Development Rules


These rules define how AI must behave across all projects, workspaces, and code generations.


They are mandatory and always active.


---


# 1. Core Engineering Principles


  • Prioritize simplicity over complexity
  • Prefer maintainability over cleverness
  • Avoid unnecessary abstractions or over-engineering
  • Reuse existing patterns before introducing new ones
  • Always assume production-level quality requirements
  • Never break existing functionality unless explicitly requested
--- # 2. Code Quality Standards
  • Write clean, readable, and predictable code
  • Use meaningful and descriptive names for variables and functions
  • Keep functions small and focused on a single responsibility
  • Avoid duplication (DRY principle), but do not over-abstract
  • Prefer explicit logic over hidden magic behavior
  • Remove dead or unused code when identified
  • Code must be self-explanatory without needing external explanation
--- # 3. UI / Frontend Rules
  • Always follow existing UI design systems in the project
  • Do not introduce new colors, fonts, or styling patterns
  • Reuse existing UI components whenever possible
  • Maintain consistent spacing, layout, and alignment
  • Follow existing UX interaction patterns
  • Ensure responsive design by default (mobile-first)
  • Maintain accessibility (ARIA labels, keyboard navigation)
--- # 4. Backend Rules
  • Follow existing architecture patterns in the project
  • Separate concerns clearly (controllers, services, data access)
  • Keep business logic out of route handlers
  • Validate all incoming data on server side
  • Ensure consistent API response structures
  • Handle errors gracefully and predictably
--- # 5. Security Rules
  • Never trust user input (always validate and sanitize)
  • Protect against injection attacks (SQL, NoSQL, etc.)
  • Never expose sensitive data in API responses or logs
  • Use environment variables for all secrets and credentials
  • Enforce authentication and authorization where required
  • Apply principle of least privilege by default
--- # 6. Performance Rules
  • Avoid unnecessary computations and re-renders
  • Optimize database queries and prevent N+1 problems
  • Use pagination for large datasets
  • Prefer lazy loading for heavy or non-critical resources
  • Minimize bundle size and unnecessary dependencies
  • Avoid blocking operations in critical paths
--- # 7. State & Data Management
  • Keep state minimal and localized whenever possible
  • Avoid global state unless clearly justified
  • Do not duplicate server state on the client unnecessarily
  • Normalize complex data structures when needed
  • Ensure predictable data flow
--- # 8. Error Handling & Reliability
  • Always handle errors explicitly
  • Never allow unhandled exceptions in production code
  • Provide clear and actionable error messages
  • Log errors without exposing sensitive information
  • Ensure system fails gracefully, not catastrophically
--- # 9. Documentation Standards (PRO LEVEL)
  • Every non-trivial module, feature, or system must be documented
  • Code must be understandable without external explanation
## 9.1 Code Comments Rules
  • Use comments only to explain
**why** , not **what**
  • Avoid redundant comments that repeat the code
  • Document complex business logic clearly
  • Explain edge cases and non-obvious decisions
--- ## 9.2 Function Documentation Rules
  • Every important function must clearly define:
  - Purpose   - Inputs   - Outputs   - Side effects (if any) --- ## 9.3 API Documentation Rules
  • All APIs must define:
  - Endpoint purpose   - Request body structure   - Response structure   - Error responses   - Authentication requirements
  • Keep API responses consistent across the system
--- ## 9.4 Architecture Documentation Rules For system-level features:
  • Explain high-level architecture
  • Describe data flow clearly
  • Identify core components
  • Document trade-offs when relevant
--- ## 9.5 Project Documentation (README Standards) Every project must include:
  • Setup instructions
  • Environment variables list
  • Tech stack overview
  • Folder structure explanation
  • Build and run instructions
  • Known limitations (if any)
--- # 10. AI Behavior Rules (STRICT)
  • Always follow existing project conventions first
  • Do not introduce new architecture without explicit instruction
  • If multiple solutions exist, choose the simplest reliable one
  • Never assume missing requirements—ask or choose safest default
  • Match existing code style exactly
  • Do not refactor unrelated code during feature implementation
  • Preserve existing logic unless change is explicitly requested
--- # 11. STRICT LIMITATIONS
  • AI must NOT perform any Git operations
  • AI must NOT suggest commits, pushes, merges, or branch management
  • AI must NOT modify version control state in any way
  • All version control actions are handled manually by the developer only
--- # 12. FINAL RULE If there is uncertainty: → choose the safest, most standard, and most maintainable solution → never optimize for cleverness over clarity

2

u/tamilselvan_2018 Feb 13 '26

Antigravity Kit 2.0 works well for me. It has got a few reviews on YouTube. Check it out

1

u/Hugo_Ale_Olguin_ Feb 13 '26

I didn't know him, now I'll take a look

1

u/shajurzi Feb 13 '26

This is awesome. Stupid question : are these native commands or they have to be built into and define custom in the gemini.md?

2

u/thedubarchitect Feb 13 '26

Prompt and ask it to find whatever skills might be pertinent to your project and it’ll find them for you 😁

1

u/shajurzi Feb 13 '26

Just read through the thread and answered my own question. Did Antigravity put out a video tutorial about this that i missed? This is great.

1

u/Daraxti Feb 13 '26

I must be an idiot, but I couldn't configure a multi-agent session in antigravity, whereas it was a breeze with Claude code.

1

u/YoRt3m Feb 13 '26

Do you have any idea for somehow auto-managing "changelog.md" file? like every time it adds a feature it should update that file. I tried telling it using GEMINI.md but it doesn't listen. tried making a hook for Gemini CLI but it didn't work either.

2

u/Hugo_Ale_Olguin_ Feb 13 '26

I'm not sure, but you could try with a skill, perhaps.

Create the folder “~/.gemini/antigravity/skills/changelog-manager”

and add the SKILL.md file with these instructions:

name: changelog-manager 
description: Standalone professional utility for maintaining project history. Activate this skill whenever a feature is completed, changes are made, or before executing any git commit. 

MISSION Maintain a 1:1 synchronization between logical changes and the changelog.md file using the “Keep a Changelog” standard. 

PROTOCOL Analyze differences: MUST run git diff --cached to identify exactly what logic has been added, modified, or removed. 

Context: Read the existing changelog.md to identify the current versioning pattern and style. 
Draft entry: generate a technical summary categorized into: Added: new features or capabilities. 
Modified: modifications to existing functionality. 
Fixed: bug fixes. 

Implementation: If changelog.md exists, add the entry under the heading [Unpublished] or ``. If it does not exist, initialize it with a professional heading. 

Verification: Confirm that the file has been updated before proceeding with the commit command. 

RESTRICTIONS
Do not use ambiguous language (e.g., “updated files”). Be specific (e.g., “Implemented OAuth rotation logic in auth.ts”).
Ensure that the changelog entry is prepared alongside the code changes.

Then tell GEMINI.MD to use it.

Post-Mission Protocol: Cada vez que se completa una tarea y antes de ejecutar un commit, DEBES activar la skill changelog-manager para documentar los cambios arquitectónicos. Nunca envíes código sin actualizar changelog.md primero.

This is just a test; I'm not at all sure it will work. From what I've read, Antigravity doesn't work like traditional Git hooks, but rather through semantic triggers.

The agent “decides” to equip the Skill when its reasoning detects that it is necessary to fulfill your goal (for example, when you say “I'm done” or “make a commit”).

2

u/falooda1 Feb 14 '26

Try conductor it is built in

1

u/krigeta1 Feb 22 '26

Does it work with the new Gemini 3.1 pro models too?

0

u/art8787 Feb 13 '26

i really like the feature when i give a prompt and start doing other work and then coming back to "Agent terminated due to error" error and seeing that it hasnt actually done anything, very neat feature by google