DEV Community

Malloc72P
Malloc72P

Posted on

AntiGravity: Getting the Most Out of Agentic Coding with Rules, Skills, and Workflows

TL;DR

  • AntiGravity is a VS Code fork by Google DeepMind, built for agentic coding with enhanced AI agent features.
  • The .agent folder lets you define Rules, Skills, and Workflows to give your AI agent project-specific context.
  • Rules set coding conventions the agent must follow (e.g., architecture, style guides). Use always_on sparingly — prefer model_decision to avoid context overload.
  • Skills teach the agent how to solve specific problems using specific tools (e.g., using GitHub MCP to fetch commit history).
  • Workflows automate repetitive command sequences (e.g., install → type-check → build) and can be triggered via slash commands.

Key Concepts

Rules: Coding Standards for Your Agent

Rules live in .agent/rules/ and define principles the agent must follow. Each rule file uses frontmatter to control when it activates:

---
trigger: always_on
---
# Always-on rules (use sparingly)
Enter fullscreen mode Exit fullscreen mode
---
trigger: model_decision
description: Backend rules for Server Actions, Prisma, Auth, etc.
---
# Contextual rules — agent decides when to apply
Enter fullscreen mode Exit fullscreen mode

Keep rules concise. If the agent wouldn't make a mistake without the rule, leave it out — too much context causes hallucinations.

Skills: Teaching Your Agent How to Solve Problems

Skills (.agent/skills/) define what tool to use and how to use it for specific scenarios.

---
name: git-history
description: Uses GitHub MCP to fetch and summarize recent commit history.
---

## When to Use
- "What changed recently?"
- "Summarize recent commits"

## Steps
1. Identify repo owner/name
2. Call `list_commits` via GitHub MCP (perPage: 5-10)
3. Optionally call `get_commit` with `include_diff: true`
4. Summarize changes in categories (features, fixes, refactors)
Enter fullscreen mode Exit fullscreen mode

Workflows: Automating Repetitive Tasks

Workflows (.agent/workflows/) chain commands together:

---
description: Build & type-check workflow
---

1. Install dependencies
// turbo
'pnpm install'

2. Type check
// turbo
'pnpm check-types'

3. Build
// turbo
'pnpm build'
Enter fullscreen mode Exit fullscreen mode

The // turbo comment tells the agent to run the command automatically without user approval.


This is a summary of my original post written in Korean.
For the full article with detailed explanations and more examples, check out the original:

👉 Read the full post on my blog

Top comments (0)