xue-xiaobao/xuexiaobao-skills · Archived

xiaobao-flow2api

Skill for multimodal generation. Supports switching between `flow2api` and `geminiweb2api` providers through the bundled `flow2api-cli`. Always use the CLI instead of calling HTTP APIs directly.

First seen Apr 2, 2026

Installation

$ npx skills add xue-xiaobao/xuexiaobao-skills --skill xiaobao-flow2api

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Also in this package

Other skills from xue-xiaobao/xuexiaobao-skills.

npx skills add xue-xiaobao/xuexiaobao-skills

Browse all from xue-xiaobao/xuexiaobao-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 2
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents gemini

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 5,134 B
  • docs README.md 2,495 B
  • docs SUMMARY.md 218 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Flow2API-Compatible Providers

This skill must use the bundled CLI instead of calling the HTTP API directly.

CLI path:

scripts/flow2api-cli

Update Mode

Only enter update mode when the user explicitly asks to "update", "更新", "同步", or "refresh" this skill.

In that case:

  • Read UPDATE.md
  • Inspect the upstream flow2api/ source and documentation
  • Update the CLI first when API behavior or calling conventions change
  • Update the skill text only when the entry workflow or routing rules change

If the user does not explicitly ask for an update, do not run the update workflow.

Step 0: Read the CLI Help First

Before invoking the skill, read the CLI help:

scripts/flow2api-cli --help

The help output is the canonical place for:

  • Single JSON input mode
  • JSON parameter format
  • Supported subcommands
  • Supported model groups
  • Default config keys
  • .env lookup order

Do not duplicate CLI usage instructions anywhere else in this skill.

Step 1: Load Default Config from .env

This skill uses .env-based configuration through flow2api-cli.

Default lookup order:

  1. env_file in the command input JSON
  2. Current working directory .env
  3. .env

Preferred .env keys:

  • FLOW2APIBASEURL
  • FLOW2APIAPIKEY
  • FLOW2APIDEFAULTIMAGE_MODEL
  • FLOW2APIDEFAULTVIDEO_MODEL
  • FLOW2APIDEFAULTFIRSTLASTFRAME_MODEL
  • FLOW2APIDEFAULTMULTIIMAGEVIDEO_MODEL
  • FLOW2APIDEFAULTVIDEOUPSAMPLEMODEL
  • WEB2APIBASEURL
  • WEB2APIAPIKEY
  • WEB2APIDEFAULTIMAGE_MODEL
  • WEB2APIDEFAULTUNDERSTANDING_MODEL

Rules:

  • Prefer .env
  • Keep base_url as origin only, without /v1, /models, or /api
  • Default provider is geminiweb2api
  • When the user wants Flow2API behavior or video capabilities, set provider to flow2api
  • If the user provides another base URL or API key for the current task, pass it through the command input JSON
  • All request values should be passed through one JSON input source
  • The JSON input source may come from --input, a JSON file path passed to --input, or stdin

Step 2: Choose the Correct CLI Command

Use these CLI commands:

  • Health check: health
  • OpenAI model list: list-openai-models
  • Alias list: list-aliases
  • Gemini model list: list-gemini-models
  • Gemini model lookup: get-model
  • OpenAI-compatible image generation: openai-image
  • Gemini-native image generation: gemini-image
  • Text-to-video: text-to-video
  • First-last-frame video: first-last-frame-video
  • Multi-image video: multi-image-video
  • Video upsample: video-upsample

Step 3: Check API Semantics from Upstream Sources

If you need to verify request semantics, supported models, streaming behavior, or protocol differences, inspect the upstream provider materials directly instead of reading local reference notes.

Preferred source order for flow2api:

  1. flow2api/src/api/routes.py
  2. flow2api/README.md
  3. flow2api/tests/testapiroutes.py
  4. flow2api/tests/testgeminigenerate_content.py
  5. Other relevant files under flow2api/src/ when needed

Preferred source order for geminiweb2api:

  1. geminiweb2api/src/geminiweb2api/main.py
  2. geminiweb2api/src/geminiweb2api/model_registry.py
  3. geminiweb2api/README.md
  4. geminiweb2api/tests/test_api.py
  5. Other relevant files under geminiweb2api/src/ when needed

Rules:

  • Treat upstream code and tests as the source of truth
  • Prefer code and tests over README when they disagree
  • Do not call the HTTP endpoint directly when the CLI can do it
  • If a capability is missing in the CLI, extend the CLI first, then use it
  • For geminiweb2api, note that video commands are currently unsupported

Step 4: Result Handling

The CLI is responsible for output normalization.

Rules:

  • If the interface produces URL links, the CLI should print the URL links
  • If output_path is provided, the CLI should download URL resources to that path
  • If the response contains inline binary data instead of a URL, the CLI may save it to output_path
  • Prefer the CLI output over raw API JSON when reporting generation results

Step 5: Command Construction Rules

  • Pass all request values through CLI arguments
  • Use one JSON input source per command
  • Prefer the category-specific command over manually composing raw request bodies
  • Use --request only when a full custom payload is necessary
  • Use default models from config when the user does not specify a model
  • For Gemini-native image generation, use gemini-image
  • For OpenAI-compatible generation and all video generation flows, use the corresponding OpenAI-style command

Notes

  • flow2api-cli --help is the source of truth for CLI usage
  • Upstream flow2api code, README, and tests are the source of truth for API semantics
  • Keep this skill focused on routing through the CLI, not on re-documenting every API shape locally