baoyu-danger-gemini-web
- Use it when:
- You want Gemini to answer a prompt or make an image, signed in with your Google account rather than an API key.
- It does:
- Sends prompts, prompt files and reference images to Gemini's web app through a bundled reverse-engineered client, using your Google login cookies.
- You get:
- The reply as text or JSON, or an image file, generated.png unless you name one.
- Conversations:
- A session ID keeps a multi-turn chat going, saved as a JSON file in its data folder.
- Asks first:
- You accept a disclaimer about the unofficial API before first use; declining stops it.
- Needs:
- Bun or npx, a Google account, and Chrome, Chromium or Edge to log in on first run.
- Unlike baoyu-image-gen:
- That one, the repo's image backend, calls official image APIs with keys; this one goes through Gemini's web app with your login.
Uses an unofficial, reverse-engineered Gemini web API with your Google login cookies; it may break without notice.
TL;DR
A command-line client for Gemini's web app, built on a TypeScript port of the gemini_webapi library. On first use it shows a disclaimer and records your acceptance in a consent file. The first run opens a browser for you to sign in to Google, and the cookies are cached; --login refreshes them. Without a profile directory set, a refresh may reuse a Chrome or Chromium that's already running with its debugging port open. The default model is gemini-3-pro; gemini-3-flash, gemini-3-flash-thinking and gemini-3.1-pro-preview are the others. Reference images go in as vision input, so it can describe a picture or make a variation of it. Its description offers it as an image backend for other skills. Optional preferences set a default model, a proxy and a data folder, and a proxy can also come from HTTP_PROXY and HTTPS_PROXY.
Summarizes the skill at ca703c2.
npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-danger-gemini-web skills.sh pageSource on GitHubAll skills from jimliu/baoyu-skills
- Total Downloads
- 28,300 on skills.sh, Nov 9, 2026
- Repo stars
- 27,397 jimliu/baoyu-skills
- First seen
- Jan 19, 2026 on skills.sh
Weekly values
| Week to | Installs |
|---|---|
| Sep 21 | 268 |
| Sep 28 | 103 |
| Oct 5 | 87 |
| Oct 12 | 149 |
| Oct 19 | 141 |
| Oct 26 | 138 |
| Nov 2 | 151 |
| Nov 9 | 178 |
| Category |
Generate and edit video, images and audio. |
|---|---|
| Type |
Operates a CLI, API, app or bundled script to get something done. |
| Effect |
Its own steps create or change files, git state or local tools. |
| Needs |
A specific command-line tool or desktop app must be installed, such as gh, agent-browser, LibreOffice, Obsidian or a vendor CLI. An account, API key or paid plan with an outside service. Drives a real Chromium or Chrome browser. |
| Publisher |
Everyone else. Unverified vendor claims default to community. |
| Topics | |
| Stack |
SKILL.md
From jimliu/baoyu-skills at ca703c2. Checked daily, last changed Nov 6, 2026.
Frontmatter
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
- npxGemini Web Client
User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
- Prefer built-in user-input tools exposed by the current agent runtime — e.g.,
AskUserQuestion,request_user_input,clarify,ask_user, or any equivalent. - 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.
- 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
- Check if consent file exists with
accepted: trueanddisclaimerVersion: "1.0" - If valid consent exists → print warning with
acceptedAtdate, proceed - 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
- 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.