Skip to content

Guide · Agent skill

How to use the Gemini Web Image and Text Generator agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains how to install and use the baoyu-danger-gemini-web agent skill, which lets an AI agent send prompts to Google's Gemini chat service and get back text or generated images. It is written for readers who have not used agent skills before. By the end you will know what the skill does, how to install it, how to ask for it in plain language, and what risks to weigh first.

Gemini Web Image and Text GeneratorJimLiu/baoyu-skills · MIT

Quick start

  1. 1Download and unzip. Download the skill ZIP from this page and unzip it. Keep the folder that contains SKILL.md.
  2. 2Place the folder. Move it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. In the Claude apps, upload it under Settings, then Capabilities, then Skills.
  3. 3Install bun. Make sure bun is installed, or that npx is available to run it. The agent will use one of these to run the scripts.
  4. 4Accept the consent prompt. On first use, read the disclaimer about reverse-engineered API usage and accept it if you want to continue. Declining stops the skill.
  5. 5Sign in to Gemini. Let the skill open your browser for Google sign-in on first run. Use a dedicated profile if you do not want it to reuse your main session.
  6. 6Make a request. Ask in plain language, for example generate image with Gemini, and attach a reference picture if you want the model to work from one.

What does this skill make the agent do?

Once installed, the agent can generate text and images through Gemini. The skill supports text generation, image generation from a prompt, reference images as vision input, and multi-turn conversations where earlier messages are remembered.

The skill works by calling an unofficial, reverse-engineered version of the Gemini web API through a TypeScript script. It is not Google's official developer API, so it can break or be blocked without notice.

  • Text generation from a prompt
  • Image generation from a prompt, saved to a file
  • Reference images for vision input, such as describing a picture or making a variation of one
  • Multi-turn chats that continue under a session ID
  • Can serve as an image generation backend for other skills

Install the skill from a ZIP file

Download the ZIP for this skill from the page you are reading, then unzip it. For a personal setup, place the skill folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder instead.

If you use the Claude apps, you can instead upload the skill under Settings, then Capabilities, then Skills.

After installing, start a new agent session so the skill is loaded. The folder should contain SKILL.md and a scripts/ subfolder.

  • Personal install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your project
  • Claude apps: Settings, then Capabilities, then Skills, then upload

Check what you need before the first run

The skill needs a JavaScript runtime called Bun. If bun is not installed, the agent can use npx to run bun instead. If neither is available, the skill suggests installing bun.

You also need a Google account that is signed in to Gemini in a supported browser: Chrome, Chrome Canary or Beta, Chromium, or Edge. The machine must have network access to gemini.google.com and related Google endpoints.

An optional EXTEND.md preferences file can set a default model, a proxy, and a custom data directory.

  • Bun, or npx to run bun
  • A Google account signed in to Gemini in a supported browser
  • Network access to gemini.google.com and related Google endpoints
  • Optional: EXTEND.md preferences file

Ask for it in natural language

You do not need to type the script commands yourself. The skill is meant to be triggered by requests such as generate image with Gemini or Gemini text generation. You can also ask for vision-capable generation when you have a picture you want the model to look at.

Other skills can call this one as their image backend, so a request for an image from another skill may use it without you naming it.

Before first use, the skill checks for a consent record. It shows a disclaimer about reverse-engineered API usage and asks you to accept or decline. If you decline, it stops.

  • Generate image with Gemini: a cute cat, saved as cat.png
  • Gemini text generation: summarise this idea in three bullet points
  • Describe this picture using Gemini, with the image attached as reference
  • Continue our earlier Gemini chat and ask what number we agreed on

Use the command-line options

Behind the scenes the agent runs scripts/main.ts. Before running the commands below, the agent replaces the placeholders {baseDir} and ${BUN_X} with real values. Model options are gemini-3-pro (the default), gemini-3-flash, gemini-3-flash-thinking and gemini-3.1-pro-preview.

Useful options include --prompt, --promptfiles, --model, --image, --reference, --sessionId, --list-sessions, --json, --login, --cookie-path and --profile-dir. Sessions are stored as JSON files under sessions/ in the data directory.

  • --image [path] generates an image; the default file name is generated.png
  • --reference or --ref passes one or more reference images
  • --login refreshes cookies and then exits
  • --json prints the output as JSON
