Disciplined AI: Injecting Google’s Agent Skills in Antigravity
Let’s be real: AI-generated code is fast, but it’s often a maintenance nightmare. If you've been using tools like Antigravity on a Mac, you know the speed is there, but the discipline usually isn't.
To fix this, Google’s engineering leadership released Agent Skills—a set of 20 atomic skills and 7 commands that force AI to follow internal software engineering standards. Here is how to bake these standards into your local MacBook environment.
The Core Value: Anti-Rationalization
AI tends to "hallucinate" its way out of writing tests or skip the documentation phase because it's "too simple."
The Agent Skills framework introduces Anti-rationalization. If the AI tries to skip a step, the system pushes back. It enforces the Beyoncé Rule ("If you liked it, you should have put a test on it") and ensures every line of code is backed by a Spec before the first line is written.
1. Setting Up Your Mac M3
Since we're on Apple Silicon, we want to keep our tools native and our paths clean. We’ll start with Homebrew and the GitHub CLI (gh).
1.1 Install Tooling & Authenticate
Open your terminal and run the following to ensure your environment is ready:
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Ensure Brew is in your path
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
eval "$(/opt/homebrew/bin/brew shellenv)"
# Install GitHub CLI and Login
brew install gh
gh auth login
After you run gh auth login. Follow the prompts exactly: select GitHub.com -> HTTPS -> Yes (to authenticate) -> Login with a web browser.
Pro-tip: Your terminal will spit out an 8-character code (like 1234-ABCD). Hit Enter to open GitHub in your browser, paste that code into the box, and click the green Authorize button to link your account.
1.2 Inject Skills into Antigravity
Antigravity looks for a specific directory structure to "learn" new behaviors. We’re going to clone Google's engineering standards directly into your project's hidden agent folder.
# Navigate to your project root
cd ~/your-project-path
# Create the standard directory for AI skills
mkdir -p .agent/skills
# Clone the Google Agent Skills repo
gh repo clone addyosmani/agent-skills .agent/skills/engineering-standards
# Clean up the nested git data so you can track it in your own repo
rm -rf .agent/skills/engineering-standards/.git
1.3 Activate the "Brain"
Now that the skills are in place, you need to wake them up. Restart Antigravity or simply run this in its console:
/reload-skills
Testing the setup: Drop this into the Antigravity chat:
"I’d like to start a new feature. Use the /spec skill to help me define the requirements."
If the AI starts grilling you about goals, user scenarios, and non-functional requirements instead of just writing code, you've successfully injected Google’s standards into your local environment.
2. Git Best Practices
You want your team to use these same skills, but you don't want to pollute your repo with the AI's "thought logs" or session data. Add this to your .gitignore:
# --- AI Agent Config ---
# Ignore the brain's runtime data
.agent/workspaces/
.agent/logs/
.agent/cache/
.agent/sessions/
# KEEP the skills
!.agent/skills/
2.1 The Deep Dive: Why the Git Strategy Matters
You might wonder why we're being so picky about our .gitignore. Here’s the breakdown:
2.1.1 Why you shouldn't ignore .agent/skills
The agent-skills folder is essentially your AI's "Standard Operating Procedure."
Consistency: If you don't commit this folder, your teammates (or you on a different machine) will just get a "generic" AI. You'll lose access to advanced skills like /spec or /review.
Version Control: If you tweak a SKILL.md—for example, bumping the required test coverage from 80% to 90%—that logic should live and evolve alongside your source code.
2.1.2 Why you must ignore other subdirectories
Privacy & Security: Folders like .agent/sessions or workspaces can contain raw conversation history, sensitive intermediate data, or snippets of your work process. You definitely don't want that pushed to a server.
Zero Utility: logs and cache are generated locally and are specific to your machine. Committing them just bloats the repo and creates unnecessary merge conflicts.
3. Moving from "Chatbot" to "Engineer"
Once you restart Antigravity, the AI is no longer just a chatbot. Instead of saying "Build me a login page," you start utilizing the slash commands:
/spec: Force the AI to write a technical spec first./plan: Break that spec into a task list./review: Audit the work against "Clean Code" standards.
It takes an extra 60 seconds to run a /spec, but it saves 3 hours of debugging technical debt later. If you're running an M3 Mac, you have the horsepower—now you have the standards.
Thanks for reading! Did you find this helpful?
Get in touch