baseball-trend
Use when the user asks for baseball trend or a task matching the examples below. Viral fake "ESPN behind-home-plate broadcast cutaway" of a user — broadcast-style still + 15s Kling-omni clip with native two-announcer commentary that names the user. Fixed trend: Yankees vs Red Sox ALCS Game 3 at Fenw
By pika-labs · 1,641 installs
npx skills add pika-labs/pika-plugins --skill baseball-trend
Source repository · Upstream listing
baseball trend
15 second ESPN style broadcast cutaway of a user, sitting behind home plate at a fake Yankees vs Red Sox ALCS Game 3 game at Fenway Park, with two announcers naming them on air.
Fixed recipe skill — the prompts below are calibrated. Substitute the username and keep the marked anchors intact.
Cost transparency gate
Before any paid MCP call, call identity balance({verbose: true}) once. Surface the current balance, recent burn rate, and remaining runway, then gate the run with this exact message:
Estimated cost: about 3,000 5,500 credits (~$30 $55) for the GPT image 2 broadcast still, one or two Kling v3 omni pro 15s renders (includes one Step 2 corrective retry with a changed payload), and post flight analyze media QA. This exceeds $5, so Reply proceed to continue or cancel to stop.
Do not call any paid MCP tool until the user replies proceed . If the user replies cancel , stop without generating. This is the only yes/no gate; after proceed , the pipeline runs end to end.
Voice selection note
This skill uses Kling omni's native broadcast commentary: two male announcers, matching MLB broadcast convention. The identity voice setting is NOT consumed because this fixed recipe does not use agent side TTS or custom voice IDs.
If the user wants a female coded announcer or any custom voice, baseball trend is the wrong skill. Route them to /pika:podcast with a baseball framing, which has an agent side voice path and can honor explicit voice choices.
Stage 0 — Intake
If invoked with empty args and no usable prior context, print this menu and stop:
Who should appear in the fake MLB broadcast cutaway? Required:
Name — exactly as it should appear in the chyron and announcer dialogue
Reference photo — one front facing or 3/4 portrait, local path or HTTPS URL
If only one field is missing, ask only for that field. Otherwise ask the two questions below one at a time.
1. Username (required) — used both in the broadcast chyron and in the announcers' commentary, e.g. "Jane Doe" . Save as state.username . This replaces every literal ${username} in the prompts below.
2. Reference image (required) — one front facing 3/4 portrait, good lighting, one face. Resolve to a CDN URL and save as state.reference image url :
https://… URL → use as is.
Local path → upload the file with upload asset , then use the returned public URL.
Claude Desktop, photo pasted inline → inline pastes don't reach MCP tools yet (Anthropic limitation). Reply with:
Heads up — pasted images don't reach MCP tools on Claude Desktop yet. Two options:
Paste a URL if it's already hosted somewhere — fastest.
Attach the image file so I can upload it before generation.
When a local file arrives: convert it to a public URL with upload asset and use public url .
After both answers are in, run the Cost transparency gate, then echo one short confirmation ("Generating behind home plate cutaway for {username} …") and start the pipeline. No further yes/no gates after the cost gate — the pipeline runs end to end.
Stage 0.5 — Avatar type probe for the reference image
Before any paid generate image edit or generate reference video call, run this Avatar type probe on state.reference image url . The baseball trend recipe turns the subject into a fake broadcast guest, so IP derived avatars and celebrity/public figure references are especially likely to fail moderation.
Call analyze media once:
Route from the result:
recognized IP / copyright risk STOP only when avatar type is "recognized ip" , or recognized character names a specific character (for example "Batman" ), or when both moderation risk is "high" and recommendation is "reject" . Treat recognized character: null , empty string, "none" , "unknown" , "n/a" , and low/medium moderation risk as not enough to stop by themselves. Run this check before the real/stylized routes. A chibi Batman is still Batman even when avatar type is stylized / illustrated.
real human / AI generated realistic proceed normally.
stylized / illustrated proceed with a visible warning that stylized avatars can reduce likeness quality and may be blocked by image/video moderation.
trademarked / copyrighted STOP before generation. Surface this message: Your identity avatar appears to be a trademarked character ([X]). Most video providers will moderate this and refuse to generate. Pass avatar <real looking photo url to override, or update your identity avatar at pika.me first. For this skill, ask for a replacement reference photo URL or path if the user did not pass an avatar <real looking photo url style override.
Pipeline
Two Pika MCP stages, sequential. Primary engines are locked: gpt image 2 for the still, kling v3 omni for the video. The only still stage fallback is the documented seedream pass below when OpenAI declines the broadcast still with moderation blocked .
Long running task status polling
When any long running generation call returns a task id with or without an initial status, including {task id} , {task id, status: "queued"} , or an initial queued , running , or processing status, record the task id and start time immediately.
Call task status({task id}) in a tight loop until terminal ( completed failed cancelled ). No manual sleep and no Bash polling; the worker holds each status call open.
Emit ONE visible progress line every 60s while status is queued , running , or processing : Seedance i2v queued for {N}m {S}s... still processing . Replace the provider/stage label when polling GPT image 2 or Kling tasks.
On completed , unwrap the returned result URL and continue.
On failed or cancelled , surface failure to the user with task id , status, and the last status message.
After 15 min total from the original submit, call task cancel({task id}) if the task is still non terminal, then surface failure to the user. If cancel reports the task is already terminal, call status once more and report that terminal result.
Do not submit a duplicate request while the original task is still queued , running , or processing .
Step 1 — Broadcast still ( generate image edit )
The chyron + scorebug get baked into the still at frame 0 (load bearing — when Kling is asked to "pop in" the chyron mid clip it appears at second 4–5 with a visible flash and breaks the trend; baking it into the first frame makes Kling treat it as pixel locked burned in UI).
Call generate image edit with:
provider : gpt image 2
images : [state.reference image url]
aspect ratio : 16:9
quality : medium (default for speed; high is now exposed but ~2 min/call — use only when fidelity matters)
output format : png
prompt (verbatim, ${username} substituted):
Save the returned URL as state.broadcast still url .
Retry budget: Step 1 still generation gets at most 3 total attempts, including the primary still, self check re rolls, invalid image retries, quality downgrades, and the one shot seedream fallback below. Track state.step1 attempt count before every paid still call.
OpenAI moderation fallback : if the Step 1 gpt image 2 call returns moderation blocked , treat it as a known policy surface for "real person + ESPN branded live feed + real MLB team context." Do not keep re rolling the same OpenAI call. Try seedream once with the same images , aspect ratio , and prompt text, omitting quality and output format because those are gpt image 2 only fields.
If seedream succeeds, save that URL as state.broadcast still url , set state.broadcast still provider = "seedream fallback" , and continue to the self check below. The fallback is one shot: do not call gpt image 2 again and do not call seedream a second time in this run.
If seedream also fails or returns a policy/safety block, stop and surface this exact user facing message:
OpenAI declined this image. Try using a fresh AI generated headshot instead of a personal photo, or pick a non MLB sport variant.
Agent side self check before Step 2 : the chyron must spell the username correctly and the scorebug must look like real broadcast UI. If either looks wrong after the primary gpt image 2 still, re roll Step 1 once per failed self check while the Step 1 cap has attempts remaining (everything downstream pixel locks to this frame). If either looks wrong after state.broadcast still provider = "seedream fallback" , do not re roll Step 1; stop and ask the user for a fresh AI generated headshot or a non MLB sport variant using the same message above. This is the agent's own check — do not ask the user unless the one shot fallback path has already failed QA. After either cap is exhausted, stop and ask for a better reference photo or permission to deliver the best attempt; include the best still/video URL and the failing check.
Step 2 — 15s broadcast video ( generate reference video )
image types: ["first frame"] locks state.broadcast still url as Kling's literal frame 0, keeping the chyron + scorebug pixel static for the full 15s.
Call generate reference video with:
provider : kling
kling model : kling v3 omni
duration : 15
aspect ratio : 16:9
quality mode : pro
reference images : [state.broadcast still url]
image types : ["first frame"]
sound : true
prompt adherence : strict (load bearing — without it the scorebug animates and identity drifts late in the clip)
negative prompt (verbatim, load bearing — without these entries Kling occasionally morphs the scorebug or fades the chyron) :
prompt (verbatim, ${username} substituted everywhere; pre trimmed to fit Kling's 2500 char cap; chyron on frame 0 lock at top):
Save the returned video URL as state.broadcast video url . If generation completes asynchronously, follow the MCP tool's returned status handle until the video reaches a terminal state.
Step 2 Kling video generation gets at most 2 total attempts (initial render + one corrective retry for drift, scorebug/chyron movement, or announcer mispronunciation). kling v3 omni has no seed, and identical Kling payloads can resolve to the same job/asset. Do not submit an identical Kling payload just to seek variation. Before the corrective retry, materially change the payload by using an updated state.broadcast still url , restoring missing strict params / negative prompt entries, or shortening / clarifying the A/B announcer block. Track state.step2 attempt count . After either cap is exhausted, stop and ask for a better reference photo or permission to deliver the best attempt; include the best still/video URL and the failing check.
Step 3 — Deliver
Return both Pika CDN URLs: the still image URL and the final video URL. If the host client requires local media markers, create the local preview outside this skill after confirming both CDN URLs are reachable.
One line summary: "Behind home plate cutaway for {username} — 15s, 16:9, 1080p, Kling v3 omni, native two announcer commentary."
Post flight quality gate
Before declaring success, call analyze media on state.broadcast video url and ask for a structured verdict:
If announcer count < 2 , treat the result as at least degraded , include audio warning , and use the one Step 2 corrective retry only after changing the A/B audio payload. Do not submit an identical Kling payload.
If verdict is clean , return the still URL and final video URL normally.
If verdict is degraded , return the URLs plus the quality warning and audio warning so the user can review before publishing.
If verdict is catastrophic , do not call the run complete; surface the verdict and re roll suggestion instead of declaring success.
Load bearing phrases (don't strip these)
These are empirical behavior dependencies, not writing style — removi