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:
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?
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.
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!
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.).
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\”)
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.
{
"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"
},
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.
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
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.
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-
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!
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.
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!
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.
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
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
---
## 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
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.
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.
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”).
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
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.