roedyrustam/vibes-plug/gemini-agent-booster
- community
Checking that the SKILL.md file is still in the repository.
Master optimization protocol for Gemini Agent, 2M+ context & tools / Protokol optimasi Gemini Agent, context 2M+, dan pemanggilan tool.
Install
npx vskill@latest install roedyrustam/vibes-plug/gemini-agent-boosterSKILL.md
Gemini Agent Booster (2026 Edition — Gemini 4 Pro & 4.x Ecosystem)
<a name="english"></a>
English
Orchestration & Integration
- Frontier Models & Runtimes:
frontier-ai-models-expert,ai-llm-integration-expert,vercel-ai-sdk-expert - Inference & Thinking Budgets:
test-time-compute-optimizer,thinking-budget-orchestrator,adaptive-model-cascade - Context Caching & Long-Context:
kv-cache-prefix-optimizer,context-window-engineer,session-memory-manager - Multimodal & Realtime Audio/Video:
voice-ai-realtime-agent,affective-computing-emotion-ai,multimodal-spatial-video-cloner - Tooling & Swarm Execution:
parallel-tool-orchestrator,mcp-server-architect,browser-automation-expert - Lifecycle & Governance:
zero-to-prod-orchestrator,brainstorming,anti-slop
Description
Master optimization protocol for the Gemini Agent (Antigravity) to leverage native Gemini 4.x frontier capabilities — centered on Gemini 4 Pro (flagship deep reasoning), Gemini 4 Argon (balanced frontier context engine), Gemini 3.8 Flash (ultra-high speed agentic loops), and Project Astra (real-time spatial multimodal streaming). Unlocks 2M+ to 10M+ monolithic context ingestion, dynamic System-2 test-time thinking budget control (thinkingConfig.thinkingBudget), native context caching (cachedContent, 75–90% cost reduction), Multimodal Live API integration, visual UI auditing, and massively parallel tool execution.
Trigger Conditions
- Deploying or querying Google's flagship reasoning models: Gemini 4 Pro and Gemini 4 Argon.
- Analyzing massive codebases, full log histories, or monolithic documents requiring 1M–2M+ token context without chunk loss.
- Managing test-time reasoning compute budgets with Gemini 4 Thinking Mode (
thinkingConfig). - Implementing cost-saving architectures with native Gemini Context Caching (
cachedContent). - Performing real-time bidirectional multimodal audio/video streaming or visual UI audits.
- Running deep research tasks requiring Google Search Grounding with dynamic citation attribution.
- Delegating complex multi-step tasks to parallel agent swarms or browser subagents.
Gemini 4.x & Frontier Model Capability Matrix (2026)
| Capability | Gemini 4 Pro (Flagship) | Gemini 4 Argon (Balanced Frontier) | Gemini 3.8 Flash / Project Astra | Gemini 3.1 Pro (Fallback) | |
|---|---|---|---|---|---|
| Context Window | 2,097,152+ tokens (up to 10M+ Ring Attention) | 2,097,152 tokens (2M+) | 1,048,576+ tokens (1M+) | 2,000,000 tokens | |
| Thinking / Reasoning | System-2 Deep Thinking (Configurable up to 64K Budget) | Balanced Thinking (Configurable up to 16K) | Flash Thinking (Configurable Budget) | Extended Reasoning | |
| Native Context Caching | Native (cachedContent, 75–90% discount) | Native (cachedContent, 75–90% discount) | Native (cachedContent, 75% discount) | Native (cachedContent) | |
| Multimodal | Native Any-to-Any Audio/Video/Text + Screen Grounding | Native Multimodal Context Ingestion | Multimodal Live API (<100ms latency) | Native Multimodal | |
| Code Generation & Tool Calling | SOTA Architectural Synthesis, Zero-Loss AST, Parallel MoE Tools | Balanced Repository Engineering & Schema Extraction | Ultra-fast iteration & subagent swarms | Complex reasoning | |
| Search Grounding | Google Search Grounding with verified attribution | Google Search Grounding | Google Search Grounding | Google Search Grounding | |
| TTFT (Time to First Token) | Ultra-fast via Prefix KV-Cache Pinning | Fast Balanced TTFT (<150ms) | Sub-80ms ultra-low latency | Balanced | |
| Primary Role | Master System Architect & High-Risk Auditor | Whole-Repo Ingestion & Balanced Feature Dev | High-Throughput Subagent Workers | Legacy Baseline |
1. Thinking Budget Optimization for Gemini 4 Pro Tasks
For complex architectural decisions, formal security audits, or debugging distributed race conditions, control the reasoning depth via thinkingConfig:
- Dynamic Thinking Budget Allocation: Allocate test-time compute dynamically based on task entropy:
- Quick Fixes (2k): Linting, boilerplate, typo fixes.
- Standard Dev (8k): Feature implementation, UI token alignment.
- Architecture Design (16k–32k): Designing distributed schemas, refactoring core engines, formal state machines.
- Extreme Critical Tasks (64k): Post-quantum cryptographic migration, formal invariant proofs, zero-day CVE audits.
- Reasoning Token Separation: Ensure internal thinking tokens (
<thought>/ reasoning parts) are isolated from client-facing output streams so that final responses remain crisp, clean, and token-efficient. - TypeScript Example with `@google/genai`:
```typescript import { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({ apiKey: process.env.GOOGLE_API_KEY });
const response = await ai.models.generateContent({ model: 'gemini-4-pro', contents: [{ role: 'user', parts: [{ text: 'Formally verify lock-free queue concurrency invariant' }] }], config: { thinkingConfig: { thinkingBudget: 32768, // Test-time compute scaling up to 64k }, }, }); ```
2. Native Context Caching (cachedContent)
Reduce token costs by up to 75–90% and drastically cut latency on large repositories:
- Threshold: Cache prompts, repository snapshots, or API schemas larger than 32,768 tokens.
- TTL Management: Set appropriate time-to-live (TTL, e.g., 1–2 hours for active dev sessions, 24 hours for stable documentation).
- Structure:
```typescript // Native Gemini 4 Pro Context Caching Example import { GoogleGenAI } from '@google/genai'; const ai = new GoogleGenAI({ apiKey: process.env.GOOGLE_API_KEY });
const cache = await ai.caches.create({ model: 'gemini-4-pro', contents: [{ role: 'user', parts: [{ text: fullCodebaseDump }] }], ttl: '3600s', });
const response = await ai.models.generateContent({ model: 'gemini-4-pro', contents: [{ role: 'user', parts: [{ text: 'Locate memory leak in worker thread' }] }], cachedContent: cache.name, }); ```
3. Monolithic Context Loading (2M+ to 10M+ Tokens)
When inspecting massive codebases with Gemini 4 Pro:
- Pass Full File Trees: Use
list_dirto obtain the complete project structure, then supply full source files into context. - Whole-File Ingestion: With 2M+ context, avoid grep fragmentation; inspect complete classes and dependency trees in one shot.
- Cross-Service Traceability: Analyze upstream microservice contracts, protobufs, and frontend consumers concurrently in the same session.
- Massive Server Logs: Ingest complete production logs (millions of lines) to uncover subtle intermittent race conditions and memory leaks.
4. Multimodal Live API & Screen Grounding (Project Astra Paradigm)
Integrate real-time, low-latency multimodal interaction using Astra-paradigm patterns:
- Bidirectional Streaming: Stream audio input and receive audio/text responses over WebSockets using Gemini Multimodal Live API with sub-150ms interruption handling for natural conversational turn-taking.
- Continuous Video Perception: Process 60fps video streams with spatial grounding.
- Spatial Memory Protocol: Track object locations across video frames, maintaining a spatial state map.
- Screen & UI Grounding: Capture frames and map GUI interactions using exact screen grounding coordinates.
- Visual UI Auditing Protocol:
- Capture current running application (delegate to
browser-automation-expertskill using Playwright/Stagehand). - Audit layout, typography, contrast, and visual hierarchy against HIG and WCAG standards.
- Compare visually with target design using
generate_imageor design system guidelines. - Perform targeted micro-edits to CSS/Tailwind tokens until alignment reaches pixel perfection.
4.5 Gemini 4 Pro as Narrative Simulation & World State Engine
Leveraging Gemini 4 Pro's massive context window for persistent world-state in simulation environments:
- Persistent World-State: Maintain complete environment state within the context window.
- Character AI Persona Management: Utilize system instructions to manage personality vectors and emotional states.
- Multi-turn Narrative Coherence: Use context caching to cache the world state and only stream new character interactions.
- Cost Optimization: Cache world-state/character definitions (75-90% cost reduction), only stream new dialogue/actions.
- Code Example - Cached World-State:
``typescript const worldCache = await ai.caches.create({ model: 'gemini-4-pro', contents: [{ role: 'system', parts: [{ text: fullWorldStateAndPersonas }] }], ttl: '3600s', }); const characterResponse = await ai.models.generateContent({ model: 'gemini-4-pro', contents: [{ role: 'user', parts: [{ text: 'Character X walks into the tavern.' }] }], cachedContent: worldCache.name, }); ``
5. Deep Research & Search Grounding
Gemini 4 Pro's native Search Grounding connects the agent directly to real-time web knowledge:
- Use Grounding for fresh library releases, breaking API deprecations, or zero-day CVE lookups.
- Synthesize findings with verifiable dynamic source citations.
6. Massively Parallel Tool Execution (Agentic MoE)
Gemini 4 Pro natively supports concurrent batched function calls:
- Read and edit multiple independent files in a single turn.
- Trigger parallel web searches or subagent workers simultaneously to minimize round-trip latency.
- Scale with
mcp-server-architectto support batched, high-throughput asynchronous MCP tool calls (10–20 concurrent subagents per inference cycle).
7. Gemini 4 Pro Production Architectural Standards
Ensure all code and orchestration flows adhere to the following standards:
- Monolithic Context Loading (SSM/Ring Attention): Move away from highly fragmented RAG pipelines for repositories that fit within the context window. Inject the complete codebase natively to leverage zero-loss cross-file attention.
- Aggressive Prefix KV-Caching (`kv-cache-prefix-optimizer`): Maintain strict deterministic hierarchies in orchestrator prompts (
brainstorming/SKILL.md). Static prefix structures enable up to 90% TTFT latency reduction via KV cache reuse. - Native Any-to-Any Multimodal Tokens: Utilize
voice-ai-realtime-agentandai-media-generation-expertto bypass external STT/TTS wrappers and transmit raw audio/visual tokens directly through transformer attention layers. - Native System-2 Budgeting: Replace forced
<thought>tags with API-levelthinkingBudgetandreasoning_effortparameters to maximize test-time compute. - Massive Parallel Tool Execution (Agentic MoE): Structure subagent pipelines so that
mcp-server-architecttools can be executed concurrently without serial blocking.
8. Graceful Availability Fallback Protocol (Gemini 4 -> Gemini 3.8 Flash)
When Gemini 4 Pro or Gemini 4 Argon is not yet available, regionally unprovisioned, or encounters quota/concurrency limits:
- Instant Fallback: Route all agentic tasks automatically to `Gemini 3.8 Flash` (or
gemini-3.8-flash-thinking). - Preserved Invariants: Retain 1M+ token context window, native context caching via
cachedContent, and sub-80ms TTFT. - Implementation Blueprint:
```typescript import { GoogleGenAI } from '@google/genai';
export async function executeGeminiWithFallback(prompt: string, codebaseDump?: string) { const ai = new GoogleGenAI({ apiKey: process.env.GOOGLE_API_KEY }); const primaryModel = 'gemini-4-argon'; const fallbackModel = 'gemini-3.8-flash';
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/gemini-agent-booster/SKILL.md
Popularity
- Repository stars
- 51
- Repository forks
- 10
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/roedyrustam/vibes-plug/gemini-agent-booster)