Skip to content
Development
Skill

/baoyu-danger-gemini-web

Generates images and text via reverse-engineered Gemini Web API. Supports text generation, image generation from prompts, reference images for vision input, and multi-turn conversations. Use when other skills need image generation backend, or when user requests "generate image

From plugin
open-agent-hub
1k105 skills5 agents3 commands6 MCP

Claude Code

$ npx -y skills add guanyang/open-agent-hub --skill baoyu-danger-gemini-web --agent claude-code

SKILL.md

baoyu-danger-gemini-web.SKILL.md
name: baoyu-danger-gemini-web
description: Generates images and text via reverse-engineered Gemini Web API. Supports text generation, image generation from prompts, reference images for vision input, and multi-turn conversations. Use when other skills need image generation backend, or when user requests "generate image with Gemini", "Gemini text generation", or needs vision-capable AI generation.
version: 1.56.2
metadata:
  openclaw:
    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-danger-gemini-web
    requires:
      anyBins:
        - bun
        - npx

Gemini Web Client

User Input Tools

When this skill prompts the user, follow this tool-selection rule (priority order):

1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent. 2. **Fallback**: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question. 3. **Batching**: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.

Concrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.

Script Directory

`{baseDir}` = this SKILL.md's directory; scripts are at `{baseDir}/scripts/<script-name>.ts`. Resolve `${BUN_X}`: `bun` if installed; else `npx -y bun`; else suggest installing bun. Replace `{baseDir}` and `${BUN_X}` with actual values.

| Script | Purpose | |--------|---------| | `scripts/main.ts` | CLI entry point for text/image generation | | `scripts/gemini-webapi/*` | TypeScript port of `gemini_webapi` (GeminiClient, types, utils) |

Consent Check (REQUIRED)

Before first use, verify user consent for reverse-engineered API usage. Consent file:

  • macOS: `~/Library/Application Support/baoyu-skills/gemini-web/consent.json`
  • Linux: `~/.local/share/baoyu-skills/gemini-web/consent.json`
  • Windows: `%APPDATA%\baoyu-skills\gemini-web\consent.json`

1. Check if consent file exists with `accepted: true` and `disclaimerVersion: "1.0"` 2. If valid consent exists → print warning with `acceptedAt` date, proceed 3. If no consent → show disclaimer, ask user via `AskUserQuestion`:

  • "Yes, I accept" → create consent file with ISO timestamp, proceed
  • "No, I decline" → output decline message, stop

4. Consent file format: `{"version":1,"accepted":true,"acceptedAt":"<ISO>","disclaimerVersion":"1.0"}`

Preferences (EXTEND.md)

First found wins:

| Priority | Path | Scope | |----------|------|-------| | 1 | `.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md` | Project | | 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-danger-gemini-web/EXTEND.md` | XDG | | 3 | `$HOME/.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md` | User home |

If none found, use defaults. **EXTEND.md supports**: default model, proxy settings, custom data directory.

Usage

${BUN_X} {baseDir}/scripts/main.ts "Your prompt"                                     # text
${BUN_X} {baseDir}/scripts/main.ts --prompt "Your prompt" --model gemini-3-flash
${BUN_X} {baseDir}/scripts/main.ts --prompt "A cute cat" --image cat.png             # image
${BUN_X} {baseDir}/scripts/main.ts --promptfiles system.md content.md --image out.png
${BUN_X} {baseDir}/scripts/main.ts --prompt "Describe this" --reference image.png    # vision input
${BUN_X} {baseDir}/scripts/main.ts --prompt "Create variation" --reference a.png --image out.png
${BUN_X} {baseDir}/scripts/main.ts "Remember: 42" --sessionId session-abc           # multi-turn
${BUN_X} {baseDir}/scripts/main.ts "What number?" --sessionId session-abc
${BUN_X} {baseDir}/scripts/main.ts "Hello" --json

Options

| Option | Description | |--------|-------------| | `--prompt`, `-p` | Prompt text | | `--promptfiles` | Read prompt from files (concatenated) | | `--model`, `-m` | Model (see Models; default `gemini-3-pro`) | | `--image [path]` | Generate image (default: generated.png) | | `--reference`, `--ref` | Reference images for vision input | | `--sessionId` | Session ID for multi-turn conversation | | `--list-sessions` | List saved sessions | | `--json` | Output as JSON | | `--login` | Refresh cookies, then exit | | `--cookie-path` | Custom cookie file path | | `--profile-dir` | Chrome profile directory |

Models

| Model | Description | |-------|-------------| | `gemini-3-pro` | Default, latest 3.0 Pro | | `gemini-3-flash` | Fast, lightweight 3.0 Flash | | `gemini-3-flash-thinking` | 3.0 Flash with thinking | | `gemini-3.1-pro-preview` | 3.1 Pro preview (empty header, auto-routed) |

Authentication

First run opens a browser for Google auth; cookies are cached. Force refresh: `--login`. Override browser: `GEMINI_WEB_CHROME_PATH`. Auto-detected browsers: Chrome, Chrome Canary/Beta, Chromium, Edge.

Without an explicit profile dir, cookie refresh may reuse an already-running local Chrome/Chromium debugging session tied to a standard user-data dir (best-effort CDP reuse, not Chrome DevTools MCP's `--autoConnect` flow). Set `--profile-dir` or `GEMINI_WEB_CHROME_PROFILE_DIR` to force a dedicated profile and skip that reuse.

Environment Variables

| Variable | Description | |----------|-------------| | `GEMINI_WEB_DATA_DIR` | Data directory | | `GEMINI_WEB_COOKIE_PATH` | Cookie file path | | `GEMINI_WEB_CHROME_PROFILE_DIR` | Chrome profile directory | | `GEMINI_WEB_CHROME_PATH` | Chrome executable path | | `HTTP_PROXY`, `HTTPS_PROXY` | Proxy for Google access (bash: set inline with command; PowerShell: `$env:HTTPS_PROXY = '...'` before running) |

Sessions

Stored in the data directory as `sessions/<id>.json`, containing `id`, `metadata` (Gemini chat state), `messages` array, timestamps.

Extension Support

Custom configurations via EXTEND.md. See **Preferences** section for paths and supported options.

Read more
@guanyang
Ships withopen-agent-hub

A lightweight, zero-dependency CLI tool to manage and activate capabilities for AI coding assistants (such as Claude Code, Cursor, Trae, etc.).

1k105 skills5 agents6 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.0k
Star history of guanyang/open-agent-hub on GitHub, a chart by star-history.com

Other skills on open-agent-hub.

academy-guide

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends…

algorithmic-art

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request…

baoyu-comic

baoyu-comic

Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about baoyu-danger-gemini-web.

Which coding agents can use baoyu-danger-gemini-web?
baoyu-danger-gemini-web installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.