From babel-fish
AI image generation and editing. Text-to-image, style transfer, and logo generation. Currently powered by Gemini and FLUX via OpenRouter. Triggers: generate image, create image, make image, draw, illustrate, logo, visual, picture.
npx claudepluginhub ondrej-svec/heart-of-gold-toolkit --plugin babel-fishThis skill is limited to using the following tools:
Translating your thoughts into pictures. The Babel Fish handles all languages, including visual ones.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Translating your thoughts into pictures. The Babel Fish handles all languages, including visual ones.
| Backend | When to Use | Key |
|---|---|---|
Gemini (gemini-3-pro-image-preview) | Primary — best quality, text in images, style transfer | GEMINI_API_KEY |
FLUX via OpenRouter (black-forest-labs/flux.2-pro) | Fallback — artistic, creative work | ~/.claude/secrets/openrouter.json |
Check $GEMINI_API_KEY first; if unset, fall back to ~/.claude/secrets/openrouter.json.
Gather before generating. Ask if unclear:
1:1 (default), 16:9, 9:16, 4:3, 3:21K (default/fast), 2K (balanced), 4K (quality)./generated_image.jpg)import os
from google import genai
from google.genai import types
client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents=["Your refined prompt here"],
config=types.GenerateContentConfig(
response_modalities=["TEXT", "IMAGE"],
image_config=types.ImageConfig(
aspect_ratio="16:9", # adjust per request
image_size="1K", # 1K | 2K | 4K
),
),
)
for part in response.parts:
if part.text:
print(part.text)
elif part.inline_data:
img = part.as_image()
img.save("output.jpg") # Gemini returns JPEG — always use .jpg
Critical: Gemini returns JPEG by default. Use .jpg extension. If PNG is needed, pass format="PNG" explicitly to img.save().
curl https://openrouter.ai/api/v1/images/generations \
-H "Authorization: Bearer $(cat ~/.claude/secrets/openrouter.json | python3 -c 'import json,sys; print(json.load(sys.stdin)["api_key"])')" \
-H "Content-Type: application/json" \
-d '{"model": "black-forest-labs/flux.2-pro", "prompt": "your prompt", "n": 1}' \
| python3 -c 'import json,sys,base64,urllib.request; d=json.load(sys.stdin); urllib.request.urlretrieve(d["data"][0]["url"], "output.png")'
Show the output path. Ask if it matches the intent and whether style, composition, or content needs adjusting.
If refinement is needed, use Gemini's multi-turn chat for continuity:
chat = client.chats.create(
model="gemini-3-pro-image-preview",
config=types.GenerateContentConfig(response_modalities=["TEXT", "IMAGE"])
)
response = chat.send_message("Create a logo for 'Acme'")
# save, then refine:
response = chat.send_message("Make the font bolder and add a blue gradient")
Adjust the prompt and regenerate until approved.
Save to the requested output path. Report: