Extend AI Rate Limits for App Building with Claude code, Google Antigravity, and Testsprite Integration

Extend AI Coding Rate Limits When Building Apps: Google Antigravity + Claude Code + Testsprite MCP

Conserving Credits with a Hybrid AI Coding Workflow

If you’re hitting rate limits or burning through credits while using powerful AI coding agents, I’ve been testing a workflow designed to conserve credits and extend usage. The core approach involves a hybrid three-agent system: using Gemini for planning, Claude Code for building, and an automated testing agent for catching bugs. This hybrid system ensures we are not wasting Claude or Gemini tokens.

In this video, I demonstrate my workflow by adding an authentication system (aka sign-in functionality) to an existing RSS reader application I built with Google Antigravity, aiming to turn it into a multi-user app. While I use Antigravity and TestSprite MCP, these strategies apply to optimizing workflows with any AI coding agent.

Integrating Claude Code into Antigravity

Antigravity is not a sandbox environment; it is a full VS Code fork, which means we have the option to install extensions. This is crucial because if you hit usage limits with the built-in agents (like Gemini 3 Pro or Sonnet or Opus 4.5 Thinking), installing another extension like Claude Code allows you to continue coding.

The MCP Advantage

The integration of Claude Code is strategic due to the Model Context Protocol (MCP), which Anthropic (Claude’s creator) developed. MCP functions as a standard protocol, the “USB-C for LLMs”, allowing different models to communicate and access apps, files, and websites. Since Antigravity is still new and has a limited list of built-in MCP servers (like GitHub, Stripe, Notion, Supabase, or PayPal), Claude Code offers greater configuration and a wider range of available MCP servers. We can leverage Claude, which often provides access to powerful models like Opus 4.5, to extend Antigravity’s capabilities.

Setting up the Claude Code Extension

To set up Claude Code within Antigravity:

  • Install the Claude Code CLI from this link here.
  • Open Antigravity and click the extensions option on the side.
  • Search for “Claude” and install the Claude Code for VS Code extension.
  • Click the slash button or any slash command in the new chat window and use /log to sign in to your Claude Code account (a paid service) and authorize the connection to your Anthropic account.
  • To start, use /mcp then manage mcps and click continue in terminal.
  • Run the /init command in the terminal. This instructs Claude to read the entire codebase and write a claude.md document that defines the architecture for the app, giving the agent a foundational understanding of the workspace.

Planning with Gemini 3 Pro

The core efficiency gain comes from dedicating Gemini 3 Pro (which is excellent at context and planning) to the research and planning phase. Note, you can also use Google AI Studio to prototype the plan too. By using up Gemini credits for planning, we save Claude’s credits for the high-token, code execution phase.

Steps for Planning the Authentication System

  • Start a new conversation in the Antigravity agent manager for planning.
  • Phrase the query to encourage state-of-the-art research (e.g., asking it to understand the best options for authentication based on the current date).
  • Gemini autonomously searches the web for authentication systems and prepares an implementation plan.
  • Refine the plan by asking Gemini to focus on systems with MCP compatibility, such as Supabase or Neon.
  • Once the research is complete, instruct Gemini to create a new documentation file (a roadmap) containing the detailed implementation plan.
  • Commit the road map document (e.g., authentication and database road map) to capture a snapshot of the planning phase.

Executing the Code with Claude Code

The plan document generated by Gemini is now passed to Claude Code for execution.

Steps for Implementation

  • In the Claude Code extension, use the plan mode to organize the execution.
  • Prompt Claude to audit the road map document (using the @ symbol to reference the file, e.g., @auth roadmap.md), asking for implementation steps or necessary changes. This prevents Claude from wasting tokens on redundant web searches.
  • Refine the plan if necessary; for instance, simplifying the scope to use a local SQLite database instead of a full production database like Neon for the Minimal Viable Product (MVP).
  • Select auto accept to let Claude execute the tasks in a streamlined manner. Claude will track its own progress and to-dos.
  • Claude will install dependencies (like the SQLite system) and implement the core authentication using the Bether Off system and sign-up forms.

Crucially, debugging attempts using Claude can use up a lot of usage (e.g., one debug attempt used 6% of a session limit and 1% of the weekly limit). This cost reinforces the need for a separate testing mechanism.

Automated Testing and Debugging with Testsprite MCP

To conserve usage limits spent on testing and debugging, we introduce Testsprite as a parallel agent integrated via the MCP server. Testsprite understands the codebase and can develop and run its own tests (like user authentication tests) to validate the AI-written code.

Integrating Testsprite via Claude Code

  • Obtain your API key and installation command from the Testsprite dashboard.
  • In the Claude Code terminal, type /mcp and select manage mcps, then continue in terminal.
  • Paste and execute the installation command. This links Testsprite to Claude Code, giving access to MCP tools such as bootstrap test, generate front-end test plan, and generate code and execute.

Running Authentication Tests

  • Instruct Claude Code to use Testsprite to run the necessary authentication tests.
  • Bootstrap the test: This involves configuring the Testsprite project by setting the path, scope, and inputting valid test account information (email and password).
  • Provide a basic Product Specification Doc (PSD) outlining the product requirements.
  • Claude uses Testsprite tools to generate the code summary and then generate the front end test plan (which generated 17 tests in this example).
  • Select the generate code and execute tool to run the tests, covering variations like sign-up/sign-in with valid/invalid data. Running these initial five tests cost approximately 10 credits.

Debugging Based on Test Results

When tests fail (e.g., 2 pass, 3 fail):

  • Claude Code reads the resulting report.
  • You receive a human-readable report detailing the exact failure, including visualizations generated using Playwright.
  • This detailed report allows you to give very directed debugging instructions to Claude Code, pinpointing the issue (e.g., a connection problem between Better Auth and the SQLite database). This avoids Claude needing to run broad tests itself, saving usage.
  • After implementing the targeted fixes, you can simply use the generate code and execute MCP tool again to rerun the tests without having to regenerate the entire test system.

After implementing the fix, a final rerun confirmed all five tests were passing with a 100% success rate, using only another 10 credits. The final Testsprite AI report provides a full analysis explaining what was done correctly, which is logged for future reference.

The result is a fully optimized workflow that conserves weekly usage limits by ensuring planning with Gemini, coding with Claude Code, and testing with Testsprite, maximizing the build capacity of the powerful agents.

Save AI Credits Infographic - Google Antigravity + Claude Code + Testsprite

Related Posts