${BUN_X} {baseDir}/scripts/main.ts --prompt "A cute cat" --image cat.png ${BUN_X} {baseDir}/scripts/main.ts --prompt "Describe this" --reference image.png ${BUN_X} {baseDir}/scripts/main.ts "Remember: 42" --sessionId session-abc ${BUN_X} {baseDir}/scripts/main.ts "What number?" --sessionId session-abc

Safety, login and account risk

Authentication relies on cookies from your signed-in browser session. On first run the skill opens a browser for Google sign-in and caches the cookies. When no profile directory is set, cookie refresh may reuse an already-running local Chrome or Chromium debugging session tied to a standard user-data directory.

To avoid reusing an existing session, set --profile-dir or the GEMINI_WEB_CHROME_PROFILE_DIR variable to a dedicated profile. The skill runs scripts and uses the network, and reusing your Google login carries account risk and may conflict with Google's terms. Review the scripts in the scripts/gemini-webapi/ folder before running them if you are unsure.

  • The skill runs scripts and uses the network
  • Use a dedicated Chrome profile to keep your main login separate
  • Override the browser path with GEMINI_WEB_CHROME_PATH
  • Proxy settings can be set with HTTP_PROXY or HTTPS_PROXY

Tips for better results

Pick a model that fits the job. gemini-3-flash is described as fast and lightweight, while gemini-3-pro is the default. Use a session ID when you want the model to keep context across several requests.

If cookies stop working, run the login refresh option. If the output is not what you expected, check that the reference image path is correct and that the model you chose matches the task. The file list for this skill includes SKILL.md and the scripts/gemini-webapi/ folder; confirm that scripts/main.ts exists after unzipping, because the instructions refer to it.

  • Use --login to refresh cookies
  • Use --list-sessions to find saved sessions
  • Set GEMINI_WEB_DATA_DIR to change where data is stored
  • Use GEMINI_WEB_COOKIE_PATH to point to a custom cookie file

What people use it for

  • Generating a quick illustration or concept image from a text description, saved to a local file
  • Asking Gemini to describe or critique a reference picture you provide
  • Drafting or summarising text from a prompt without a paid API key
  • Running a multi-turn chat where a later question builds on earlier answers
  • Acting as the image generation step inside another agent skill

Frequently asked questions

Is the baoyu-danger-gemini-web skill free to use?

The source does not state a price for the skill, and it does not describe a paid Gemini API key being required. It is released under the MIT licence. Access to Gemini depends on your Google account, and the skill relies on an unofficial API that may change or stop working.

What do I need to install the Gemini Web skill?

You need the skill folder placed in ~/.claude/skills/ or a project's .claude/skills/, plus Bun or npx to run bun. You also need a Google account signed in to Gemini in Chrome, Chrome Canary or Beta, Chromium, or Edge, and network access to Google endpoints.

Does this skill use Google's official Gemini API?

No. The skill describes itself as calling an unofficial, reverse-engineered version of the Gemini web API. Because it is not supported by Google as a developer API, it can break or be blocked without notice, so it is not suitable for production systems that need stable access.

Is it safe to let a script use my Google login cookies?

This carries account risk, and the source says it may violate Google's terms. The skill reuses cookies from your browser session and may reuse a running local Chrome or Chromium debugging session. To limit exposure, set a dedicated profile with --profile-dir or GEMINI_WEB_CHROME_PROFILE_DIR, and review the scripts first.

Why does the skill ask me to accept a disclaimer?

Before first use it checks for a consent file with accepted set to true and disclaimer version 1.0. If none exists, it shows the disclaimer and asks you to accept or decline. Accepting creates the consent file with a timestamp, and declining stops the skill.

What should I do if the Gemini login or cookies stop working?

Run the skill with the --login option to refresh cookies, then exit. If the browser is not detected, set GEMINI_WEB_CHROME_PATH to your browser's executable. You can also change the cookie file location with GEMINI_WEB_COOKIE_PATH.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are a developer or creator who wants an agent to make text or images with Gemini without buying API access, and you are comfortable with an unofficial API and a script using your browser login. Pick a supported, official Gemini API route instead if you need stable, commercial-grade access or do not want your Google session reused.

Download the skill