💡

Key Points

Key Takeaways

  • 1

    2026 edition recommended directory structure to maximize utility of Google AntiGravitys Agent Skills.

  • 2

    Roles of the `.antigravity/` folder and specific description examples for `SKILL.md` and `rules/`.

  • 3

    Recommended settings for VS Code and coexistence with agent rules in Git operation.

Google AntiGravity”s new feature “Agent Skills” evolves agents into autonomous specialists. However, to manifest its true value, it is necessary to prepare an appropriate “Habitat.”

In this article, we deliver a complete guide to “Recommended Folder Structure” and “Configuration Files (Config)” based on 2026 best practices.

1. Definitive Directory Structure (Standard Structure)

The standard structure for 2026 is as follows. By maintaining this structure, the agent can obtain context without getting lost.

.
├── .antigravity/ # The Agent"s "Brain" & "Config"
│ ├── skills/ # Individual skills (task-based)
│ │ ├── create-article/
│ │ │ ├── SKILL.md # Instruction manual (Detailed SOP)
│ │ │ └── scripts/ # Dedicated tools (Python/TS)
│ │ └── deploy/
│ ├── rules/ # Global guidelines
│ │ └── rules.md # Project-wide constraints
│ └── README.md # Project overview for the agent
├── .agent/ # (Legacy) Workflow for older versions
└── src/ # Source code

Why This Structure?

  • Self-Contained : By placing scripts within skills/, tools are loaded only when that skill is used (Just-In-Time Context).
  • Clear separation : Clearly separates rules/ (rules to follow) and skills/ (tasks to do).

2. Setting Files: What to Write?

.antigravity/rules/rules.md

Describes constraints that the agent “must absolutely follow” throughout the project.

# Agent Rules

## Code Style

- **Framework** : Astro v5 + React
- **Language** : TypeScript (Strict mode)
- **Styling** : Tailwind CSS (Utility-first)

## Forbidden Actions

- ❌ Do NOT make changes to the `legacy/` directory.
- ❌ Do NOT use `npm` or `yarn`. Always use `pnpm`.

.antigravity/skills/[skill-name]/SKILL.md

A detailed instruction manual for performing specific tasks.

---
name: create-feature
description: Standard flow for implementing new features. Employs Test-Driven Development (TDD).
---
# Procedures
1. **Spec Understanding** : Analyze user requests and list use cases.
2. **Test Creation** : Create failing tests in `src/tests/`.
3. **Implementation** : Implement minimal code to pass tests.
4. **Refactoring** : Organize code to comply with `rules.md` conventions.

Settings for comfortable collaborative work with the AntiGravity agent.

.vscode/settings.json

{
 "antigravity.agent.mode": "auto, // Automatically switch Plan/Fast based on task
 "antigravity.security.sandbox": "strict", // Block destructive commands
 "files.exclude": {
 " **/.antigravity/cache": true // Hide agent"s thinking logs
 }
}

4. “Coexistence” Git Flow with the Agent

Operational rules to prevent conflicts between changes by agents and humans.

1.** Agent Branch **: Have the agent work on big tasks (refactoring, etc.) in an agent-only branch (e.g., agent/refactor-auth).

2.** Conventional Commits **: Force the agent to follow a specific commit message format.

  • feat(auth): add login flow
  • fix(ui): correct color contrast

3.** Review First**: Always treat the agent’s output as a PR (Pull Request) and have a human review it before merging.

Summary: Environment Shapes Intelligence

Just as excellent engineers are particular about their desk environment, excellent agents need a “well-organized directory” and “clear rule files.”

I recommend saving this structure as a template and copying it for every new project. Then, the agent should act like a “veteran employee” from day one.

引用: YouTube

Please also see the practical demo video for agent settings.