Dev.to
6/30/2026

Agnostic Cluster Refactor Skill for Antigrafity CLI: Building an AI Agent that Migrates Apps from AWS to GKE (Subagents, HITL Gate & Workload Identity)
Short summary
Author documents building an AI agent for the Antigravity CLI that automatically migrates Python applications from AWS to Google Kubernetes Engine, handling code refactoring (boto3→GCS), infrastructure generation, and credential migration through parallel subagents with mandatory human approval gates. The agent operates in isolated Git worktrees to prevent production pollution. Technical deep-dive combining agent orchestration, Kubernetes patterns, and cloud-vendor abstraction for infrastructure teams.
- •AI agent automatically refactors AWS-coupled code (boto3) to cloud-agnostic GCS patterns across entire codebase
- •Subagent architecture with HITL gates and isolated worktrees prevents unvetted mutations from reaching production
- •Practical patterns for migrating workloads from AWS to GKE with semantic understanding rather than simple string replacement
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



