← Back to Skills Marketplace
ironystock

Banana Claws

by ironystock · GitHub ↗ · v0.1.9 · MIT-0
cross-platform ✓ Security Clean
244
Downloads
0
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install banana-claws
Description
Generate images via OpenRouter API (text-to-image) with automation-ready local scripts and a queue-first workflow. Use for single images or batched variants...
README (SKILL.md)

OpenRouter Image Generation

Generate images from prompts using OpenRouter's image generation endpoint.

Requirements

  • OPENROUTER_API_KEY in environment
  • python3
  • Python package: requests

Install dependency:

python3 -m pip install requests

FTUX preflight (run first)

python3 {baseDir}/scripts/preflight_check.py
python3 {baseDir}/scripts/preflight_check.py --json

If checks fail, tell the user exactly what is missing and provide copy/paste fix steps from the Fixups output.

Default model

  • google/gemini-3.1-flash-image-preview
  • Optional alternatives (if enabled on your account): openai/gpt-5-image, openai/gpt-5-image-mini

Usage

python3 {baseDir}/scripts/generate_image.py \
  --prompt "A cinematic portrait of a cyberpunk crab" \
  --model google/gemini-3.1-flash-image-preview \
  --image-size low \
  --out ./generated/cyber-crab.png

Optional args:

--model openai/gpt-5-image
--model openai/gpt-5-image-mini
--image-size low|medium|high
--clarify-hints      # print prompt-quality hints to stderr
--strict-clarify     # fail fast when prompt appears underspecified
--baseline-image ./path/to/reference.png
--baseline-source-kind current_attachment|reply_attachment|explicit_path_or_url
--confirm-external-upload # required for local baseline file upload
--variation-strength low|medium|high
--must-keep "title placement"
--must-keep "logo mark"
--lock-palette
--lock-composition
--allow-no-baseline-on-edit-intent

Queue -> response pattern (avoid traffic jams)

When a user asks for multiple images/iterations, do not hold one long-running turn per image. Do not block waiting for a "single message with all files" if the adapter does not support it.

Hard contract for queue mode:

  • NEVER run run_image_queue.py in the same foreground turn as enqueue for multi-image requests.
  • ALWAYS enqueue + immediate queued ack first, then background handoff.

Use a queue + batched response flow:

  1. Enqueue each requested image quickly.
  2. Immediately return with a short "queued" acknowledgement (do not wait for generation in the same turn).
  3. Drain queue in background (preferred: sub-agent/session worker).
  4. Send one consolidated completion status response when done.
  5. Always attach generated image files (never send only paths).
  6. If the messaging adapter allows only one media per send, post attachments as reply-chain messages under the consolidated completion status message (one file per message).

Enqueue command:

python3 {baseDir}/scripts/enqueue_image_job.py \
  --prompt "A retro 80s crab poster" \
  --model google/gemini-3.1-flash-image-preview \
  --image-size low \
  --clarify-hints \
  --out ./generated/crab-01.png \
  --request-id "discord-\x3Cmessage-id>"

Background queue handoff (recommended):

python3 {baseDir}/scripts/queue_and_return.py \
  --prompt "A minimalist snow crab logo" \
  --count 4 \
  --request-id "discord-\x3Cmessage-id>" \
  --out-dir ./generated \
  --prefix crab-logo \
  --queue-dir ./generated/imagegen-queue

Manual drain command (worker context only; not same foreground turn):

python3 {baseDir}/scripts/run_image_queue.py \
  --queue-dir ./generated/imagegen-queue

# queue_and_return guardrails (optional tuning)
python3 {baseDir}/scripts/queue_and_return.py \
  --max-background-workers 2 \
  --orphan-timeout-sec 1800 \
  ...

Batch-enqueue N variants with consistent file names:

python3 {baseDir}/scripts/enqueue_variants.py \
  --prompt "A minimalist snow crab logo" \
  --count 4 \
  --baseline-image ./generated/base-logo.png \
  --variation-strength low \
  --lock-palette \
  --lock-composition \
  --must-keep "wordmark placement" \
  --must-keep "icon silhouette" \
  --out-dir ./generated \
  --prefix crab-logo \
  --request-id "discord-\x3Cmessage-id>"

Useful options:

--max-jobs 3   # process only a subset for controlled batches
--start-index 5  # continue naming from prior batches

Data transmission notice (external provider)

  • This skill sends prompts and generated/edit inputs to OpenRouter (openrouter.ai).
  • If you pass --baseline-image, that image content is transmitted to the provider as part of the request.
  • Do not submit sensitive/private images unless the user explicitly approves external transmission.

