Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
xy121718 avatar

Baoyu Danger Gemini Web

  • 169 installs
  • 100 repo stars
  • Updated March 2, 2026
  • xy121718/baoyu-skills

Baoyu-danger-gemini-web is an agent skill that connects workflows to Google Gemini through an unofficial web client for chat, gems, and image generation.

About

Baoyu-danger-gemini-web is an advanced integration skill packaging an unofficial browser-session Gemini web client for agents that need multimodal output without provisioning official API credentials. The embedded implementation covers access-token and cookie lifecycle, file upload helpers, candidate parsing, gem plugins, and defensive error handling for rate limits, temporary blocks, and model invalidation. Solo builders typically reach for it when prototyping generative features, automating content drafts, or experimenting with image generation inside Claude Code–driven pipelines. Because it depends on fragile web auth semantics, it demands careful secret handling and is a poor fit for production compliance-heavy deployments; treat it as a build-time bridge until you migrate to supported APIs.

  • TypeScript Gemini web client with GemMixin for custom gems and RPC-style calls
  • Handles auth rotation (1PSIDTS), cookies, uploads, and structured error types (auth, usage limits, timeouts)
  • Supports generated and web-sourced images with explicit ImageGenerationError paths
  • Configurable timeouts, auto-refresh, and verbose logging for long agent sessions
  • Marked “danger” tier—unofficial web surface, not the stable Google AI API

Baoyu Danger Gemini Web by the numbers

  • 169 all-time installs (skills.sh)
  • Ranked #3,085 of 16,556 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 1, 2026 (Skillselion catalog sync)
npx skills add https://github.com/xy121718/baoyu-skills --skill baoyu-danger-gemini-web

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs169
repo stars100
Security audit1 / 3 scanners passed
Last updatedMarch 2, 2026
Repositoryxy121718/baoyu-skills

What it does

Wire agent workflows to Google Gemini via the unofficial web client for chat, gems, and image generation when API keys are not an option.

Who is it for?

Best when you're prototyping AI features, content automation, or image experiments inside agent tooling during active development.

Skip if: Production apps requiring SLA-backed APIs, strict data residency, or teams unwilling to manage cookie-based session risk.

When should I use this skill?

When building agent workflows that must call Gemini via web session auth for chat, gems, or images during integration work.

What you get

Your agent can call Gemini web endpoints with rotated session auth and typed errors so you can prototype generative features before moving to a supported API.

  • Gemini web API calls from agent workflows
  • Parsed model outputs and generated images where supported

By the numbers

  • Typed error surface including AuthError, UsageLimitExceeded, ImageGenerationError, and TemporarilyBlocked

Files

SKILL.mdMarkdownGitHub ↗

Gemini Web Client

Text/image generation via Gemini Web API. Supports reference images and multi-turn conversations.

Script Directory

Important: All scripts are located in the scripts/ subdirectory of this skill.

Agent Execution Instructions: 1. Determine this SKILL.md file's directory path as SKILL_DIR 2. Script path = ${SKILL_DIR}/scripts/<script-name>.ts 3. Replace all ${SKILL_DIR} in this document with the actual path

Script Reference:

ScriptPurpose
scripts/main.tsCLI 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 locations:

  • 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

Flow: 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)

Use Bash to check EXTEND.md existence (priority order):

# Check project-level first
test -f .baoyu-skills/baoyu-danger-gemini-web/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md" && echo "user"

┌──────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-danger-gemini-web/EXTEND.md │ Project directory │ ├──────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md │ User home │ └──────────────────────────────────────────────────────────┴───────────────────┘

┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘

EXTEND.md Supports: Default model | Proxy settings | Custom data directory

Usage

# Text generation
npx -y bun ${SKILL_DIR}/scripts/main.ts "Your prompt"
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Your prompt" --model gemini-3-flash

# Image generation
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cute cat" --image cat.png
npx -y bun ${SKILL_DIR}/scripts/main.ts --promptfiles system.md content.md --image out.png

# Vision input (reference images)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Describe this" --reference image.png
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Create variation" --reference a.png --image out.png

# Multi-turn conversation
npx -y bun ${SKILL_DIR}/scripts/main.ts "Remember: 42" --sessionId session-abc
npx -y bun ${SKILL_DIR}/scripts/main.ts "What number?" --sessionId session-abc

# JSON output
npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello" --json

Options

OptionDescription
--prompt, -pPrompt text
--promptfilesRead prompt from files (concatenated)
--model, -mModel: gemini-3-pro (default), gemini-3-flash, gemini-3-flash-thinking, gemini-3.1-pro-preview
--image [path]Generate image (default: generated.png)
--reference, --refReference images for vision input
--sessionIdSession ID for multi-turn conversation
--list-sessionsList saved sessions
--jsonOutput as JSON
--loginRefresh cookies, then exit
--cookie-pathCustom cookie file path
--profile-dirChrome profile directory

Models

ModelDescription
gemini-3-proDefault, latest 3.0 Pro
gemini-3-flashFast, lightweight 3.0 Flash
gemini-3-flash-thinking3.0 Flash with thinking
gemini-3.1-pro-preview3.1 Pro preview (empty header, auto-routed)

Authentication

First run opens browser for Google auth. Cookies cached automatically.

Supported browsers (auto-detected): Chrome, Chrome Canary/Beta, Chromium, Edge.

Force refresh: --login flag. Override browser: GEMINI_WEB_CHROME_PATH env var.

Environment Variables

VariableDescription
GEMINI_WEB_DATA_DIRData directory
GEMINI_WEB_COOKIE_PATHCookie file path
GEMINI_WEB_CHROME_PROFILE_DIRChrome profile directory
GEMINI_WEB_CHROME_PATHChrome executable path
HTTP_PROXY, HTTPS_PROXYProxy for Google access (set inline with command)

Sessions

Session files stored in data directory under sessions/<id>.json.

Contains: id, metadata (Gemini chat state), messages array, timestamps.

Extension Support

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

Related skills

How it compares

Integration skill for unofficial Gemini web access—not a first-party Google AI SDK or MCP server.

FAQ

Who is baoyu-danger-gemini-web for?

Developers building agent or content workflows who want Gemini (including gems and images) via web-session automation rather than official API keys.

When should I use baoyu-danger-gemini-web?

During Build/integrations while wiring generative steps into your product or agent—e.g. drafting marketing assets, testing image pipelines, or orchestrating gem-powered tasks before launch.

Is baoyu-danger-gemini-web safe to install?

Treat it as high-risk unofficial access: review the Security Audits panel on this page, never commit live cookies to git, and prefer official APIs for production.

AI & Agent Buildingllmautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.