baoyu-danger-gemini-web by xy121718/baoyu-skills
npx skills add https://github.com/xy121718/baoyu-skills --skill baoyu-danger-gemini-web通过 Gemini Web API 进行文本/图像生成。支持参考图像和多轮对话。
重要提示:所有脚本均位于此技能的 scripts/ 子目录中。
代理执行说明:
SKILL_DIR${SKILL_DIR}/scripts/<脚本名称>.ts${SKILL_DIR} 替换为实际路径脚本参考:
| 脚本 | 用途 |
|---|---|
scripts/main.ts | 用于文本/图像生成的 CLI 入口点 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
scripts/gemini-webapi/* |
gemini_webapi 的 TypeScript 移植版本(GeminiClient、类型、工具) |
首次使用前,请验证用户是否同意使用逆向工程 API。
同意文件位置:
~/Library/Application Support/baoyu-skills/gemini-web/consent.json~/.local/share/baoyu-skills/gemini-web/consent.json%APPDATA%\baoyu-skills\gemini-web\consent.json流程:
accepted: true 和 disclaimerVersion: "1.0"acceptedAt 日期的警告,继续执行AskUserQuestion 询问用户:
{"version":1,"accepted":true,"acceptedAt":"<ISO>","disclaimerVersion":"1.0"}使用 Bash 检查 EXTEND.md 是否存在(优先级顺序):
# 首先检查项目级别
test -f .baoyu-skills/baoyu-danger-gemini-web/EXTEND.md && echo "project"
# 然后检查用户级别(跨平台:$HOME 在 macOS/Linux/WSL 上均适用)
test -f "$HOME/.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md" && echo "user"
┌──────────────────────────────────────────────────────────┬───────────────────┐ │ 路径 │ 位置 │ ├──────────────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-danger-gemini-web/EXTEND.md │ 项目目录 │ ├──────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md │ 用户主目录 │ └──────────────────────────────────────────────────────────┴───────────────────┘
┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ 结果 │ 操作 │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ 找到 │ 读取、解析、应用设置 │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ 未找到 │ 使用默认值 │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
EXTEND.md 支持:默认模型 | 代理设置 | 自定义数据目录
# 文本生成
npx -y bun ${SKILL_DIR}/scripts/main.ts "您的提示词"
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "您的提示词" --model gemini-3-flash
# 图像生成
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "一只可爱的猫" --image cat.png
npx -y bun ${SKILL_DIR}/scripts/main.ts --promptfiles system.md content.md --image out.png
# 视觉输入(参考图像)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "描述这个" --reference image.png
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "创建变体" --reference a.png --image out.png
# 多轮对话
npx -y bun ${SKILL_DIR}/scripts/main.ts "记住:42" --sessionId session-abc
npx -y bun ${SKILL_DIR}/scripts/main.ts "什么数字?" --sessionId session-abc
# JSON 输出
npx -y bun ${SKILL_DIR}/scripts/main.ts "你好" --json
| 选项 | 描述 |
|---|---|
--prompt, -p | 提示文本 |
--promptfiles | 从文件读取提示(拼接) |
--model, -m | 模型:gemini-3-pro(默认)、gemini-3-flash、gemini-3-flash-thinking、gemini-3.1-pro-preview |
--image [路径] | 生成图像(默认:generated.png) |
--reference, --ref | 用于视觉输入的参考图像 |
--sessionId | 用于多轮对话的会话 ID |
--list-sessions | 列出已保存的会话 |
--json | 输出为 JSON 格式 |
--login | 刷新 cookie,然后退出 |
--cookie-path | 自定义 cookie 文件路径 |
--profile-dir | Chrome 配置文件目录 |
| 模型 | 描述 |
|---|---|
gemini-3-pro | 默认,最新的 3.0 Pro |
gemini-3-flash | 快速、轻量级的 3.0 Flash |
gemini-3-flash-thinking | 带有思考过程的 3.0 Flash |
gemini-3.1-pro-preview | 3.1 Pro 预览版(空标头,自动路由) |
首次运行会打开浏览器进行 Google 认证。Cookie 会自动缓存。
支持的浏览器(自动检测):Chrome、Chrome Canary/Beta、Chromium、Edge。
强制刷新:使用 --login 标志。覆盖浏览器:使用 GEMINI_WEB_CHROME_PATH 环境变量。
| 变量 | 描述 |
|---|---|
GEMINI_WEB_DATA_DIR | 数据目录 |
GEMINI_WEB_COOKIE_PATH | Cookie 文件路径 |
GEMINI_WEB_CHROME_PROFILE_DIR | Chrome 配置文件目录 |
GEMINI_WEB_CHROME_PATH | Chrome 可执行文件路径 |
HTTP_PROXY, HTTPS_PROXY | 用于访问 Google 的代理(随命令内联设置) |
会话文件存储在数据目录下的 sessions/<id>.json 中。
包含:id、metadata(Gemini 聊天状态)、messages 数组、时间戳。
通过 EXTEND.md 进行自定义配置。有关路径和支持的选项,请参阅偏好设置部分。
每周安装数
84
代码仓库
GitHub 星标数
61
首次出现
2026年3月2日
安全审计
安装于
cursor84
gemini-cli84
github-copilot84
codex84
amp84
cline84
Text/image generation via Gemini Web API. Supports reference images and multi-turn conversations.
Important : All scripts are located in the scripts/ subdirectory of this skill.
Agent Execution Instructions :
SKILL_DIR${SKILL_DIR}/scripts/<script-name>.ts${SKILL_DIR} in this document with the actual pathScript Reference :
| Script | Purpose |
|---|---|
scripts/main.ts | CLI entry point for text/image generation |
scripts/gemini-webapi/* | TypeScript port of gemini_webapi (GeminiClient, types, utils) |
Before first use, verify user consent for reverse-engineered API usage.
Consent file locations :
~/Library/Application Support/baoyu-skills/gemini-web/consent.json~/.local/share/baoyu-skills/gemini-web/consent.json%APPDATA%\baoyu-skills\gemini-web\consent.jsonFlow :
accepted: true and disclaimerVersion: "1.0"acceptedAt date, proceedAskUserQuestion:
{"version":1,"accepted":true,"acceptedAt":"<ISO>","disclaimerVersion":"1.0"}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
# 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
| Option | Description |
|---|---|
--prompt, -p | Prompt text |
--promptfiles | Read prompt from files (concatenated) |
--model, -m | Model: gemini-3-pro (default), gemini-3-flash, gemini-3-flash-thinking, gemini-3.1-pro-preview |
--image [path] | Generate image (default: generated.png) |
--reference, |
| 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) |
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.
| 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 (set inline with command) |
Session files stored in data directory under sessions/<id>.json.
Contains: id, metadata (Gemini chat state), messages array, timestamps.
Custom configurations via EXTEND.md. See Preferences section for paths and supported options.
Weekly Installs
84
Repository
GitHub Stars
61
First Seen
Mar 2, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
cursor84
gemini-cli84
github-copilot84
codex84
amp84
cline84
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
49,800 周安装
AntV 图表可视化技能 - 智能图表选择与数据可视化生成工具
1,100 周安装
Scrapling官方网络爬虫框架 - 自适应解析、绕过Cloudflare、Python爬虫库
1,100 周安装
Theme Factory - 专业字体色彩主题库,一键应用设计风格到演示文稿和作品
1,100 周安装
Base44 CLI 工具 - 创建和管理 Base44 应用项目 | 命令行开发工具
1,100 周安装
assistant-ui:React AI 聊天界面库,可组合原语,支持多运行时
1,100 周安装
Playwright网页抓取技能:自动化抓取动态网站、处理登录分页和截图
1,100 周安装
--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 |