/flora-mcp-skills:flora-batch-generatefrom FLORA
Turns a structured list (products, SKUs, variants, scenes, localisations) into a parallel batch of FLORA generations under a consistent style. Fires all items concurrently, polls once, and settles cost per item.
Ships in FLORA. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Hosted MCP generation inputs are plural: call flora_create_generations with { "generations": [{ "workspace_id": "ws_…", "project_id": "prj_…", "type": "image", "prompt": "…" }] } (1–20 items). Put per-generation fields, including optional model, params, and reference_node_ids, inside each item. Read generations[] in the response; retain successful entries' run_id and handle failures individually. Poll flora_list_generations with { "run_ids": ["run_…"] }, even for one run; add technique_id for technique runs. Never retry successful items because another item failed.
Use dedicated tools for this workflow, including batches. SDK examples below describe orchestration: use the corresponding dedicated tools, issue independent calls concurrently, retain every run id, and poll in later calls.
Not a faster chatbot. A pipeline. The user hands over a list; the list comes back as assets. Nothing in between is a conversation.
The difference is not politeness, it is arithmetic. Forty items generated one at a time, each one waited on before the next is asked for, is forty sequential waits. The same forty fired together is one wait. FLORA runs them concurrently either way — the serialisation is entirely on the agent's side, and it is the single thing that decides whether a batch takes ninety seconds or an hour.
Measured, this skill's own hand-test: six items, fired together, all complete in 15.8 seconds. The same six at the model's estimated 25s each, run one after another, would be about 150 seconds. Same cost, same outputs, one tenth the wall clock.
N items is one wait, not N waits. Fire every item before you poll any item. Poll the batch, never the item.
Both halves matter and they fail differently. Firing serially wastes the user's time in the open. Polling serially wastes it invisibly — the batch is already running fine and the agent is the bottleneck.
Everything below is in service of that one sentence.
ITEMS the list — rows, SKUs, variants, URLs, filenames required
STYLE the one treatment every item shares required
MODEL one model for the whole batch optional, see Planning
PROJECT where the outputs land optional, one is created
One style, N items. This is the shape the skill exists for: a single consistent treatment, varied only by the per-item variable. A product list becomes PDP shots by holding the lighting, backdrop, lens and framing fixed and changing only the subject noun. If two items genuinely need different treatments, that is two batches — say so rather than quietly blending them, because a blended batch has no consistent style and the user cannot tell which axis moved.
Plan, fire, poll, settle. Submit up to 20 independent requests per
flora_create_generations call. Retain every successful run id, then poll with
flora_list_generations in later calls. Do not hold a sandbox open waiting for a batch to finish.
Nothing here spends. Everything here prevents spend.
flora_list_models returns what one call needs: model_id, estimated_cost_usd,
estimated_seconds, and params — the ONLY valid param names and enum values.
Pick the row by model_id (e.g. t2i-flux-2-klein-4b).
Total the cost and stop. Multiply and state it plainly — "24 items x $0.0039 = about $0.09. Proceed?" — then wait for a yes. Do this even when the per-item figure is trivial. The batch is exactly where a trivial figure stops being trivial, and the user is the one who finds out.
Quote in US dollars, never credits: estimated_cost_usd, run_cost and
charged_cost are all dollars. estimated_credits is a legacy unit; ignore it.
Validate every param against m.params before firing. This is not defensive
tidiness, it is the most expensive silent failure on this surface:
An unknown model is a clean 400 at create time, free, with the accessible model list in the error message. An unknown param value is not validated at all. It is accepted, it runs, it completes, and it bills — the model silently falls back to the default.
Measured: params: { aspect_ratio: "banana_9_9" } returned a run_id, ran to
completed, charged $0.004, and produced a square image. No error anywhere. Across
forty items a single typo'd enum in the per-item variable is forty paid renders at the
wrong aspect ratio, discovered by a human looking at the outputs.
Also confirm the item list back to the user — the parsed rows and the count — before spending. A misparsed CSV column is free to fix now and billable to fix later.
// flora_create_generations — the whole batch in one call, up to 20 items
{
"generations": [
{ "workspace_id": "ws_…", "project_id": "prj_…", "type": "image",
"prompt": "Studio product photograph on a seamless warm-grey backdrop, soft large softbox from camera left, gentle falloff, subtle contact shadow, 85mm, centred, no props, no text — a matte black ceramic pour-over coffee dripper" },
{ "workspace_id": "ws_…", "project_id": "prj_…", "type": "image",
"prompt": "Studio product photograph on a seamless warm-grey backdrop, soft large softbox from camera left, gentle falloff, subtle contact shadow, 85mm, centred, no props, no text — a brushed steel insulated water bottle" }
]
}
The response keeps input order: every entry reports index and ok, a
run_id on success or an error on failure. One rejected item never discards
the run_ids of the items that did fire — those are billed and running, and
nothing but that map ties a run back to the row it came from.
Return the run_id → item map and log it. Variables do not persist between
calls. That map is the only link between a run and the row it came from;
losing it means a completed batch you cannot report on.
No pacing. Measured: six concurrent creates completed the fire phase in 3.1 seconds with no rate limiting. Do not stagger on a timer — that is the serial failure mode wearing a safety costume. The two real exceptions are named under Gotchas.
// flora_list_generations — one history page covers the whole batch
{ "project_id": "prj_…", "limit": 100 }
// …or exactly the fired ids: { "run_ids": ["run_…", "run_…"] } (max 20)
Join the page back to your run_id → item map: status: "completed" entries
carry outputs, failed entries carry the error code, everything else is
still running.
One list() covers the batch. retrieve() covers one item. That is the whole
argument, and it is worth the measured numbers because the serial habit is strong:
1 list({ limit: 100 }) covering 100 runs 265 ms
20 retrieve() in parallel 838 ms
20 retrieve() in series 6238 ms
One list is 24x faster than twenty serial retrieves while covering five times as
many runs. And this is per poll cycle: a forty-item batch polled every fifteen
seconds for three minutes is 12 cycles (reading those runs by run_ids instead needs
max(15, 2 × ids) seconds between polls — 40 s for 20 ids — and any cooldown error's
retry_after_seconds wins). Central polling spends about three seconds of
that on polling. Serial retrieval spends 12 × 40 × 312ms — about two and a half minutes
of round trips inside a three-minute batch. It does not finish; it thrashes.
limit: 100 explicitly, every time. 100 is the API's hard maximum
(limit is validated min(1).max(100)). It is not the default — the MCP
flora_list_generations tool defaults to 20, so a 30-item batch polled without an
explicit limit silently reports ten items as "still running" forever. Past 100 items,
page with cursor; do not slice a bigger page client-side.
Filter by project_id. A batch in its own project makes the poll exact. Without
it you are paging the account's whole history to find your forty.
Key on status, never on progress or completed_at. Measured: a failed run
reports progress: 100 and a populated completed_at. Both look like success. Only
status === "completed" plus a present outputs array means an asset exists.
generation_id and run_id are the same value on every row — index on whichever, but
do not treat them as two keys into two things.
Re-read cost after the batch is terminal, not at the moment each item finishes.
charged_cost is eventually consistent. Measured on the hand-test: at the instant the
sixth item flipped to completed its charged_cost was absent, and summing then
reported $0.020 against a true $0.024 — a 17% undercount. Re-listed a minute later,
all six carried charged_cost: 0.004.
So: poll on status, then do one final list() for the money. If a field is still
missing, report the total as a floor and say so — never present an undercount as the
bill.
The same caution applies at the other end. The charged_cost returned by
create() is a quote, not the bill. On this batch the quote matched exactly
($0.004 → $0.004), which is precisely why it cannot be trusted: on a heavier model the
quote has been measured at 0.253 against 0.873 actually charged, 3.45x. Quote from
a settled run or state plainly that the figure is a floor.
A batch is not a transaction. Some items complete, some fail, and the two need different sentences. Never abort a paid batch partway — the items already running will finish and bill regardless, so abandoning them buys nothing and loses their URLs.
Failures arrive at two different moments and they are not the same problem.
The item never became a run. Nothing billed. These are in rejected[] from phase 2.
| status | code | meaning | action |
|---|---|---|---|
| 400 | input_validation_error | bad model id, malformed body | fix and re-fire — free |
| 402 | insufficient_credits | out of credits | stop the whole batch, tell the user |
| 429 | rate_limited | workspace throttled | retry — see Gotchas |
| 409 | idempotency_duplicate | key already used | this item already fired; find its run |
| 500 | unknown_error | often a malformed prj_/ws_ id | check the ids before assuming an outage |
A 402 mid-batch is the one case that justifies stopping: every remaining create will fail the same way, and firing them anyway just fills the report with noise.
The run exists and carries error_code and error_message. Classify by code:
| retry | codes |
|---|---|
| retry now — transient | GENERATION_PROVIDER_TIMEOUT, GPU_PROVIDER_ERROR, GENERATION_GENERIC_ERROR, GENERATION_FAILED_TO_START, GENERATION_FAILED_TO_UPLOAD, SERVER_ERROR |
| retry later — provider under load | GENERATION_DOWNSTREAM_SERVICE_ERROR, GENERATION_QUEUE_TOO_LARGE, GENERATION_QUEUE_NOT_MOVING, GENERATION_CIRCUIT_BREAKER_OPEN, GENERATION_INVALID_PROVIDER_RESPONSE, GENERATION_NO_RESULT |
| change the input — never retry as-is | GENERATION_PROMPT_MODERATED, LLM_REFUSAL, GENERATION_INPUT_VALIDATION, GENERATION_INVALID_PARAMS, GENERATION_INVALID_URL |
| report, do not retry | BILLING_NOT_ENOUGH_CREDITS, GENERATION_NOT_PAID, any ACCESS_*, GENERATION_CANCELLED |
Read
error_message, not justerror_code. Two of the retryable codes routinely carry a moderation refusal. Measured, a real failed run:GPU_PROVIDER_ERROR— "Your request was rejected by the safety system … safety_violations=[sexual]". The code says retry now; the truth is change the input.GENERATION_NO_RESULTbehaves the same way — the model declining a subject, wearing a provider-unavailable code. Retrying either blind bills the same refusal again, and in a batch it does so on a loop.
Failed generations are refundable, so a failure usually costs nothing. A retry is a new generation and bills again. Retry once, silently, only for the transient tier; anything else goes in the report for the user to decide.
Never re-fire the whole batch after a partial failure: successful entries already
spent money, and a timed-out call may still have started runs. Read first —
flora_list_generations with the batch's project_id (or the run_id → item map's
run_ids, up to 20) — then re-fire only the items that genuinely have no run.
A run that failed after it was created still billed; inspect its error
before deciding whether the same request can succeed on a second try.
SANDBOX
call window a single call should not hold a long batch. A 40-item batch
on a ~107s model will NOT fire-and-finish inside one call. This
is why fire and poll are separate calls: fire, return the run_id
map, poll in a later call. Never build a wait that must outlive
one call.
no variables persist between calls. Return or log the run_id -> item map or
the batch is unrecoverable.
no filesystem every deliverable is a URL. Never claim to have written a file.
FIRING
per-entry isolation one rejected entry never discards the run_ids of
items that did fire — those are billed and now untrackable
without the response's index map.
no pacing needed 6 concurrent creates fired in 3.1s, no throttling. Do not stagger.
Krea models the exception: they rate-limit hard and lose most of a concurrent
batch to GENERATION_DOWNSTREAM_SERVICE_ERROR. Pace those at ~5s.
rate limit scope keyed on WORKSPACE, not user or key. A big batch competes with
itself and with teammates on the same workspace. 429 is
`rate_limited`; retry with backoff after it clears,
most of it self-heals.
POLLING
limit: 100 always explicit. 100 is the API maximum; the MCP tool's default
is 20, which silently truncates any batch over 20.
status only progress: 100 and completed_at are BOTH set on failed runs.
generation_id is the same value as run_id, not a second key.
COST
params not validated an unknown param VALUE is accepted, runs, and bills at the
default. Only an unknown MODEL is a clean 400. Validate against
flora_list_models({ model_id }) params before firing.
charged_cost at fire is a quote. Measured elsewhere at 0.253 quoted vs 0.873 charged.
charged_cost on list is eventually consistent — absent for a moment after a run goes
terminal. Summing at detection undercounted by 17%. Re-read.
failures refund a failed run generally does not cost. A retry is a new
generation and does.
RETRY SAFELY
inspect first read flora_list_generations before re-firing a possibly-started
item — a duplicate create is billed, not deduped.
When every item needs the same multi-step treatment rather than the same prompt —
background swap, relight, sketch-to-render — fire one flora_run_technique per item,
all in parallel, instead of one flora_create_generations batch. The law and the four
phases are unchanged. One difference: cost comes from the technique's run_cost, not
from a model's estimated_cost_usd.
Resolve one technique for the whole batch. Items needing two techniques are two batches.
The hosted MCP tools take no callback_url; poll as above. Direct REST and SDK calls
(POST /generate, client.generations.create) accept one — an HTTPS endpoint that
receives a signed POST when the run reaches a terminal state (run.completed /
run.failed), HMAC-SHA256 signed via Flora-Signature, retried three times with
backoff.
If the user drives the batch from their own code and has somewhere to receive a webhook, that is strictly better than polling and it removes the sandbox timeout from the problem entirely. Most agent sessions do not, which is why this skill is written around polling.
One row per item, in the order the user gave them. The SKU or filename is the key the
user thinks in — lead with it, never with the run_id.
SKU STATUS COST OUTPUT
PO-01 completed $0.004 https://media.flora.ai/…
WB-04 completed $0.004 https://media.flora.ai/…
AP-09 failed — GENERATION_PROMPT_MODERATED — "linen apron" flagged;
needs a reworded prompt, not a retry
Then three lines and stop:
charged_cost was still missingYou cannot see any output. Report URLs and let the user judge them. Never characterise an image you have not been shown.
Media URLs are public, unsigned and permanent. Pasting one into a transcript discloses that asset to anyone who reads it — worth a word when the batch is unreleased work.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
batch-generation, flora, parallel-processing, asset-generation
18 skills in this plugin
/flora-action-studioOpen FLORA's live action studio: run a prebuilt action, a workspace's own custom action, or a technique (custom action flow) so the result shows inline with the action's declared parameters as live controls the user adjusts themselves. Use when the user wants to tweak, tune or iterate on a transform rather than describe it — "let me adjust the colour grade", "give me sliders for this", "I want to play with the settings", "quantize this logo to a few colours and let me pick how many", "run my custom action on this", "turn my own code into an action I can tune" — or names an action or technique and wants to see and refine its output. Also use when the user wants to create, write or fix their own action ("can we create our own action", "make me a pixelate action", "turn this into an action", "my action failed, fix it") and when they name a transform to apply ("color grade it", "pixelate this", "quantize the logo"). Do not use for a plain generation with no source media (flora_create_generations), to inspect existing work (flora-canvas-iterate), or when the user wants one fixed result with no adjustment.
/flora-brand-ad-pipelineProduce brand-controlled ad creative for a product launch and carry it all the way through archive, hosting and ad creation — FLORA generation under a locked brand treatment, then Google Drive for archive, then Supabase storage for hosting, then Meta Ads creatives left in paused state for a human to review. Use when someone asks for launch creative, campaign assets for a new product line, ads for a store or a season, "a set of ads for the strawberry launch", or "get these staged for me to review". Do not use for a one-off image with no campaign around it — that is flora-batch-generate — and never use it to unpause, publish, or set a budget on an ad.
/flora-brand-consistency-auditJudge a set of generated assets against a brand's actual rules — subject and product identity, palette, lighting and treatment, framing and crop system, logo and type lockups, background rules, and output specs — and return findings with severity, evidence and a fix per finding. Use after a batch generation, before a client review, before assets go to an ad platform or a PDP, and whenever a set is individually acceptable but collectively inconsistent. Trigger on "does this match the brand", "review this batch", "check these against the guidelines", "are these on-brand", "the set doesn't hang together", "QA these before we send them", or any request to sign off generated output against a brand book. Not for checking whether the workspace's references are set up — that is creative-context-audit./flora-canvas-iterateFind and build on work that already exists in a FLORA project — inspect a canvas, review generation costs, regenerate specific assets, or route existing Deck and slide edits to flora-deck-editor. Use when the user refers to a named project, "my canvas", or earlier work ("the hero images from last week", "edit slide two"). Do not use to start new work in an empty project./flora-deck-editorRead, create, and edit native editable Deck nodes in FLORA through hosted MCP. Use for decks, slides, presentations, and edits to an existing slide's text, layout, styling, or source bindings. Authors saved slide documents; it does not generate campaign/PDP assets or provide headless presentation rendering or PDF export. Use flora-mockup-deck or flora-pdp-deck for those asset sets and their separate HTML/PDF delivery workflows.
/flora-image-resizeGeneratively resize/reframe a source image into other aspect ratios (9:16, 16:9, 1:1, 4:3, 3:4, 21:9) using FLORA's image-to-image models, holding the subject, props, palette and grade rather than cropping or letterboxing. Use when someone wants one image in several placements — "make a 9:16 from this hero", "resize this for Stories", "I need this banner as a square", "reframe without cropping", "outpaint this image", "same shot, different ratios". Also trigger on "image resize" in any FLORA context. Do not use when the original pixels must survive untouched — a legal-approved pack shot, an approved ad creative, anything already signed off — because this re-renders the frame; use the free `change-image-ar-browser` action for those. Do not use for video, which is flora-video-resize, and do not use to place finished artwork into a scene, which is flora-mockup-deck.
npx claudepluginhub florafauna-ai/flora-mcp-skills --plugin flora-mcp-skillsOther plugins' skills for the same job