Gemini Worker for Openclaw

Run Gemini CLI as a high-performance headless worker for parallelized AI tasks and reliable fallback automation.

cl0ckt0wer
v1.0.0
Apr 6, 2026
0
624
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install gemini-worker

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install gemini-worker using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Gemini Worker?

Gemini Worker is a specialized implementation within the Openclaw Skills ecosystem that leverages the Gemini CLI to execute long-running or parallelizable tasks without blocking your main agent loop. By utilizing the -p and --yolo flags, this skill bypasses interactive TTY requirements, allowing for seamless headless operations and massive context window processing.

This skill is particularly valuable for developers who need to distribute heavy analysis jobs or maintain high levels of productivity during primary API outages. It provides a robust, scriptable bridge between the Gemini ecosystem and automated development workflows, ensuring that your Openclaw Skills setup remains resilient and scalable.

Gemini Worker Use Cases

  • Fallback worker for when the Anthropic API is overloaded or returning 529 errors
  • Spawning parallel analysis jobs to utilize Gemini's 1M context window
  • Executing deep research or code analysis tasks without blocking the primary agent
  • Running validation tasks and automated refactoring via CLI

How Gemini Worker Works

  1. Initialize the environment by installing the Gemini CLI and performing a one-time interactive OAuth authentication.
  2. Format the task prompt, either as a direct string or via a file for larger payloads.
  3. Execute the Gemini command using the -p flag for headless input and --yolo to auto-approve tool calls.
  4. Provide explicit directory permissions using the --include-directories flag to allow the worker to read and write project files.
  5. Capture the resulting output either from the standard output stream or by directing the worker to write directly to specific workspace files.

Gemini Worker Setup

To get started with this Openclaw Skills extension, install the required CLI tool and authenticate:

npm install -g @google/gemini-cli
# Perform interactive login once to cache credentials
gemini

Once authenticated, you can trigger headless runs using the following command pattern:

gemini --include-directories /path/to/project --yolo -p "Your prompt here"

Gemini Worker Data Schema & Taxonomy

Gemini Worker manages data through local workspace permissions and cached authentication tokens. This Openclaw Skills component organizes its data as follows:

Component Description
OAuth Credentials Stored securely at ~/.gemini/oauth_creds.json
Default Workspace Located at ~/.gemini/tmp/workspace for temporary tasks
Extended Access Granted to project folders via the --include-directories flag
Prompt Payloads Large inputs are handled via file-based referencing $(cat prompt.txt)

Gemini Worker Advanced Features

  • Multi-worker parallelization using background processes for concurrent task execution
  • Automated Anthropic fallback logic to maintain development uptime during API instability
  • Wrapper script integration for enhanced timeout handling, error catching, and logging
  • Support for the Gemini 2.5 Pro preview models to access the latest 1M token context window
  • Pre-fetch data patterns using curl to circumvent headless browser limitations

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*