Agent Skillsdaymade/claude-code-skills › download-gemini-images

download-gemini-images

GitHub

自动化从登录态 Chrome 的 Gemini 会话中提取并下载图片,支持通过 Lightbox 获取大图或回退至页面资源,最终打包为 ZIP 文件。

download-gemini-images/SKILL.md daymade/claude-code-skills

Trigger Scenarios

用户需要从 Google Gemini 对话中批量下载图片 用户希望将 Gemini 生成的图像预览保存为本地归档

Install

npx skills add daymade/claude-code-skills --skill download-gemini-images -g -y
More Options

Non-standard path

npx skills add https://github.com/daymade/claude-code-skills/tree/main/download-gemini-images -g -y

Use without installing

npx skills use daymade/claude-code-skills@download-gemini-images

指定 Agent (Claude Code)

npx skills add daymade/claude-code-skills --skill download-gemini-images -a claude-code -g -y

安装 repo 全部 skill

npx skills add daymade/claude-code-skills --all -g -y

预览 repo 内 skill

npx skills add daymade/claude-code-skills --list

SKILL.md

Frontmatter
{
    "name": "download-gemini-images",
    "description": "Download, export, save, or package images from a Google Gemini conversation\/chat\/app page, especially uploaded images or generated image previews visible in a Gemini thread. Use when the task needs logged-in Chrome\/Gemini state, opening Gemini image lightboxes, downloading the larger displayed image files, renaming them in order, and producing a ZIP archive."
}

Download Gemini Images

Overview

Download Gemini conversation images from the user's logged-in Chrome session. Prefer the lightbox image over thumbnail/page-preview assets because Gemini often exposes a larger blob: image only after the user opens a preview.

Workflow

  1. Use the Chrome plugin, not a fresh unauthenticated browser, because Gemini conversations usually require the user's existing Google session.
  2. Bootstrap Chrome per the Chrome skill, claim the already-open Gemini tab if it exists, or open the user-provided Gemini URL in Chrome.
  3. Import and run scripts/download_gemini_images.mjs from a node_repl JS call after browser is available.
  4. Package the output directory with scripts/package_images.sh.
  5. Report the ZIP path, image count, and any lower-resolution fallback.
  6. Finalize Chrome control after downloads are complete, keeping the user's original Gemini tab open when appropriate.

Main Script

Resolve the script path relative to this skill directory, then import it in the same Node REPL session used for Chrome automation:

var { downloadGeminiImagesFromChrome } = await import("/absolute/path/to/download-gemini-images/scripts/download_gemini_images.mjs");
var result = await downloadGeminiImagesFromChrome({
  browser,
  tabUrlIncludes: "gemini.google.com/app",
  expectedCount: 20,
  outputDir: `${nodeRepl.homeDir}/Downloads/gemini_conversation_images_${new Date().toISOString().slice(0, 10).replaceAll("-", "")}`
});
nodeRepl.write(JSON.stringify(result, null, 2));

Set expectedCount only when the user gave a specific count. Omit it to download every visible Show the uploaded image in a lightbox button.

Packaging

After the main script returns outputDir, run:

/absolute/path/to/download-gemini-images/scripts/package_images.sh "$outputDir" "$HOME/Downloads/gemini_conversation_images.zip"

The packaging script creates the ZIP, runs zip -T, and verifies that the archive contains the same ordered image files as the directory.

Fallback

If lightbox automation fails but the page is visibly loaded, use the tab pageAssets capability:

var pageAssets = await tab.capabilities.get("pageAssets");
var inventory = await pageAssets.list();
var uploaded = inventory.assets.filter(a => a.kind === "image" && a.url.includes("lh3.googleusercontent.com/gg/"));
var bundle = await pageAssets.bundle({ inventoryId: inventory.id, assetIds: uploaded.map(a => a.id) });
nodeRepl.write(JSON.stringify(bundle, null, 2));

This usually captures 512px preview JPEGs, not the larger lightbox files. Tell the user when this fallback is used.

Notes

  • Do not inspect browser cookies, local storage, passwords, or session stores.
  • Downloading files is an inbound transfer and does not require confirmation by itself.
  • If Gemini asks the user to log in, pause and ask the user to complete login in Chrome.
  • If the user wants the images in the same order as the thread, use the script's ordered names: image_01.jpg, image_02.jpg, etc.

Version History

  • e00a2ec Current 2026-08-20 11:27

Same Skill Collection

capture-screen/SKILL.md
cloudflare-troubleshooting/SKILL.md
codex-image-gallery/SKILL.md
daymade-claude-code/claude-skills-troubleshooting/SKILL.md
daymade-claude-code/claude-usage-analyst/SKILL.md
daymade-claude-code/continue-claude-work/SKILL.md
daymade-claude-code/marketplace-dev/SKILL.md
daymade-docs/doc-to-markdown/SKILL.md
daymade-docs/mermaid-tools/SKILL.md
daymade-docs/ppt-creator/SKILL.md
daymade-financial/ashare-news-fetcher/SKILL.md
daymade-financial/devils-advocate/SKILL.md
daymade-financial/gangtise-copilot/SKILL.md
daymade-financial/pharma-daily-report/SKILL.md
daymade-skill/skill-reviewer/SKILL.md
daymade-skill/skills-search/SKILL.md
design-style-picker/SKILL.md
douban-skill/SKILL.md
excel-automation/SKILL.md
fact-checker/SKILL.md
gemini-history-analyzer/SKILL.md
github-ops/SKILL.md
github-sensitive-data-cleanup/SKILL.md
i18n-expert/SKILL.md
llm-icon-finder/SKILL.md
macos-cleaner/SKILL.md
notify-wecom/SKILL.md
openclaw/SKILL.md
product-analysis/SKILL.md
prompt-optimizer/SKILL.md
promptfoo-evaluation/SKILL.md
repomix-unmixer/SKILL.md
scrapling-skill/SKILL.md
setup-notifications-via-wecom/SKILL.md
slides-creator/SKILL.md
ui-designer/SKILL.md
video-comparer/SKILL.md
wps-doc-scraper/SKILL.md
youtube-downloader/SKILL.md
auto-repo-setup/SKILL.md
benchmark-due-diligence/SKILL.md
bilibili-source/SKILL.md
cli-demo-generator/SKILL.md
competitors-analysis/SKILL.md
daymade-audio/asr-transcribe-to-text/SKILL.md
daymade-audio/meeting-minutes-taker/SKILL.md
daymade-audio/stepfun-asr/SKILL.md
daymade-audio/stepfun-tts/SKILL.md
daymade-audio/transcript-fixer/SKILL.md

Metadata

Files
0
Version
e00a2ec
Hash
246efb53
Indexed
2026-08-20 11:27

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 03:50
浙ICP备14020137号-1 $お客様$