baoyu-danger-gemini-web

Generates text and images through the reverse-engineered Gemini Web API with session support.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/chhpt/skills --skill baoyu-danger-gemini-web-chhpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-danger-gemini-web
Source: https://github.com/chhpt/skills/tree/main/skills/baoyu-danger-gemini-web
Command: npx skills add https://github.com/chhpt/skills --skill baoyu-danger-gemini-web-chhpt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Accessing Gemini's text and image generation without an official API key requires browser-based automation; this Skill provides a CLI client that reuses your Google login session to generate text and images programmatically. ## Core Features & Use Cases - Text and Image Generation: Send prompts to Gemini models (gemini-3-pro, gemini-2.5-pro, gemini-2.5-flash) and save generated images to disk. - Vision Input and Multi-Turn Chat: Attach reference images for vision tasks and persist conversations across calls with session IDs. - Browser-Based Authentication: Automatically loads Google cookies from Chrome via CDP, caches them, and refreshes them with a --login flag. - Use Case: Ask the agent to generate an illustration from a prompt and save it as cat.png, then continue a follow-up conversation using the same session ID. ## Quick Start Ask the agent to generate an image of a cute cat saved as cat.png using the Gemini web skill.

Frequently Asked Questions about baoyu-danger-gemini-web

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image with Gemini from the command line?

Run the main.ts script with Bun, passing --prompt with your description and --image with the output path. The script calls the Gemini Web API and saves the first generated image to the specified file, defaulting to generated.png.

How does Gemini web authentication work without an API key?

The client loads Google cookies (__Secure-1PSID and __Secure-1PSIDTS) from Chrome via the Chrome DevTools Protocol, then exchanges them for an access token. Cookies are cached locally and refreshed automatically or with the --login flag.

Can I use reference images for Gemini vision input?

Yes, pass one or more image files with the --reference or --ref flag. The files are uploaded to Google's upload endpoint and attached to the prompt, enabling tasks like image description or generating variations.

Which Gemini models are supported by this client?

Three models are supported: gemini-3-pro (default), gemini-2.5-pro, and gemini-2.5-flash. Select one with the --model flag; unknown model names cause the client to throw an error.

Why does Gemini image generation fail with usage limit errors?

Google enforces per-model usage limits on web sessions, returning error code 1037 when exceeded. Switch to another model such as gemini-2.5-flash, or wait; repeated blocks may indicate temporary IP restrictions requiring a proxy.

Does multi-turn conversation persist between CLI runs?

Yes, pass the same --sessionId across invocations. Session metadata and message history are stored as JSON files in the data directory, and --list-sessions shows saved sessions sorted by update time.