算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
generating-cartoon-videos【设计与创意】Generates a cartoon video for a product — a drawn, animated, anime, illustrated or painted spot that holds one art style and the same characters across every cut. A cartoon character presents, uses or sells the product, and the product itself is either kept exactly as photographed or drawn into the style. Use when the user wants a cartoon, animated, …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Turn a product into a drawn, animated video.
A video with no product being sold is out of scope — that belongs to generating-videos. A video that
is meant to look filmed rather than drawn belongs to generating-ad-videos, or to
generating-ugc-videos where a real creator is on camera.
Settled for every job — never ask about these, and never re-decide them: the delivered video is
9:16 unless the user explicitly asked for 16:9
analyzing-products for what the product is, how a person
physically uses it, which parts open or move, and what must stay identical wherever it appears.image_analysis on every other image supplied — what each one shows, and how it is drawn or
photographed. The product photo is already covered by analyzing-products; don't read it twice.Skip this only when the brief already settles the video. Otherwise ask rather than assume — once, bundled into a single message, always with a free-text way out.
| Ask | When |
|---|---|
| The product — a link or a photo | Neither was supplied. Offer to wait for an upload; a photographed product beats a described one. |
| How long | The brief doesn't say. Offer 10s, 20s, or 30s, and let them type their own. |
| What it should look like | The brief names no style. Offer the looks by name — flat vector, 2D cel, anime, stylized 3D, claymation, paper cutout, mono-line, isometric — and let them describe something else instead. references/look-and-style.md says what each one is. |
| The product kept as photographed, or drawn into the look | The brief doesn't say. Ask this after the look, so they know what it would be drawn into. Kept means the real photo of the product appears in the video. Drawn means it is redrawn in the cartoon style. If they don't answer, keep it as photographed. |
| What it may say about the product | The brief carries no claims. Ask what they want it to get across, and anything specific it may state. Nothing goes in the script that doesn't come from this answer. |
When the user waives questions, take 30s, a look of your choosing, the product kept as photographed and no claims beyond what the product visibly is. Say in one sentence what you took, and keep going.
Write one description and reuse it unchanged everywhere. Rephrasing it between calls reads as a different product.
Don't transcribe what is printed on it, even where the product facts spell it out. Spelling out the printing invites the model to redraw it, and redrawn text comes back warped. The facts may name it; the description never repeats it.
Where the product is drawn into the look, this description is what draws it. Where it is kept as photographed, this description is what the clips hold the photo to.
Nothing here is generated — it is all text, and it all goes to the user together at Step 7. Follow the brief exactly wherever it is specific. The rest is yours to decide. Take the sub-steps in order; each one needs the one before it.
4a. Write the style brief. Read references/look-and-style.md end to end. Pick a starting point,
write the style brief from the eight elements it sets out, then check it against what pulls a drawn look back
toward a photograph and cut anything that does. From here on, paste it into every image call word for
word — don't summarise it, and don't adapt it to whatever is being drawn.
4b. Write the story. Read references/story-craft.md. Write the whole story as one piece — what
happens, in what order, and how the product carries it — sized to the video's total length. No clips
yet; they get cut in Step 5.
4c. List the cast. Read references/cast-and-places.md. Go through the story and name what it
needs. Anything appearing more than once becomes an asset; anything appearing once gets described where
it appears.
Give each asset two things: a label, the short noun phrase it is called by everywhere afterwards, and a design, the full description that draws it. Everything from here on refers to assets by their labels, word for word.
Then count the assets — characters, places, the product where it is drawn, recurring props. That is one image each, and the count is shown to the user at Step 7 before anything renders.
Read references/clip-craft.md. gemini-omni will be used as the default model for generating the video clips.
list_video_models gives gemini-omni's shortest and longest clip. Read them
there rather than assuming. Make each clip as long as the model allows and let the leftover be the
last one. Where that leftover falls under the minimum, give the last clip the minimum anyway and let
the video run slightly over. A model taking 3 to 10 seconds gives 30s as three clips of 10, 15s as 10
and 5, and 22s as 10, 10 and 3.cast-and-places.md gives the limit and what to drop when a
clip goes over it.Trigger the writing-video-scripts skill workflow with a brief of what the voiceover should communicate,
the story from Step 4 and the clip split from Step 5 — the durations, and what happens in each clip —
heard as a voiceover over the picture, never lip-synced, and only the claims the user gave in Step 2,
used as written. None given means none made.
It returns the words as text, split one segment per clip, each sized to that clip's seconds. Nothing is voiced here.
Nothing has been generated yet, and everything after this step costs money. Get the plan approved first.
Show, written out, in one short message:
Then ask whether it's right, and say plainly that they can change any of it — the look, a character, a beat or a line. Expect edits. Rewrite what they change, show it again, and keep going until they approve.
Wait for an answer. Don't draw the style sample, don't draw an asset, don't generate a clip.
Where the user has said they don't want to be asked, say in one line what you're going with and carry on.
Only once the plan is approved. Every image in this step is drawn on nano-banana-2 at resolution
1k — it is the catalog's model for cartoon and illustration work, and it holds a character across
calls. 8a comes back before 8b starts, because 8b needs the image 8a produces.
8a. Draw the look. One image_generate call for the style sample: the style brief, what the sample
shows and what must stay out of it (references/look-and-style.md), and aspect_ratio explicitly at
the delivery ratio. Nothing else is drawn yet.
8b. Draw the cast, with the look passed in. One image_generate call with a requests list, one
object per asset, so they all render at once.
Per request:
prompt — the asset's own prompt, written in the four parts references/cast-and-places.md sets
out: how it sits in frame, then the style brief named as the exact style and pasted in word for word,
then the subject, then the tail. The style brief is the same paragraph in every request; only the
framing and the subject change.reference_images — the style sample from 8a. This is what makes the assets match each other
rather than each interpreting the brief on its own. The asset is drawn against it, never as a copy
of it.model nano-banana-2 · resolution 1k · aspect_ratio explicitly, 1:1 or the
delivery ratio for a place.Three things change per request:
An image can come back as {status: "pending", …}. That is a job handle, not a failure. Pass it to
job_status, and again if it is still pending. Never re-run a pending generation — that starts a
second billed job.
Show the style sample and every asset in one message and wait. Where the product was drawn, ask them to check it in particular. Redraw only what they change. Where the user has said they don't want to be asked, say in one line what you're going with and carry on.
One video_generate call holding one request per clip, so they all render at once. Build each prompt as
references/clip-craft.md sets out.
model gemini-omni · duration that clip's seconds from Step 5 ·
aspect_ratio the delivery ratio, explicitly on each, because it is not inherited. No resolution —
this model renders at one tier.reference_images are the assets Step 4c assigned to that clip, in the order set in
cast-and-places.md. Never the style sample. The clips are composed from the assets, which already
carry the look.{status: "pending", …}. That is a job handle, not a failure. Pass it to
job_status, and again if it is still pending. Never re-run a pending generation — that starts a
second billed job.Trigger the generating-audio skill workflow with:
Wait until every clip has finished, collecting any pending ones with job_status first. Then pass them
in order to video_stitch with the voice takes as narration, one per clip in the same order. The
voice sits at full level and the clips' own sound is ducked beneath it. Where the user supplied a music
track, pass it as music. Don't join them by hand.
Return one finished video — its URL and local file path. No part files, no loose clips.
When something is wrong, do these three things and then stop: hand back what you got, say what is wrong with it, and say what you would change to fix it. Then wait for an answer. Nothing is ever generated a second time without the user asking for it
video_stitch errors and names the clip, so the video
cannot be assembled until it is fixed. Say which line and by roughly how much, and propose the edit:
a word or two out, a modifier cut before a fact, never a faster read or a stretched clip. Re-voice
that take once they agree.video_stitch isn't available — return the clips in order and say they aren't joined.generating-images, not this skill.error: "no_provider_configured" on any tool → relay the tool's hint (the user must set their
key).references/look-and-style.md — the looks, the style brief, and the style sample.references/story-craft.md — the product as the through-line, and what holds attention.references/cast-and-places.md — characters, places, the product's two modes, and how each is drawn.references/clip-craft.md — the cuts, the camera moves, and the clip prompt.