Have you ever wished your AI agent just knew your team's specific coding conventions or your personal workflow for generating documentation?

With Google Antigravity, you can teach it exactly that. The secret lies in a powerful feature called Agent Skills.

Skills are reusable packages of knowledge that extend what the Antigravity agent can do. Instead of repeating complex instructions in every prompt, you can encapsulate best practices, project-specific workflows, and personal utilities into a skill that the agent can discover and use automatically.

This guide will walk you through everything you need to know to start creating and "installing" your own custom skills, transforming your agent from a general-purpose assistant into a specialized member of your team.

What Exactly is an Agent Skill?

At its core, a skill is simply a folder containing a set of instructions. Based on an open standard for agent capabilities, each skill package can include:

  • Instructions (SKILL.md): A Markdown file with clear, step-by-step instructions on how to approach a specific task.

  • Best Practices: Conventions, do's, and don'ts for the agent to follow.

  • Resources: Optional scripts, templates, or example files the agent can use to complete its work.

The magic is that you don't need to explicitly tell the agent to use a skill. It employs a "progressive disclosure" pattern to find and apply them on its own.

  1. Discovery: When you start a conversation, the agent scans for available skills and reads their names and descriptions.

  2. Activation: If a skill's description seems relevant to your request, the agent reads the full SKILL.md file to learn the process.

  3. Execution: The agent follows the instructions from the skill while working on your task.

How to Create and Install a Skill: A Step-by-Step Guide

"Installing" a skill simply means creating a folder in the right directory. Let's build one from scratch.

Step 1: Choose Where Your Skill Will Live

Antigravity looks for skills in two locations, giving you control over their scope.

Location Scope Best For
<workspace-root>/.agent/skills/<skill-folder>/ Workspace-specific Project-specific workflows, like your team's deployment process or API testing conventions.
~/.gemini/antigravity/global_skills/<skill-folder>/ Global Personal utilities or general-purpose tools you want available in all your projects.

For your first skill, let's create a global one.

Step 2: Create the Skill Folder

Navigate to the global skills directory and create a new folder. The folder name should be descriptive, like python-pytest-generator.

# On macOS or Linux
mkdir -p ~/.gemini/antigravity/global_skills/python-pytest-generator
cd ~/.gemini/antigravity/global_skills/python-pytest-generator

Step 3: Create the SKILL.md File

Inside your new skill folder, create the most important file: SKILL.md. This file will contain the instructions for the agent.

touch SKILL.md

Your skill folder structure will now look like this:

~/.gemini/antigravity/global_skills/
└── python-pytest-generator/
    └── SKILL.md

Step 4: Add Frontmatter and a Description

Open SKILL.md in your favorite editor. The first thing you need to add is YAML frontmatter. This provides metadata for the agent.

Field Required Description
name No A unique identifier (lowercase, hyphens for spaces). Defaults to the folder name.
description Yes A clear, third-person description of what the skill does. This is the most important field for discovery.

Here's an example for our python-pytest-generator skill:

---
name: python-pytest-generator
description: Generates unit tests for Python functions using pytest conventions. Creates a separate test file and includes basic assertions.
---

# Pytest Unit Test Generation

When the user asks for unit tests for a Python function, follow these steps...

Pro Tip: Your description is your skill's "advertisement" to the agent. Be specific and include keywords. A bad description like "makes tests" is less likely to be picked up than the detailed one above.

Step 5: Write the Instructions

Below the frontmatter, write the instructions for the agent in plain Markdown. Be clear and direct. You can use headings, lists, and code blocks to structure the information.

---
name: python-pytest-generator
description: Generates unit tests for Python functions using pytest conventions. Creates a separate test file and includes basic assertions.
---

# Pytest Unit Test Generation

When a user asks for unit tests for a Python function, you must follow these steps precisely.

## 1. Identify the Target Function

First, identify the exact function to be tested and the file it resides in.

## 2. Create the Test File

Create a new test file in the same directory. The filename must be prefixed with `test_`. For example, if the original file is `utils.py`, the test file should be `test_utils.py`.

## 3. Write the Test Code

- Import the `pytest` library.
- Import the function to be tested.
- Write a test function, also prefixed with `test_`.
- Use simple `assert` statements to check the function's output against expected values.
- Include at least one passing test case and one edge case if applicable.

## 4. Example

If the source function is:
```python
# in file: math_ops.py
def add(a, b):
    return a + b

You should generate:

# in file: test_math_ops.py
import pytest
from math_ops import add

def test_add_positive_numbers():
    assert add(2, 3) == 5

def test_add_negative_numbers():
    assert add(-1, -1) == -2

That's it! Your skill is now "installed" and ready for the agent to use.

## Best Practices for Effective Skills

*   **Keep Skills Focused:** A skill should do one thing well. Instead of a single `dev-workflow` skill, create separate skills for `code-review`, `release-notes-drafter`, and `database-migrator`.
*   **Write Excellent Descriptions:** This can't be stressed enough. The description is how the agent finds your skill. Think about the phrases a user might type and include relevant keywords.
*   **Use Scripts as Black Boxes:** If you include helper scripts in your skill's folder, instruct the agent to run them with a `--help` flag first to understand their function, rather than reading the entire source code. This saves context space.
*   **Include Decision Trees:** For more complex tasks, add a section in your `SKILL.md` that guides the agent. For example: "If the user mentions 'production', use the `deploy_prod.sh` script. Otherwise, use `deploy_staging.sh`."

## Next Steps

You now have the power to customize your Google Antigravity agent to fit your exact needs. Start by identifying a repetitive task in your daily workflow. Could it be automated with a skill? Try building one for it.

By investing a little time in creating a library of workspace and global skills, you can significantly boost your productivity and make your agent an indispensable part of your development process.

### Official Resources

*   **Antigravity Agent Skills Documentation:** [https://antigravity.google/docs/skills](https://antigravity.google/docs/skills)
*   **Open Standard for Agent Skills:** [https://agentskills.io/home](https://agentskills.io/home)