Notes

  • If generation fails due to model/provider mismatch, retry with --model openai/gpt-5-image-mini.
  • Local baseline uploads are deny-by-default; pass --confirm-external-upload only when user explicitly approves sending that local file to provider.
  • Local baseline files are restricted to png/jpg/jpeg/webp, non-symlink regular files, workspace-local paths, and max size threshold.
  • For iterative work, prefer --image-size low; switch to medium or high for final renders.
  • Use --clarify-hints to surface prompt-quality gaps early; use --strict-clarify for workflows that must fail on ambiguity.
  • Keep prompts explicit for text rendering tasks.
  • Save outputs into workspace paths, not /tmp, for durability.
  • When user asks for generated images in chat, attach the generated file in the response (do not only send a path).
  • For queue mode, read results from:
    • .../imagegen-queue/results/*.json (success)
    • .../imagegen-queue/failed/*.json (failure details)
  • Edit/variant intent prompts fail fast if no baseline is supplied (--baseline-image) unless explicitly overridden.
  • Resolve baseline deterministically in caller: current-message attachment > replied-message attachment > clarification request.
  • Pass --baseline-source-kind current_attachment|reply_attachment|explicit_path_or_url for auditable provenance.
  • When baseline is supplied, rails default to low-variation + locked palette/composition unless explicitly changed.
  • Queue results persist provider metadata (generation id + provider response payload/path) and drift diagnostics (edit_intent_detected, baseline_applied, baseline_source, baseline_source_kind, baseline_resolution_policy, rails_applied) to help edits/debugging and smarter agent continuation.
  • Queue worker writes handoff_mode + same_turn_drain_detected so you can enforce true async behavior in tests/ops.
  • enqueue_variants.py writes \x3Cprefix>-manifest.json with baseline, constraints, variant deltas, and output targets for reproducible reruns.
Usage Guidance
This skill appears to do what it says: it enqueues image-generation jobs and calls OpenRouter using the OPENROUTER_API_KEY you supply. Before installing, verify: (1) you are comfortable giving your OpenRouter key to this skill and that you trust the OpenRouter provider; (2) you understand baseline images will be uploaded only when you pass --confirm-external-upload (do not confirm for sensitive local files); (3) the skill will create and use a local queue directory (generated/imagegen-queue) and may spawn background worker processes—inspect and manage those processes if you need to control runtime; (4) adjust the workspace-root option if your environment isn't /home/brad/.openclaw/workspace; and (5) consider harmonizing the desired default model (SKILL.md vs script defaults) to avoid unexpected provider/model choices.
Capability Analysis
Type: OpenClaw Skill Name: banana-claws Version: 0.1.9 The banana-claws skill bundle provides a robust, queue-based workflow for generating images via the OpenRouter API. The code includes several security-conscious features, such as 'rails' that validate local file paths against a workspace root and require explicit user confirmation (`--confirm-external-upload`) before transmitting local images to the external provider. The background worker logic in `queue_and_return.py` and `run_image_queue.py` is a legitimate implementation for handling asynchronous tasks in an agentic environment, and the instructions in `SKILL.md` focus on workflow reliability and file handling rather than subverting agent safety.
Capability Assessment
Purpose & Capability
Name/description match the code and runtime instructions. The package contains local Python scripts that enqueue and run image-generation jobs and posts to OpenRouter. Required binary (python3) and the single required env var (OPENROUTER_API_KEY) are appropriate for this functionality.
Instruction Scope
SKILL.md instructs using the included scripts, running preflight checks, queuing jobs, and draining a local queue. The instructions correctly warn that baseline images are transmitted only when confirm flags are set. Minor concerns: model defaults are inconsistent across docs and scripts (SKILL.md and enqueue scripts default to google/gemini-3.1-flash-image-preview while generate_image.py defaults to openai/gpt-5-image), and generate_image.py uses a hard-coded workspace-root default (/home/brad/.openclaw/workspace) which may not match the user's environment and affects baseline path validation.
Install Mechanism
No install spec is provided (instruction-only skill). Only dependency is the widely used 'requests' Python package, which the SKILL.md documents to install. No external downloads, URL-shorteners, or archive extraction are present in the manifest.
Credentials
Only one credential is required (OPENROUTER_API_KEY) and that matches the stated external provider. No other tokens, keys, or unrelated environment variables are requested. The scripts read this env var only to authenticate with OpenRouter as expected.
Persistence & Privilege
always:false (normal). The skill spawns local background worker processes (via subprocess.Popen) and writes queue, processing, results, and handoff files under a local 'generated/imagegen-queue' directory; this is expected for a queue-first design but means the skill will create files and may leave background worker processes running. It does not modify other skills or global agent config.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install banana-claws
  3. After installation, invoke the skill by name or use /banana-claws
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.9
- Added homepage and user-invocable fields to skill metadata. - Updated metadata to include emoji icon and clarify required environment variables. - No changes made to usage or functional code; documentation/metadata updates only.
v0.1.8
**Summary:** This update introduces strict guardrails for local baseline image uploads, requiring explicit user approval and adding new CLI flags and validation. - Added `--confirm-external-upload` flag; local baseline image upload now requires explicit user consent. - Local baseline uploads are restricted to specific file types, workspace paths, and size limits. - Documentation updated with new upload workflow and options, including detailed security notes. - `queue_and_return.py` supports new guardrails/options for background processing. - Improved CLI documentation and inline help for baseline upload and queue options.
v0.1.7
- Added explicit documentation and requirements for the Python `requests` package. - Now includes data transmission notice clearly stating that prompts and images are sent to external provider (OpenRouter). - Added structured `metadata` block specifying environment variables and dependencies. - Updated FTUX instructions to include dependency installation step. - No behavioral changes to scripts; these are documentation and preflight improvements.
v0.1.6
- Added detailed usage instructions and arguments for command-line image generation and queue operations. - Expanded guidance for asynchronous, queue-first workflows with strict rules to prevent blocking and traffic jams. - Documented all relevant scripts and keys for generating, enqueuing, and batch-processing images via OpenRouter API. - Clarified handling and attachment of generated image files and structured results. - Outlined troubleshooting, prompt improvement options, and reproducible job manifest features.
Metadata
Slug banana-claws
Version 0.1.9
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is Banana Claws?

Generate images via OpenRouter API (text-to-image) with automation-ready local scripts and a queue-first workflow. Use for single images or batched variants... It is an AI Agent Skill for Claude Code / OpenClaw, with 244 downloads so far.

How do I install Banana Claws?

Run "/install banana-claws" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Banana Claws free?

Yes, Banana Claws is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Banana Claws support?

Banana Claws is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Banana Claws?

It is built and maintained by ironystock (@ironystock); the current version is v0.1.9.

💬 Comments