baoyu-danger-gemini-web
Google Gemini Webを活用し、テキスト指示に基づいて画像を生成したり、文章を作成したりできるため、カバー画像や記事のイラストなど、他のSkillの画像生成基盤としても活用できるSkill。
📜 元の英語説明(参考)
Image generation skill using Gemini Web. Generates images from text prompts via Google Gemini. Also supports text generation. Use as the image generation backend for other skills like cover-image, xhs-images, article-illustrator.
🇯🇵 日本人クリエイター向け解説
Google Gemini Webを活用し、テキスト指示に基づいて画像を生成したり、文章を作成したりできるため、カバー画像や記事のイラストなど、他のSkillの画像生成基盤としても活用できるSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o baoyu-danger-gemini-web.zip https://jpskill.com/download/19384.zip && unzip -o baoyu-danger-gemini-web.zip && rm baoyu-danger-gemini-web.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19384.zip -OutFile "$d\baoyu-danger-gemini-web.zip"; Expand-Archive "$d\baoyu-danger-gemini-web.zip" -DestinationPath $d -Force; ri "$d\baoyu-danger-gemini-web.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
baoyu-danger-gemini-web.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
baoyu-danger-gemini-webフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 25
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Gemini Web Client
対応機能:
- テキスト生成
- 画像生成 (ダウンロード + 保存)
- Vision入力用の参照画像 (ローカル画像を添付)
- 永続化された
--sessionIdによる複数ターンの会話
スクリプトディレクトリ
重要: すべてのスクリプトは、このスキル内の scripts/ サブディレクトリにあります。
エージェント実行手順:
- この SKILL.md ファイルのディレクトリパスを
SKILL_DIRとして特定します。 - スクリプトパス =
${SKILL_DIR}/scripts/<script-name>.ts - このドキュメント内のすべての
${SKILL_DIR}を実際のパスに置き換えます。
スクリプトリファレンス:
| スクリプト | 目的 |
|--------|---------|
| scripts/main.ts | テキスト/画像生成のためのCLIエントリーポイント |
| scripts/gemini-webapi/* | gemini_webapi (GeminiClient、型、ユーティリティ) のTypeScriptポート |
⚠️ 免責事項 (必須)
このスキルを使用する前に、同意確認を必ず実行してください。
同意確認フロー
ステップ 1: 同意ファイルを確認します。
# macOS
cat ~/Library/Application\ Support/baoyu-skills/gemini-web/consent.json 2>/dev/null
# Linux
cat ~/.local/share/baoyu-skills/gemini-web/consent.json 2>/dev/null
# Windows (PowerShell)
Get-Content "$env:APPDATA\baoyu-skills\gemini-web\consent.json" 2>$null
ステップ 2: 同意が存在し、accepted: true かつ disclaimerVersion: "1.0" が一致する場合:
警告を表示して続行します:
⚠️ Warning: Using reverse-engineered Gemini Web API (not official). Accepted on: <acceptedAt date>
ステップ 3: 同意ファイルが存在しないか、disclaimerVersion が一致しない場合:
免責事項を表示し、ユーザーに尋ねます:
⚠️ DISCLAIMER
このツールは、公式のGoogle APIではなく、リバースエンジニアリングされたGemini Web APIを使用しています。
リスク:
- GoogleがAPIを変更した場合、予告なく動作しなくなる可能性があります。
- 公式のサポートや保証はありません。
- ご自身の責任においてご使用ください。
これらの条件に同意し、続行しますか?
AskUserQuestion ツールを以下のオプションで使用します:
- Yes, I accept - 続行し、同意を保存します。
- No, I decline - 直ちに終了します。
ステップ 4: 同意した場合、同意ファイルを作成します:
# macOS
mkdir -p ~/Library/Application\ Support/baoyu-skills/gemini-web
cat > ~/Library/Application\ Support/baoyu-skills/gemini-web/consent.json << 'EOF'
{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}
EOF
# Linux
mkdir -p ~/.local/share/baoyu-skills/gemini-web
cat > ~/.local/share/baoyu-skills/gemini-web/consent.json << 'EOF'
{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}
EOF
ステップ 5: 拒否した場合、メッセージを出力して停止します:
User declined the disclaimer. Exiting.
クイックスタート
npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello, Gemini"
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Explain quantum computing"
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
# Multi-turn conversation (agent generates unique sessionId)
npx -y bun ${SKILL_DIR}/scripts/main.ts "Remember this: 42" --sessionId my-unique-id-123
npx -y bun ${SKILL_DIR}/scripts/main.ts "What number?" --sessionId my-unique-id-123
コマンド
テキスト生成
# Simple prompt (positional)
npx -y bun ${SKILL_DIR}/scripts/main.ts "Your prompt here"
# Explicit prompt flag
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Your prompt here"
npx -y bun ${SKILL_DIR}/scripts/main.ts -p "Your prompt here"
# With model selection
npx -y bun ${SKILL_DIR}/scripts/main.ts -p "Hello" -m gemini-2.5-pro
# Pipe from stdin
echo "Summarize this" | npx -y bun ${SKILL_DIR}/scripts/main.ts
画像生成
# Generate image with default path (./generated.png)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A sunset over mountains" --image
# Generate image with custom path
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cute robot" --image robot.png
# Shorthand
npx -y bun ${SKILL_DIR}/scripts/main.ts "A dragon" --image=dragon.png
Vision入力 (参照画像)
# Text + image -> text
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Describe this image" --reference a.png
# Text + image -> image
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Generate a variation" --reference a.png --image out.png
出力形式
# Plain text (default)
npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello"
# JSON output
npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello" --json
オプション
| オプション | 説明 |
|---|---|
--prompt <text>, -p |
プロンプトテキスト |
--promptfiles <files...> |
ファイルからプロンプトを読み込みます (順に連結されます) |
--model <id>, -m |
モデル: gemini-3-pro (デフォルト), gemini-2.5-pro, gemini-2.5-flash |
--image [path] |
画像を生成し、パスに保存します (デフォルト: generated.png) |
--reference <files...>, --ref <files...> |
Vision入力用の参照画像 |
--sessionId <id> |
複数ターンの会話のためのセッションID (エージェントがユニークなIDを生成します) |
--list-sessions |
保存されたセッションを一覧表示します (最大100件、更新時間でソート) |
--json |
JSON形式で出力します |
--login |
クッキーのみを更新し、終了します |
--cookie-path <path> |
カスタムクッキーファイルパス |
--profile-dir <path> |
Chromeプロファイルディレクトリ |
--help, -h |
ヘルプを表示します |
CLI注: scripts/main.ts は、テキスト生成、画像生成、参照画像 (--reference/--ref)、および --sessionId を介した複数ターンの会話をサポートしています。
モデル
gemini-3-pro- デフォルト、最新モデルgemini-2.5-pro- 前世代のプロモデルgemini-2.5-flash- 高速、軽量
認証
初回実行時にブラウザが開き、Googleで認証を行います。クッキーは以降の実行のためにキャッシュされます。
サポートされているブラウザ (順に自動検出されます):
- Google Chrome
- Google Chrome Canary / Beta
- Chromium
- Microsoft Edge
必要に応じて GEMINI_WEB_CHROME_PATH 環境変数で上書きできます。
# Force cookie refresh
npx -y bun ${SKILL_DIR}/scripts/main.ts --login
環境変数
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Gemini Web Client
Supports:
- Text generation
- Image generation (download + save)
- Reference images for vision input (attach local images)
- Multi-turn conversations via persisted
--sessionId
Script Directory
Important: All scripts are located in the scripts/ subdirectory of this skill.
Agent Execution Instructions:
- Determine this SKILL.md file's directory path as
SKILL_DIR - Script path =
${SKILL_DIR}/scripts/<script-name>.ts - Replace all
${SKILL_DIR}in this document with the actual path
Script Reference:
| Script | Purpose |
|--------|---------|
| scripts/main.ts | CLI entry point for text/image generation |
| scripts/gemini-webapi/* | TypeScript port of gemini_webapi (GeminiClient, types, utils) |
⚠️ Disclaimer (REQUIRED)
Before using this skill, the consent check MUST be performed.
Consent Check Flow
Step 1: Check consent file
# macOS
cat ~/Library/Application\ Support/baoyu-skills/gemini-web/consent.json 2>/dev/null
# Linux
cat ~/.local/share/baoyu-skills/gemini-web/consent.json 2>/dev/null
# Windows (PowerShell)
Get-Content "$env:APPDATA\baoyu-skills\gemini-web\consent.json" 2>$null
Step 2: If consent exists and accepted: true with matching disclaimerVersion: "1.0":
Print warning and proceed:
⚠️ Warning: Using reverse-engineered Gemini Web API (not official). Accepted on: <acceptedAt date>
Step 3: If consent file doesn't exist or disclaimerVersion mismatch:
Display disclaimer and ask user:
⚠️ DISCLAIMER
This tool uses a reverse-engineered Gemini Web API, NOT an official Google API.
Risks:
- May break without notice if Google changes their API
- No official support or guarantees
- Use at your own risk
Do you accept these terms and wish to continue?
Use AskUserQuestion tool with options:
- Yes, I accept - Continue and save consent
- No, I decline - Exit immediately
Step 4: On acceptance, create consent file:
# macOS
mkdir -p ~/Library/Application\ Support/baoyu-skills/gemini-web
cat > ~/Library/Application\ Support/baoyu-skills/gemini-web/consent.json << 'EOF'
{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}
EOF
# Linux
mkdir -p ~/.local/share/baoyu-skills/gemini-web
cat > ~/.local/share/baoyu-skills/gemini-web/consent.json << 'EOF'
{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}
EOF
Step 5: On decline, output message and stop:
User declined the disclaimer. Exiting.
Quick start
npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello, Gemini"
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Explain quantum computing"
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
# Multi-turn conversation (agent generates unique sessionId)
npx -y bun ${SKILL_DIR}/scripts/main.ts "Remember this: 42" --sessionId my-unique-id-123
npx -y bun ${SKILL_DIR}/scripts/main.ts "What number?" --sessionId my-unique-id-123
Commands
Text generation
# Simple prompt (positional)
npx -y bun ${SKILL_DIR}/scripts/main.ts "Your prompt here"
# Explicit prompt flag
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Your prompt here"
npx -y bun ${SKILL_DIR}/scripts/main.ts -p "Your prompt here"
# With model selection
npx -y bun ${SKILL_DIR}/scripts/main.ts -p "Hello" -m gemini-2.5-pro
# Pipe from stdin
echo "Summarize this" | npx -y bun ${SKILL_DIR}/scripts/main.ts
Image generation
# Generate image with default path (./generated.png)
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A sunset over mountains" --image
# Generate image with custom path
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cute robot" --image robot.png
# Shorthand
npx -y bun ${SKILL_DIR}/scripts/main.ts "A dragon" --image=dragon.png
Vision input (reference images)
# Text + image -> text
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Describe this image" --reference a.png
# Text + image -> image
npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Generate a variation" --reference a.png --image out.png
Output formats
# Plain text (default)
npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello"
# JSON output
npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello" --json
Options
| Option | Description |
|---|---|
--prompt <text>, -p |
Prompt text |
--promptfiles <files...> |
Read prompt from files (concatenated in order) |
--model <id>, -m |
Model: gemini-3-pro (default), gemini-2.5-pro, gemini-2.5-flash |
--image [path] |
Generate image, save to path (default: generated.png) |
--reference <files...>, --ref <files...> |
Reference images for vision input |
--sessionId <id> |
Session ID for multi-turn conversation (agent generates unique ID) |
--list-sessions |
List saved sessions (max 100, sorted by update time) |
--json |
Output as JSON |
--login |
Refresh cookies only, then exit |
--cookie-path <path> |
Custom cookie file path |
--profile-dir <path> |
Chrome profile directory |
--help, -h |
Show help |
CLI note: scripts/main.ts supports text generation, image generation, reference images (--reference/--ref), and multi-turn conversations via --sessionId.
Models
gemini-3-pro- Default, latest modelgemini-2.5-pro- Previous generation progemini-2.5-flash- Fast, lightweight
Authentication
First run opens a browser to authenticate with Google. Cookies are cached for subsequent runs.
Supported browsers (auto-detected in order):
- Google Chrome
- Google Chrome Canary / Beta
- Chromium
- Microsoft Edge
Override with GEMINI_WEB_CHROME_PATH environment variable if needed.
# Force cookie refresh
npx -y bun ${SKILL_DIR}/scripts/main.ts --login
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 |
Proxy Configuration
If you need a proxy to access Google services (e.g., in China), set HTTP_PROXY and HTTPS_PROXY environment variables before running:
# Example with local proxy
HTTP_PROXY=http://127.0.0.1:7890 HTTPS_PROXY=http://127.0.0.1:7890 npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello"
# Image generation with proxy
HTTP_PROXY=http://127.0.0.1:7890 HTTPS_PROXY=http://127.0.0.1:7890 npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image cat.png
# Cookie refresh with proxy
HTTP_PROXY=http://127.0.0.1:7890 HTTPS_PROXY=http://127.0.0.1:7890 npx -y bun ${SKILL_DIR}/scripts/main.ts --login
Note: Environment variables must be set inline with the command. Shell profile settings (e.g., .bashrc) may not be inherited by subprocesses.
Examples
Generate text response
npx -y bun ${SKILL_DIR}/scripts/main.ts "What is the capital of France?"
Generate image
npx -y bun ${SKILL_DIR}/scripts/main.ts "A photorealistic image of a golden retriever puppy" --image puppy.png
Get JSON output for parsing
npx -y bun ${SKILL_DIR}/scripts/main.ts "Hello" --json | jq '.text'
Generate image from prompt files
# Concatenate system.md + content.md as prompt
npx -y bun ${SKILL_DIR}/scripts/main.ts --promptfiles system.md content.md --image output.png
Multi-turn conversation
# Start a session with unique ID (agent generates this)
npx -y bun ${SKILL_DIR}/scripts/main.ts "You are a helpful math tutor." --sessionId task-abc123
# Continue the conversation (remembers context)
npx -y bun ${SKILL_DIR}/scripts/main.ts "What is 2+2?" --sessionId task-abc123
npx -y bun ${SKILL_DIR}/scripts/main.ts "Now multiply that by 10" --sessionId task-abc123
# List recent sessions (max 100, sorted by update time)
npx -y bun ${SKILL_DIR}/scripts/main.ts --list-sessions
Session files are stored in ~/Library/Application Support/baoyu-skills/gemini-web/sessions/<id>.json and contain:
id: Session IDmetadata: Gemini chat metadata for continuationmessages: Array of{role, content, timestamp, error?}createdAt,updatedAt: Timestamps
Extension Support
Custom configurations via EXTEND.md.
Check paths (priority order):
.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md(project)~/.baoyu-skills/baoyu-danger-gemini-web/EXTEND.md(user)
If found, load before workflow. Extension content overrides defaults.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (9,017 bytes)
- 📎 scripts/gemini-webapi/client.ts (21,769 bytes)
- 📎 scripts/gemini-webapi/components/gem-mixin.ts (5,704 bytes)
- 📎 scripts/gemini-webapi/components/index.ts (44 bytes)
- 📎 scripts/gemini-webapi/constants.ts (3,703 bytes)
- 📎 scripts/gemini-webapi/exceptions.ts (1,207 bytes)
- 📎 scripts/gemini-webapi/index.ts (273 bytes)
- 📎 scripts/gemini-webapi/types/candidate.ts (1,293 bytes)
- 📎 scripts/gemini-webapi/types/gem.ts (1,847 bytes)
- 📎 scripts/gemini-webapi/types/grpc.ts (369 bytes)
- 📎 scripts/gemini-webapi/types/image.ts (3,466 bytes)
- 📎 scripts/gemini-webapi/types/index.ts (232 bytes)
- 📎 scripts/gemini-webapi/types/modeloutput.ts (816 bytes)
- 📎 scripts/gemini-webapi/utils/cookie-file.ts (2,402 bytes)
- 📎 scripts/gemini-webapi/utils/decorators.ts (1,100 bytes)
- 📎 scripts/gemini-webapi/utils/get-access-token.ts (7,540 bytes)
- 📎 scripts/gemini-webapi/utils/http.ts (1,621 bytes)
- 📎 scripts/gemini-webapi/utils/index.ts (1,021 bytes)
- 📎 scripts/gemini-webapi/utils/load-browser-cookies.ts (9,818 bytes)
- 📎 scripts/gemini-webapi/utils/logger.ts (1,193 bytes)
- 📎 scripts/gemini-webapi/utils/parsing.ts (1,353 bytes)
- 📎 scripts/gemini-webapi/utils/paths.ts (1,656 bytes)
- 📎 scripts/gemini-webapi/utils/rotate-1psidts.ts (1,528 bytes)
- 📎 scripts/gemini-webapi/utils/upload-file.ts (1,097 bytes)
- 📎 scripts/main.ts (14,877 bytes)