{"id":24967,"plugin_id":"plugin_asdk_app_6a3293e129088191abf0875820e839da","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:18:57.766Z","digest":"490da9d43987a1dee9bcdd69c3ab17444287f54a81e253c8e3a7ed0fe16fb984","against":5334,"payload":{"description":"Create ordered independent edits from one supplied 4-30 second video with Ad Multiplier while preserving motion, timing, audio, and untargeted text. Activate for \"ad multiplier\", \"multiply my video or ad\", or several edits of one clip that replace, add, remove, or change people, products, objects, clothing, backgrounds, attributes, or targeted text. Do not use for ordinary generation, Marketing Studio presets, simple edits, out-of-range sources, or Cartesian asset combinations.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":248},{"relative_path":"references/media-pipeline.md","size_in_bytes":5056},{"relative_path":"references/prompt-writer.md","size_in_bytes":16245}],"name":"ad-multiplier","skill_md_contents":"---\nname: ad-multiplier\ndescription: Create ordered independent edits from one supplied 4-30 second video with Ad Multiplier while preserving motion, timing, audio, and untargeted text. Activate for \"ad multiplier\", \"multiply my video or ad\", or several edits of one clip that replace, add, remove, or change people, products, objects, clothing, backgrounds, attributes, or targeted text. Do not use for ordinary generation, Marketing Studio presets, simple edits, out-of-range sources, or Cartesian asset combinations.\n---\n\n## Activation analytics\n\nWhen using this skill for a new user request, call `track_skill_activation` once with `{\"skill_name\":\"ad-multiplier\"}` at the earliest opportunity that preserves widget-first and exclusive-tool turns; defer to a later turn when required. Do not repeat for polling, retries, references, or continuation of the same request. If tracking is unavailable or fails, continue the task without retrying. Send only the skill name.\n\n# Ad Multiplier\n\nTurn one source clip into `N` ordered, independent edited videos. Analyze and\nregister the source once. One output may contain several simultaneous edits;\n`N` always counts final videos, never people, assets, operations, or takes.\n\n## OpenAI runtime contract\n\n- Use only tools exposed by the current OpenAI host and Higgsfield connector.\n  Ask one concise normal-chat question when intake is incomplete; never invent a\n  question tool.\n- For each ChatGPT attachment that must enter generation, call\n  `media_upload_and_confirm` once and reuse its confirmed `media_id` and URL.\n  This helper has a 100 MiB per-file limit. If the attachment is larger, stop\n  before paid work and ask for a compressed 4-30 second MP4, an already-confirmed\n  item identifiable through `show_medias`, or an authorized HTTPS download URL.\n- For an authorized HTTPS source URL that must become a media id, reserve a\n  video slot with `media_upload`, then use one `sandbox_exec` command to download\n  the source and PUT it to that exact `upload_url`; call `media_confirm` only\n  after HTTP 200. Match the reserved filename extension and content type to the\n  actual remote video; if they cannot be established, ask for a recognizable\n  direct download instead of inventing them. Authorized HTTPS image references\n  may be passed directly in generation `medias[].value`.\n- Run downloads, `ffprobe`, `ffmpeg`, remuxing, and QC only through\n  `sandbox_exec`, never through a client-local shell. The sandbox is ephemeral:\n  any producing call must download inputs, create and verify outputs, and PUT\n  them to previously reserved upload slots in the same command.\n- Submit independent image or video positions with `generate_image_batch` or\n  `generate_video_batch` in stable-index groups of at most six, each request\n  shaped `{index,params:{...,count:1}}`. Never fan out singleton tool calls.\n- Wait on accepted `{index,job_id}` pairs with `jobs_wait`, at most eight jobs\n  per wait and `timeout_seconds:15`, until every position is terminal. Never\n  pass a `submission_failed` row without a job id. Retry only the failed index,\n  at most once; freeze completed indices.\n- Use `show_generation_by_ids` only for generated replacement-person approval.\n  Never show raw silent Ad Multiplier edits as final deliverables. Final videos\n  are confirmed uploads after audio restoration and QC.\n- If a submission returns `unlim_choice`, no job was submitted. Ask its exact\n  question and resubmit the unchanged request with the user's `use_unlim`\n  choice; never choose for them.\n\n## Non-negotiable output contract\n\n- Accept exactly one measured source video of **4.0-30.0 seconds inclusive**.\n  Do not trim, split, loop, freeze, or clamp an out-of-range source.\n- Supported operations are replace, add, remove, attribute change, clothing\n  change, background/location change, an explicitly requested on-screen-text or\n  graphic edit, and user-timed edits. Preserve every caption, subtitle, UI\n  element, motion-design graphic, label, branding mark, and other on-screen text\n  unless the user explicitly targets it or it is physically attached to a\n  replaced target. Never automatically remove, add, or regenerate captions.\n- Keep source motion, performance, choreography, camera, cuts, lighting, pacing,\n  display aspect ratio, exact final duration, and original default audio.\n- A person replacement covers every appearance of that mapped source person,\n  including cuts, entrances, exits, occlusions, motion blur, transitions,\n  reflections, and shadows. Preserve every unmapped person.\n- A mapped person image controls the complete visible look: face, hair, skin\n  tone, build, grooming, clothing, footwear, and wearable accessories. Override\n  clothing only with a separately mapped garment/full-outfit image or an\n  explicit user wardrobe instruction.\n- Preserve output order from planning through prompts, generation, QC, and\n  delivery. Zip ordered lists. Never create a Cartesian product or a persistent\n  variant registry.\n- If each of `N` outputs replaces two people and neither has a reference, create\n  `2N` distinct adult replacement people and pair two with each output.\n- Ad Multiplier renders silently with `mode:\"video_edit\"` and\n  `generate_audio:false`; verified finals receive only the source's default\n  audio. A source with no audio produces silent finals.\n\n## Stage 1 — resolve intake once\n\nAs soon as a source is supplied, collect all still-missing fields in one turn:\n\n1. the requested edit and ordered output list or explicit `N`;\n2. whether replacement reference images exist: all, some, or none;\n3. final resolution: `720p` (recommended/faster) or `1080p`.\n\nDo not ask again for explicit information. If references are promised, wait for\nthem before paid generation. If target identity, time range, reference mapping,\nor list-to-output assignment is ambiguous, ask one bundled mapping question.\n\n## Stage 2 — register, probe, and analyze once\n\n1. Resolve one confirmed source `media_id` plus its hosted HTTPS URL. Reuse an\n   existing confirmed upload from `show_medias({type:\"video\"})` when the user\n   identifies it.\n2. Read [media-pipeline.md](references/media-pipeline.md). In one\n   `sandbox_exec`, download the trusted hosted URL and run its source probe.\n   Retain only the returned measurements; sandbox files are not durable.\n3. Reject the source before generation unless its measured duration is within\n   4.0-30.0 seconds inclusive.\n4. Call `video_analysis_create` exactly once with\n   `video_input_id:<source media_id>`, then poll that id with\n   `video_analysis_status` every 30-60 seconds until `completed` or `failed`.\n   Use completed scenes as the timed source caption. Do not start a second\n   analysis while one is pending.\n5. Retry analysis once only if it fails, has no usable scenes/timing, omits a\n   requested target, or lacks observable evidence for either required\n   casting-presentation or hairstyle axis. Stop before generation if the retry\n   remains unusable.\n\nFor every source person that will be replaced without a user reference, derive\na fictional `source_visual_casting_profile` from observable evidence only:\napparent racial/ethnic casting presentation plus hairstyle length, texture, and\nshape. These are visual casting descriptors, not claims about identity.\nStature/build is optional and non-gating. If either required axis remains\nunclear after the one retry, ask for a clearer source or both the visible source\ntrait and desired replacement trait; never guess.\n\n## Stage 3 — plan ordered outputs\n\n- Preserve explicit `N`; otherwise infer it from the ordered output list, or use\n  one for a single edit request.\n- Map edits on existing content to analysis target descriptions, a unique\n  plain-language anchor, and natural visible ranges. An `add` uses\n  caption-grounded placement and timing.\n- A person identity replacement is global. If the user asks for a partial\n  identity replacement, ask them to choose full identity replacement or a\n  non-identity attribute edit.\n- Resolve each person reference's appearance authority before prompt writing.\n  Default to `complete_look`; record a clothing override only for a separately\n  mapped garment/full-outfit reference or explicit wardrobe instruction.\n- `remove` needs no asset and describes the revealed background. `add` states\n  placement, scale, motion, and interaction. Attribute edits change only the\n  named property. A targeted text edit preserves source typography, placement,\n  animation, and timing unless the user explicitly changes them.\n- Resolve every user-dependent choice during planning. A final prompt contains\n  no branches, alternatives, placeholders, or meta-conditions.\n\n## Stage 4 — acquire replacement references\n\n### User-supplied images\n\nKeep each attachment's confirmed media id and hosted URL in one fixed order.\nAn authorized HTTPS image reference may remain an HTTPS value. The value is the\ndownstream media input; visual inspection must never change its position.\n\n### Missing adult human references — Soul 2.0\n\nUse `soul_2` only for a requested human replacement lacking a user image. It is\nnot a fallback for animals, products, objects, backgrounds, removals, attributes,\ntext edits, children, or teens.\n\n1. Load the live contract once with `models_get({model_id:\"soul_2\"})`.\n2. Make one distinct stable-index request per missing adult with\n   `generate_image_batch`; use no medias or `soul_id`, `count:1`,\n   `aspect_ratio:\"3:4\"`, and `quality:\"2k\"`.\n3. Before submission, build a positive two-axis contrast plan. The replacement\n   must have a clearly different apparent racial/ethnic casting presentation\n   and a different hairstyle length, texture, and shape. Generated people in\n   the same request must also remain visibly distinct. For a source under 20,\n   require a user reference or explicit consent to recast the role as an adult.\n4. Write one cohesive 140-190 word English paragraph per person. It must specify\n   a straight-on, eye-level, full-body portrait of exactly one adult 20+; concrete\n   positive casting and hairstyle traits; direct gaze; attractive, natural,\n   photogenic features; complete opaque stylish wardrobe and footwear; a\n   seamless matte-white studio; soft high-key lighting; professional deep-focus\n   capture; realistic anatomy, hands, limbs, and skin; no props, text, logos,\n   clutter, plastic retouching, or exaggerated traits. Include or closely\n   paraphrase `high model facial features`, `symmetrical features`,\n   `well-proportioned figure`, and `natural skin texture`. Never describe only\n   \"different\" or mention source traits in the Soul prompt.\n5. Wait through `jobs_wait`. Inspect completed results against their contrast\n   plans and quality gate. Retry only a failed-quality index once.\n6. Show all passing candidates in exact stable order with\n   `show_generation_by_ids` (split only above 24) and ask for approval. Continue\n   only after approval. Keep each approved `(job_id,result_url)`; use the job id\n   directly as the later Ad Multiplier image input without re-uploading it.\n\n## Stage 5 — write and validate one prompt per output\n\nRead [prompt-writer.md](references/prompt-writer.md) once and apply it directly.\nBuild one in-memory asset manifest per output:\n\n1. user references first as `@Image1..@ImageK`, matching exact downstream order;\n2. approved generated-person references afterward, beginning at\n   `@Image(K+1)`, with job ids in the matching later image positions.\n\nDo not write manifests or prompts to disk. Preserve each finished prompt\nbyte-for-byte after validation:\n\n- non-empty and at most 3900 characters;\n- every required image tag occurs and no undeclared tag, transport id, or URL\n  survives;\n- every requested operation is covered;\n- the exact unconditional source-text preservation block from the reference\n  occurs exactly once;\n- every person replacement transfers the approved complete look and explicitly\n  excludes the original person everywhere;\n- no unresolved condition or placeholder remains.\n\nRewrite one invalid prompt once against the same plan, then fail only that\noutput before generation.\n\n## Stage 6 — submit silent ordered edits\n\nLoad the live contract once with `models_get({model_id:\"ad_multiplier\"})`. For\neach output, send the source video first, followed by image inputs in the exact\nmanifest order:\n\n```json\n{\"requests\":[{\"index\":0,\"params\":{\"model\":\"ad_multiplier\",\"prompt\":\"<validated prompt verbatim>\",\"count\":1,\"duration\":8,\"duration_policy\":\"strict\",\"aspect_ratio\":\"auto\",\"resolution\":\"720p\",\"mode\":\"video_edit\",\"generate_audio\":false,\"medias\":[{\"value\":\"<source media id>\",\"role\":\"video\"},{\"value\":\"<@Image1 media id, job id, or authorized HTTPS URL>\",\"role\":\"image\"}]}}]}\n```\n\nUse `ceil(SOURCE_DURATION)`, not the illustrative duration. Use the chosen\nresolution. Split ordered requests into `generate_video_batch` groups of at most\nsix, retain every accepted job id under its stable output index, and wait each\ngroup with `jobs_wait`. Retry only a rejected or terminal-failed index once with\nthe same approved identity, prompt, and scope. Never retry a pending index.\n\nDo not call `show_generation_by_ids`, `job_display`, or history tools for these\nraw edits. Keep each completed trusted HTTPS `result_url` only for Stage 7. If\nsome outputs remain pending, report them and never duplicate their jobs.\n\n## Stage 7 — restore audio, verify, upload, and deliver\n\nNever deliver raw silent result URLs. Process at most four completed outputs per\nsandbox call:\n\n1. Read [media-pipeline.md](references/media-pipeline.md).\n2. Reserve one final MP4 slot per output with `media_upload` before the sandbox\n   call.\n3. In one self-contained `sandbox_exec`, download the immutable source and raw\n   results, extract the source's default audio once, trim/remux every result,\n   run all duration/aspect/resolution/audio gates, and PUT each passing final to\n   its own exact reserved `upload_url`.\n4. Call `media_confirm` only for outputs whose PUT returned HTTP 200.\n\nDeliver only confirmed final upload URLs in original order, labeled `Output 1`,\n`Output 2`, and so on. State `completed/total`, concise failed and pending\ncounts, selected resolution, measured source duration, and whether source audio\nwas restored or the source was silent. Never expose raw edit URLs, generated\nperson references, prompts, manifests, local paths, or job/media ids as\ndeliverables.\n\n## Failure boundaries\n\n| Failure | Required response |\n| --- | --- |\n| Source outside 4-30s | Stop; report measured duration and accepted range |\n| Attachment exceeds 100 MiB | Stop; request compression, confirmed media, or authorized HTTPS URL |\n| Source upload/probe fails | Retry once when safe; otherwise stop before spend |\n| Analysis invalid twice | Stop before generation |\n| Ambiguous mapping | Ask one bundled mapping question |\n| Generated-person position fails twice | Fail each dependent whole output or stop |\n| User rejects generated people | Regenerate named people or stop |\n| Prompt validation fails twice | Fail only that output before generation |\n| Ad Multiplier position fails | Retry only that position once |\n| Source is silent | Produce a silent verified final |\n| Audible source extraction fails | Do not deliver a silent substitute |\n| Download/remux/QC/upload fails | Isolate that output; keep verified successes |\n| Some outputs remain pending | Report pending; never duplicate them |\n"},"changes":[{"path":"/included_files","type":"changed","before":[{"relative_path":"references/media-pipeline.md","size_in_bytes":5056},{"relative_path":"references/prompt-writer.md","size_in_bytes":16245}],"after":[{"relative_path":"agents/openai.yaml","size_in_bytes":248},{"relative_path":"references/media-pipeline.md","size_in_bytes":5056},{"relative_path":"references/prompt-writer.md","size_in_bytes":16245}]}],"summary":"Fields changed: 1. /included_files.","summary_kind":"deterministic","summary_metadata":{}}