Real-World Workflows: Putting It All Together

Practical examples combining all Antigravity features for maximum productivity

The Power of Composition

Each Antigravity feature is useful alone. Combined, they’re transformative. This lesson shows real workflows that combine Rules, Skills, MCP, Browser, and Artifacts.

Workflow 1: Building a Full Feature

Scenario: Add user authentication to an existing Next.js app with Supabase.

Step 1: Set Up Context (Rules + Skills)

Your GEMINI.md already defines:

- Use TypeScript strictly (no `any`)
- Use Supabase for backend
- Follow clean-code skill

Step 2: Plan (Agent PLANNING Mode)

You: "Add email/password authentication with login,
      register, and protected routes"

Agent:
1. Reads GEMINI.md β†’ knows to use Supabase + TypeScript
2. Loads skills: clean-code, testing-patterns
3. Checks knowledge items β†’ finds existing DB patterns
4. Creates implementation_plan.md
5. Waits for your approval

Step 3: Execute (MCP + Terminal)

Agent (approved):
1. Supabase MCP β†’ Creates auth schema
2. Terminal β†’ Installs @supabase/auth-helpers
3. Creates src/lib/auth.ts β†’ Auth utilities
4. Creates src/app/(auth)/login/page.tsx
5. Creates src/middleware.ts β†’ Route protection
6. Supabase MCP β†’ Enables email auth provider
7. Terminal β†’ pnpm build (verifies)

Step 4: Verify (Browser + Artifacts)

Agent:
1. Browser β†’ Opens localhost, navigates to /login
2. Browser β†’ Fills in test credentials
3. Browser β†’ Verifies redirect to dashboard
4. Screenshots β†’ Login page, dashboard
5. Creates walkthrough.md with proof

Total time: ~5 minutes. Without Antigravity: 2-4 hours.

Workflow 2: Debugging a Production Issue

Scenario: Users report the checkout page is broken.

The Debug Flow

You: "Checkout page returns 500 error in production"

Agent:
β”œβ”€β”€ Knowledge Check
β”‚   └── Finds "checkout_flow" knowledge item
β”‚       β†’ Knows the architecture instantly
β”‚
β”œβ”€β”€ Investigation (MCP + Browser)
β”‚   β”œβ”€β”€ Supabase MCP β†’ get_logs for API errors
β”‚   β”œβ”€β”€ Browser β†’ Reproduces the error
β”‚   └── Terminal β†’ Checks recent git changes
β”‚
β”œβ”€β”€ Root Cause Analysis
β”‚   β”œβ”€β”€ Reads error logs β†’ "column 'total' not found"
β”‚   β”œβ”€β”€ Checks migration history β†’ Missing migration
β”‚   └── Identifies the fix
β”‚
β”œβ”€β”€ Fix (EXECUTION)
β”‚   β”œβ”€β”€ Creates new migration
β”‚   β”œβ”€β”€ Supabase MCP β†’ apply_migration
β”‚   └── Terminal β†’ pnpm build
β”‚
└── Verify
    β”œβ”€β”€ Browser β†’ Tests checkout flow end-to-end
    β”œβ”€β”€ Screenshots β†’ Successful checkout
    └── Walkthrough β†’ Documents the issue and fix

Workflow 3: Code Review & Refactoring

Scenario: Refactor a messy component to follow project standards.

You: "Review and refactor src/components/Dashboard.tsx"

Agent:
β”œβ”€β”€ Loads Skills
β”‚   β”œβ”€β”€ clean-code β†’ Code quality standards
β”‚   β”œβ”€β”€ frontend-design β†’ UI patterns
β”‚   └── performance-profiling β†’ Performance checks
β”‚
β”œβ”€β”€ Analysis
β”‚   β”œβ”€β”€ Reads the file (847 lines, too large)
β”‚   β”œβ”€β”€ Identifies issues:
β”‚   β”‚   β”œβ”€β”€ Mixed concerns (data + UI)
β”‚   β”‚   β”œβ”€β”€ Duplicate logic
β”‚   β”‚   β”œβ”€β”€ Missing error boundaries
β”‚   β”‚   └── N+1 data fetching
β”‚   └── Creates plan with priority order
β”‚
β”œβ”€β”€ Refactor
β”‚   β”œβ”€β”€ Splits into smaller components
β”‚   β”œβ”€β”€ Extracts custom hooks
β”‚   β”œβ”€β”€ Adds error boundaries
β”‚   β”œβ”€β”€ Optimizes data fetching
β”‚   └── Updates all imports
β”‚
└── Verify
    β”œβ”€β”€ Terminal β†’ All tests still pass
    β”œβ”€β”€ Terminal β†’ Bundle size reduced 23%
    └── Walkthrough β†’ Before/after comparison

Workflow 4: Automated Content Pipeline

Scenario: Create series content in multiple languages (like this series!).

/add-series-lesson workflow:

1. Ask for topic and language
2. Check existing lessons for structure consistency
3. Create content with proper frontmatter:
   - category, order, title, description
4. Create translations (en + vi)
5. Verify build succeeds
6. Update navigation if needed

This workflow produced the very series you’re reading.

Workflow 5: Full Deployment Pipeline

/deploy workflow:

1. Run linter β†’ Fix any issues
2. Run tests β†’ Must all pass
3. Run security scan β†’ No critical issues
4. Build production β†’ pnpm build
5. Deploy β†’ ./deploy.sh
6. Browser β†’ Verify production URL
7. Lighthouse audit β†’ Check performance
8. Create deployment walkthrough

Pro Tips for Combining Features

1. Layer Your Context

GEMINI.md (what)
  β†’ Skills (how)
    β†’ Workflows (when)
      β†’ Knowledge (memory)

2. Start Conversations with Context

"I'm working on the checkout module
(check knowledge items). I need to add
coupon codes."

3. Use Workflows for Repetitive Tasks

If you do something more than twice, create a workflow.

4. Let Knowledge Accumulate

After 10+ conversations, the agent knows your project deeply. Don’t fight this β€” lean into it.

5. Combine Agent Modes Deliberately

PLANNING β†’ Get alignment on approach
EXECUTION β†’ Let the agent work autonomously
VERIFICATION β†’ Confirm before deployment

Summary

Antigravity isn’t just an AI assistant. It’s an AI teammate that:

  • Follows YOUR rules (GEMINI.md)
  • Has deep expertise (Skills)
  • Connects to YOUR tools (MCP)
  • Sees YOUR app (Browser)
  • Documents everything (Artifacts)
  • Remembers context (Knowledge)

The more you use it, the better it gets. Start with simple tasks, build up your rules and skills, and watch your productivity compound.

Happy building! πŸš€