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

Baoyu Danger Gemini Web

  • 16 installs
  • 12 repo stars
  • Updated March 4, 2026
  • ideacco/baoyu-skills-openclaw

baoyu-danger-gemini-web is an agent skill that integrates unofficial Gemini web session APIs into TypeScript agent workflows.

About

baoyu-danger-gemini-web is an agent skill packaged as a TypeScript integration layer around Gemini’s web-facing RPC patterns—cookie rotation, access tokens, candidate parsing, and image-generation helpers. Solo builders who already automate Claude Code or Codex tasks but need Gemini images or web-model access without standing up a full Google Cloud project install it during the build phase when wiring LLM backends. The readme emphasizes exception taxonomy, timeout fetch wrappers, and gem-oriented types so agents fail predictably instead of returning opaque HTML errors. Treat it as high-risk integration: unofficial web endpoints can break, rate-limit, or violate terms of service, so you should pair usage with your own guardrails and never commit live session cookies to git. It does not replace official Gemini API SDK setup for production SaaS; it is for builders experimenting with web-session automation inside personal or internal tooling.

  • TypeScript client with Gemini web cookie path resolution and access-token helpers
  • Structured error types for auth, usage limits, timeouts, and image-generation failures
  • Gem mixin and candidate/model output types for agent-oriented consumption
  • File upload and JSON extraction utilities for multimodal web flows
  • Optional auto-refresh and timeout controls for long-running sessions

Baoyu Danger Gemini Web by the numbers

  • 16 all-time installs (skills.sh)
  • Ranked #11,068 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/ideacco/baoyu-skills-openclaw --skill baoyu-danger-gemini-web

Add your badge

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

Listed on Skillselion
Installs16
repo stars12
Security audit0 / 3 scanners passed
Last updatedMarch 4, 2026
Repositoryideacco/baoyu-skills-openclaw

What it does

Wire unofficial Gemini web session auth, chat, and image generation into Node/TypeScript agent workflows when you cannot use the official API alone.

Who is it for?

Best when you're prototyping multimodal agents or image pipelines that already accept unofficial web-session maintenance overhead.

Skip if: Production SaaS that must comply with Google API terms, enterprise auth, or teams that refuse to manage rotating browser cookies.

When should I use this skill?

When you need Gemini web chat, candidates, or generated images from a TypeScript agent and are implementing cookie/token based access.

What you get

Your agent can call a typed Gemini web client with explicit errors, uploads, and model output parsing instead of brittle one-off scripts.

  • Reusable Gemini web client module
  • Typed error handling for agent retries
  • Hooks for file upload and image candidate parsing

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.

OpenClaw Migration Notes

  • Migration mode: OpenClaw native first
  • Preserved directories:
  • scripts: yes
  • references: no
  • prompts: no
  • External dependencies: bun, chrome, external-ai-api
  • Risk level: high
  • Environment variables (detected): API, GEMINI_WEB_CHROME_PATH, GEMINI_WEB_CHROME_PROFILE_DIR, HOME
  • Config compatibility: keep original .baoyu-skills/<skill>/EXTEND.md behavior and add OpenClaw-compatible path in runtime wrappers when needed.

OpenClaw Preflight Checks

  • Confirm bun is available when script examples use npx -y bun ....
  • Confirm Chrome is installed and launchable for CDP/browser automation flows.
  • Confirm required API credentials are exported before execution.

Detected env vars: API, GEMINI_WEB_CHROME_PATH, GEMINI_WEB_CHROME_PROFILE_DIR, HOME

OpenClaw Failure Fallback

  • If runtime dependency is missing, stop execution and return exact install/setup command.
  • If API call fails, suggest retry with explicit provider/model flags and validate key scope.
  • If browser automation fails, switch to manual/wait mode where available.
  • For high-risk workflows, require explicit user confirmation before irreversible actions.

Related skills

How it compares

Use instead of raw fetch scripts against Gemini web RPC when you want typed errors and reusable agent-side utilities—not instead of the official @google/generative-ai SDK.

FAQ

Who is baoyu-danger-gemini-web for?

Developers building AI agents or automation in TypeScript who need Gemini web capabilities and are comfortable maintaining session cookies and unofficial endpoints.

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

Use it during Build while hooking LLM or image backends into your repo—especially when prototyping integrations before you commit to official Google Cloud API keys.

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

Review the Security Audits panel on this Prism page and treat web-session skills as high trust: they may touch secrets, network, and non-documented endpoints—audit the repo before enabling in CI or shared environments.

AI & Agent Buildingllmautomation

This week in AI coding

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

unsubscribe anytime.