News/Nov 28, 20266 min

Make Antigravity remember your rules

Share

Antigravity forgets your instructions in every new conversation. Based on Google's docs: keep material in the project folder, put standing instructions in a short AGENTS.md, save repeated workflows as skills with /learn, start big jobs with /plan, and switch between Gemini 4 Neon and Hydrogen by task. Plus four reasons a rule silently does nothing, and a prompt that has your AI agent set it all up.

Machine translation. Read the original

SourceAntigravity docsReported Nov 28, 2026Not yet tested

Every new Antigravity conversation starts from zero: whatever you told it last time is gone. If you want it to keep following your standards, they have to live in files it reads on its own. Put standing instructions in a rules file, turn any workflow you repeat into a skill, and keep your material in the project folder. Below is where each of those goes according to Google's docs, how to write them, and what to check when one of them quietly does nothing.

Give each job its own project folder

In the Antigravity app, click New Project and attach a local folder. Drop the briefs, docs and assets for the job in there. Type @ in the prompt box to point at a specific file, so the agent works from the real source instead of whatever you pasted into the chat.

That folder also decides where Antigravity looks for rules and skills. The docs say it checks the folder you attached and each parent folder up to the repository root. It never looks in subfolders below it, so your rules file has to sit at that level or higher.

Rules: a handful of lines, in the right place

Rules are the things that should hold in every conversation: the language and format of answers, words to avoid, the checks to run after a change. The simplest setup is an AGENTS.md (or GEMINI.md) at the root of the project folder. It needs no header and is always active.

Start small. Something like this is plenty:

- Answer in plain English; keep code comments in English too
- Lead with the answer, then the reasoning; no pleasantries
- Never use "leverage", "synergy" or "game-changer"
- Name files in lowercase with hyphens
- After changing code, run npm test; if it fails, the task is not done
- Mark any fact you could not check as "unverified"; never invent one

Longer rules eat context on every turn, and when the total goes over budget, large rules can get trimmed.

For rules that should apply to every project, use ~/.gemini/AGENTS.md. Once you want several rule files, move them into .agents/rules/, but each file there must start with a header that says when it loads:

Header When it loads
trigger: always_on Every turn
trigger: model_decision plus description Only the description at first; the full text when a task matches. Good for long topic guides
trigger: glob plus globs When the agent touches matching files, such as *.ts
trigger: manual Only when you @-mention it. Good for a release checklist

The skills and rules Antigravity found for a project; items tagged Global apply everywhere

Image from the Antigravity docs. Select the project under Projects and scroll to Customizations to see the skills and rules it actually loaded, plus how many tokens they use. Check here after every change.

Repeat it twice? Make it a skill

Rules say what must hold; a skill says how to do one job step by step. The docs draw the line the same way: constraints go in rules, multi-step procedures go in skills. A weekly trend roundup in a fixed table, reformatting articles to a house template, cutting long videos into clips are all good candidates.

A skill is a folder at .agents/skills/<name>/ with a SKILL.md inside. Its header needs a description that says what it does and when to use it. On every turn the agent sees the name and description of each skill, and when one fits the task it reads the full file and follows it without being asked. Scripts and templates can sit alongside.

The easiest way to get one written: run the workflow with the agent once until it works, then type /learn. It reviews the session, decides whether the lesson is a rule or a skill, and writes a proposal for you to approve before it touches any file. According to the docs it updates an existing rule or skill rather than piling up duplicates.

Ask for a plan before big jobs

For anything with many steps or wide changes, start the request with /plan. The agent reads the relevant files, asks a few questions if the request is vague, and drafts an implementation plan. Comment on it, cut steps you don't need, and click Proceed only when it looks right. That costs far less than letting it charge ahead and redoing half the work. More everyday commands are in Get comfortable with Antigravity.

Match the model to the job

In the model picker, use Gemini 4 Neon for work that needs judgment (planning, code review, final drafts) and the faster, cheaper Gemini 4 Hydrogen for executing a plan (tidying, translating, bulk edits). Both need a Google AI Pro or Ultra plan inside Antigravity. Put that split in your rules file too so you never have to repeat it; see this tip. For what Neon is and what it costs, see Gemini 4 Neon is here.

Rule not working? Check these first

Symptom Cause Fix
A rule in .agents/rules/ has no effect The file has no header, or the trigger is camelCase like alwaysOn; it gets dropped silently Add the header; valid values are always_on, model_decision, glob, manual
An AGENTS.md in a subfolder is ignored Antigravity never looks below the attached folder Move it up to that level, or add the subfolder to the project
rules/frontend/react.md is ignored Only files directly inside rules/ are scanned Move it up one level, or register it in .agents/rules.json
A skill doesn't show up The skill folder is nested one level too deep, or SKILL.md lacks a description Use .agents/skills/<name>/SKILL.md and add the description

Let your AI agent set it up

Set up this Antigravity project so I never have to repeat my instructions:
1. Show me the project folder structure and every rule and skill you can currently see (AGENTS.md, GEMINI.md, .agents/rules/, .agents/skills/, and global config under ~/.gemini/)
2. Ask me multiple-choice questions about answer language, output format, banned words and the checks to run after changes, then write an AGENTS.md of no more than 10 lines at the project root
3. Check the trigger header at the top of every file in .agents/rules/ and list any that are missing or invalid, with the fix you plan to make
4. Look through our recent conversations for a workflow I have done at least twice, pick the most useful one, and draft it as a skill at .agents/skills/<name>/SKILL.md
5. Show me the drafts from steps 3 and 4 and wait for my OK before writing files; when done, tell me where in the project settings to confirm they loaded

Watch out for

  • Folder names follow the docs: use .agents/ for new projects. The old .agent/ still works, but don't mix them.
  • manual rules can't be @-mentioned in the agy command line; that only works in the app.
  • The command line also reads a few skill folders the app ignores, such as ~/.gemini/skills/. If you use both, keep personal skills in ~/.gemini/config/skills/.
  • Rules are instructions, not a safety net. What the agent may delete or change is set by permissions, not by a rules file.

References

Done with this one? Mark it to track your path.Sign in
Save it for laterSign in
Questions about this piece?Ask AI about this

Comments (0)

No comments yet. Start the conversation.

Sign in to join the discussion.Sign in