Deep dive: building blocks
Every agent tool, such as Antigravity, Claude Code, Codex or Cursor, is built from the same parts. This page explains each one: what it is, how it works, where you met it today, and how to use it on your own projects. Skills get the most room, including how to write your own. At the end: plugins, which package several parts so you can install them in one go.
On this page
- Model
- Agent
- Tools
- MCP
- Rules
- Memory
- Skills
- Write your own skill
- Hooks
- Subagents
- Plugins
- Keep it thin
- Check yourself
Model
The model is the language model at the centre: it reads text and writes text, one token at a time. Everything else on this page is built around it.
- Sizes. A model family comes in sizes. A small one, such as Gemini Flash, is fast and cheap. A large one, such as a Pro model, reasons better on hard tasks, but it is slower and uses up your quota sooner.
- Thinking. Many models can think before they answer: they write their reasoning first, then the answer. That helps with planning and hard bugs, and it costs time and tokens.
- Limits. Every model can read only so much at once, its context window, and knows the web only up to its training cutoff. Context and Your model stopped learning show what follows from that.
Today: Gemini 3.8 Flash, so everyone's free quota lasted. On your own projects: pick by task, a stronger model for code: see Do it professionally.
Agent
An agent is a model in a loop. It plans a step, uses a tool, looks at the result, and goes again, until the task is done or it needs you. That loop is what makes it more than a chatbot: it can run your Check, read the error and fix its own work.
- Give it a way to check itself. A command that says pass or fail, such as
node tools/check.mjsor a test, lets the agent loop until the result is right, instead of stopping at "should work". - Set the limits. The agent asks before it runs commands; you allow what you understand. Most tools also have a mode where the agent plans first and waits for your OK. Use it for anything bigger than a small change.
- Stop it early. An agent that goes in circles keeps spending. Two failed attempts: stop, and start a fresh chat.
Today: the agent panel of Antigravity IDE.
Tools
Tools are the agent's hands: read, write and edit files, search the code, run terminal commands, open a browser. The model asks for a tool in a fixed format, the agent tool runs it, and the result goes back to the model as input.
- The agent can only do what its tools allow, and your permission settings decide which tools run without asking.
- Every result lands in the context. A command that prints 5,000 lines costs 5,000 lines of tokens, on every later turn of that chat.
Today: files, the terminal for node tools/…, and Chrome.
MCP
The Model Context Protocol is an open standard for adding tools to any agent. An MCP server provides tools, for example "record a performance trace"; the agent tool starts the server and hands its tools to the agent. One server works in every tool that speaks MCP.
Your repo has one: Chrome DevTools for agents, configured in .agents/mcp_config.json:
.agents/mcp_config.json in your repo
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@1.10.1", "--isolated", "--no-usage-statistics"]
}
}
}
Antigravity starts the server with npx, which comes with Node, and QA gets tools for traces, screenshots and Lighthouse audits. Claude Code reads the same shape from a file called .mcp.json. There are MCP servers for GitHub, databases, design tools and many more.
- Each server costs context: its tool descriptions sit in every chat. Install the ones you use.
- Each server runs code on your laptop, with your rights. Install only servers from sources you trust, and pin a version, as your repo does with
@1.10.1.
Rules
Rules are instructions the agent gets in every chat. Antigravity reads AGENTS.md at the root of your repo, a format many agent tools read. Claude Code reads CLAUDE.md; a line @AGENTS.md in it pulls in your existing rules.
Your repo's AGENTS.md has about 75 lines: work Role by Role, one Role per chat, read every change back, use the small Flash model, and write Windows commands in PowerShell syntax. Each of these is something the agent would get wrong without being told.
- Belongs in the rules: what the agent cannot guess and needs every time: how the project is built, the commands, the order of work, your conventions.
- Stays out: what the model does right anyway, and long procedures. A procedure belongs in a skill, which loads only when needed.
- Keep it short: every line costs context in every chat. Say what to do, not what to avoid: naming the unwanted thing puts it in the model's mind.
Memory
A model remembers nothing between chats: every new chat starts empty. Memory is what the agent tool writes down and reads back in the next chat, so you don't have to say the same thing twice. Rules are memory you write yourself. Agent tools now also write some on their own:
- Claude Code keeps auto memory: notes it takes from your corrections and preferences, one folder per project in
~/.claude/projects/. An index file,MEMORY.md, loads at the start of every chat. Type/memoryto see the notes or switch them off. - Antigravity asks first:
/learnturns the corrections of a chat into rules or skills, and saves them only after you approve.
Your repo has its own memory, in files: your content file, the spec and the design brief carry what one Role decided to the next, each in a fresh chat. Inside your repo shows them.
Watch out: memory is context you did not put there yourself. A wrong or outdated note steers every chat, quietly. Read your memory now and then, and delete what is no longer true.
Skills
A skill is know-how in a folder: a file SKILL.md with a short header and instructions below it, and if needed more files, such as examples, references or scripts. Your repo has twelve, one per Role and a few helpers. This is the smallest:
.agents/skills/explain/SKILL.md in your repo (the start)
---
name: explain
description: Explains a file, a piece of code or an idea of this portfolio
site to a beginner, briefly and in plain words, … Use when the person
asks "Explain … to me", "What does … do?" or "Why …?" …
---
# Explain
You are a patient teacher. The person wants to understand their site,
not to change it. You read files; you change none and run no command.
1. Find it in this repo. …
How the agent uses skills
Skills load in three stages, so you can have many without filling the context:
- At the start of every chat, the agent sees only each skill's
nameanddescription: one line per skill. - When your request matches a description, the agent reads that skill's
SKILL.md. - The
SKILL.mdcan point to more files, which the agent opens only when it needs them. Modern Web Guidance works this way: its skill points to an index, and the index to more than 160 guides.
So the description decides when a skill runs. Write what it does and when to use it, with the words people really say, as the explain skill does.
Where they live: in Antigravity, .agents/skills/<name>/SKILL.md in your repo; in Claude Code, .claude/skills/<name>/SKILL.md. The format is an open standard, Agent Skills, so most agent tools read the same files.
Started by the agent, or by you. By default the agent starts a skill when your request matches its description. You can also make a skill run only when you call it by name. In Claude Code, one line in the header does that, disable-model-invocation: true, and you call the skill as /explain. Then it never starts by surprise. Antigravity has no such switch; there, typing /explain makes sure the skill is used.
Saved prompts are skills now. A prompt you type again and again, such as "review this page for accessibility", goes into a skill, and you start it with /name. Older names for the same idea: Claude Code had commands, Antigravity had workflows. Claude Code merged commands into skills, and Antigravity's workflows stopped working on 19 October 2026; its /migrate-workflows turns them into skills.
Write your own skill
Matt Pocock writes some of the most-used skills there are. Austin Marchese studied how he does it and explains it, in plain words, in this video. Here are its five steps, applied to your portfolio.
1. Start from what you keep sending back
A skill is a correction you got tired of making. If the agent gets something right the first time, it needs no skill: a skill for that only costs tokens. So watch what you keep sending back. Models are trained to finish, and they rush to a result; a skill works best when it fixes one step of the work, not the whole job.
Example: every time you ask your agent to add a project, it forgets the GitHub link and writes three sentences where one would do. You correct it every time. That is a skill.
2. Use leading words
Some words carry everything the model has read about them. "Refactor" pulls in all it learned about refactoring, so you need not explain it. Other leading words: steelman (argue the other side at its strongest), pre-mortem (imagine it already failed, then ask why), BLUF (bottom line up front), relentlessly. A word you invent carries nothing, so you pay for its definition in tokens. Before you describe something at length, ask your agent: "Is there an established name for what I'm describing?"
3. Keep it small, and call it yourself
Matt's grill-me skill, which makes the agent interview you, has seven lines. Small skills cost little context and leave the model room to work. Matt also lets most of his skills run only when he calls them. They never start by surprise, and they cost no context until he uses them.
Your add-project skill, small enough to read in one go:
.agents/skills/add-project/SKILL.md
---
name: add-project
description: Adds one project to site/content.json. Use when the person asks to add or show a project on their portfolio.
---
# Add a project
1. Ask for the project's name, one sentence on what it does, and the link to its GitHub repository.
2. Add it to the projects in site/content.json, in the shape site/content.schema.json allows.
3. Run node tools/check-content.mjs, then read the change back in one sentence.
To try it: create the folder add-project in .agents/skills/, save the file above in it as SKILL.md, start a fresh chat and type "Add a project to my portfolio."
4. Test it on real work
Use the skill for real for a week. If you stop sending results back, it works: that is the whole test. When something still goes wrong, fix it with one sentence, and add only what you saw fail. Matt's grill-me grew this way: "Ask one question at a time" came in because many questions at once confused people.
5. Cut what does nothing
Skills only ever seem to grow, so schedule the day you cut one. Lines such as "Be thorough." change nothing: they are no-ops. Remove a line and run the skill again; if the result is the same, delete the whole sentence. Say what you want, not what you don't want. And before you write a new skill, check whether two you have already do the job together.
Copy other people's skills to learn from them, then make them yours. Matt himself advises most people to write their own skills and own their process.
Hooks
A hook is your own script that the agent tool runs by itself at a fixed moment: before a tool runs, after a file is edited, when a chat starts, when the agent stops. A rule asks the model to do something, and the model can forget. A hook always runs.
Examples: run the Check after every edit; refuse edits to site/content.json outside the Analyst; format the code. Claude Code calls these moments events, such as PostToolUse after a tool ran, and you set hooks in .claude/settings.json:
.claude/settings.json (Claude Code)
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [{ "type": "command", "command": "node tools/check.mjs" }]
}
]
}
}
Antigravity has hooks too, in .agents/hooks.json, with moments such as PostToolUse and Stop. Not used today.
Subagents
A subagent is a helper that the main agent starts for a side task. It works in a fresh context of its own and hands back only its result, so the main chat stays clean.
- Worth it for: a messy side task, such as searching a big codebase or long docs; independent tasks that can run in parallel; an independent second opinion, such as a review by an agent that did not write the code.
- Not worth it for: small tasks. Each helper costs tokens and time, and leaves you one more result to check. A one-page site needs none.
In Claude Code you define your own subagents as Markdown files in .claude/agents/, each with a name, a description and its instructions. A subagent knows nothing of your chat, so brief it like a new colleague:
Agent chat
Goal: <one sentence: what you need back>
Context: <three to five facts it needs, and the files to read>
Do: <the steps>
Do not: <what to leave alone>
Return: <the format, for example a list of ten lines>
Done when: <how you can check the result>
Plugins
A plugin is not a ninth part. It is a package of parts: skills, subagents, hooks, MCP servers and, in Antigravity, rules, in one folder that installs as one unit. Someone builds a setup that works and packs it as a plugin; you install it in one step instead of copying five folders by hand, and its updates come the same way.
A plugin is a folder with a manifest, plugin.json, that gives it a name, and the parts beside it:
An Antigravity plugin
my-plugin/
plugin.json the name and a description
skills/review/SKILL.md a skill
agents/reviewer.md a subagent
rules/style.md a rule
hooks.json hooks
mcp_config.json MCP servers
Antigravity IDE loads a plugin you copy into .agents/plugins/ in your project, or into ~/.gemini/config/plugins/ for all your projects. The Antigravity app and its command-line tool also install plugins from a marketplace, a catalog of plugins. In Claude Code you type /plugin in a chat and pick one from the Discover tab; there the manifest sits in .claude-plugin/plugin.json. Codex has plugins too.
- Worth it for: a setup you want in many projects, or want to give your team; the official package of a tool or framework, often its skills and its MCP server together.
- Watch out: an enabled plugin is part of every chat. The name and description of each of its skills and subagents sit in the context on every turn, used or not, and its hooks and MCP servers run on your laptop with your rights. Install few, from sources you trust, read what they contain first, and switch off what you no longer use.
Not used today: your repo keeps its skills, rules and MCP settings loose in .agents/, so you can open and read every file. Pack them as a plugin once you want the same setup in a second project.
Keep it thin
Models get better every few months. Rules and skills written for last year's model can hold this year's back: it would do better with less. So re-test your setup now and then, without some of its rules, and delete what the model no longer needs. Today's repo was a scaffold for beginners in a two-hour room. On your own projects, let it get thinner.
Check yourself
Seven questions on this page. Pick one answer each, then check them.