# Google Flow Generate

> |

- **Type:** Skill
- **Install:** `agentstack add skill-gabrielgargiulodev-google-flow-mcp-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [GabrielGargiuloDev](https://agentstack.voostack.com/s/gabrielgargiulodev)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [GabrielGargiuloDev](https://github.com/GabrielGargiuloDev)
- **Source:** https://github.com/GabrielGargiuloDev/google-flow-mcp/tree/master/skill

## Install

```sh
agentstack add skill-gabrielgargiulodev-google-flow-mcp-skill
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Google Flow Generate

Runbook to generate images/video on Google Flow through the `google-flow` MCP server.
Set `FLOW_MCP_DIR` below to wherever you cloned this repo.

## STEP 0 — Ensure the dedicated Chrome is up (always run first)

```
powershell -NoProfile -ExecutionPolicy Bypass -File "/scripts/ensure-flow-chrome.ps1"
```

- `READY` / `LAUNCHED` → proceed.
- `LAUNCHED`: if labs.google shows the marketing landing instead of the app, the user
  must click **"Sign in to Flow"** once in that Chrome window, then continue.
- `FAILED` → report; do not proceed.

If the `mcp__google-flow__*` tools are absent, the MCP server needs a client restart
(it loads into RAM at startup).

## STEP 1 — Connect

Call `flow_connect`:
- `status: connected` → go on.
- `status: oauth_required` → user signs in to Flow once, then retry.
- `WRONG_GOOGLE_ACCOUNT` → stop; setup mismatch.
- `flow_account_check` → `method:"assumed"` means unverified, not a green light.

## STEP 1.5 — Build a faithful prompt (always, before generating)

Flow's agent and the models render far more faithfully from a rich, structured prompt
than from a bare phrase. Turn the user's request into a complete prompt **without
betraying intent** — enrich, never invent:
- Keep every element the user named; never drop or swap any.
- Add only supporting detail (subject + action + setting + lighting + composition +
  style/medium + mood + quality cues; for video also camera movement + pacing). Do NOT
  add subjects/objects/text the user didn't ask for. Preserve explicit constraints
  ("red mug, no logo") verbatim.
- Match `ratio` to the use (16:9 scene, 9:16 story, 1:1 icon).

The server also wraps the prompt so the agent stays bound to it verbatim.

## STEP 2 — Images (free)

`flow_generate_image` with `auto_confirm:true`. Models: `Nano Banana 2` (default),
`Nano Banana Pro` (best fidelity — prefer for complex prompts), `Imagen 4`. Params:
`prompt`, `ratio`, `project_name`, `campaign`. Result `files[]` = saved paths. (The
`credits_consumed` flag is hardcoded; images are free against the Flow pool.)

### Verify & refine (images — free, so always do it)

After generating, **open the image with vision** and compare it to the request element
by element (subjects present? constraints respected? right composition? nothing
unwanted added?). If it matches → deliver. If not → refine the prompt to emphasize the
failed element and regenerate (up to 3×; images cost nothing). This catches real
misses — e.g. the download picking a UI asset instead of the generated image.

## STEP 3 — Video (⚠️ consumes credits)

`flow_generate_video` with `auto_confirm:true` submits, approves the credit dialog,
waits ~1 min and downloads the mp4.
- Credits: Veo 3.1 Lite ~10, Fast ~20, Quality ~100; Omni Flash ~15-30 of ~1000/month.
- **Valid model/duration combo required** (Veo 3.1 Lite = 8s-only on Pro; Omni Flash
  4-10s) — else the agent asks for clarification and nothing generates.
- Confirm with the user before spending credits if not already authorized.
- `auto_confirm:false` stages without spending.

## Fallback map (error → action)

| Error | Action |
|---|---|
| `oauth_required`, `MANUAL_VERIFICATION_REQUIRED` | STOP, user signs in / solves captcha |
| `WRONG_GOOGLE_ACCOUNT` | STOP, setup problem |
| `BROWSER_NOT_CONNECTED`, `NOT_LOGGED_IN`, `FLOW_PAGE_NOT_FOUND` | rerun STEP 0, then fall back |
| `GENERATION_BUTTON_DISABLED`, `GENERATION_TIMEOUT`, `UNKNOWN_UI_CHANGE` | fall back + `flow_discover_ui` |
| `GOOGLE_LIMIT_REACHED` | credits exhausted → fall back |
| `DOWNLOAD_FAILED` | don't regenerate (credits spent) — retry download |

Image fallback: Flow → Gemini API (`fallback/gemini_image_fallback.py`, needs
`GEMINI_API_KEY`) → any per-credit generator you use. Video fallback: Flow → your
per-credit generator directly.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [GabrielGargiuloDev](https://github.com/GabrielGargiuloDev)
- **Source:** [GabrielGargiuloDev/google-flow-mcp](https://github.com/GabrielGargiuloDev/google-flow-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-gabrielgargiulodev-google-flow-mcp-skill
- Seller: https://agentstack.voostack.com/s/gabrielgargiulodev
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
