nanhesam/media-craft-skill
Overview
This skill integrates the obra CLI into an AI agent to generate, edit, transform, and enhance images, videos, and music. It centralizes common media workflows—text-to-image, image-to-video, upscaling, background removal, music generation, and more—under a consistent async-task pattern. Use it whenever a user requests creation or programmatic manipulation of media assets.
How this skill works
Commands are executed through the obra CLI and follow a uniform task model: submit a job, wait for JSON output, and download outputs. Prefer synchronous runs with --wait --json to receive structured results and direct output URLs; use -o <path> to save files immediately. For async use, obra returns a task ID you can poll with obra status <id> --wait --json and then retrieve with obra download <id> -o <dir>.
When to use it
- Generate images from text prompts (text-to-image) or refine an existing photo (image-to-image).
- Create or edit videos: text-to-video, image-to-video, video-to-video, motion control, or AI avatars.
- Produce music, vocals, lyrics, synchronized timestamps, or generate music videos using prior audio tasks.
- Enhance assets: upscaling, background removal, reframing/outpainting, watermark removal.
- Automate multi-step pipelines: generate an image, convert to video, then upscale or add audio.
Best practices
- Always call obra with --wait --json unless the user explicitly requests async behavior to get structured outputs.
- Use -o <path> when the user wants a local file saved immediately to avoid extra download steps.
- Write detailed, specific prompts and include parameters (aspect_ratio, seed, negative_prompt) for predictable results.
- Query obra <type> list and obra <type> info <model> to verify model capabilities and parameter names before running jobs.
- Chain tasks by capturing task IDs and output URLs from JSON to feed into subsequent steps (e.g., generate -> upscale -> music video).
Example use cases
- Create a 16:9 cyberpunk cityscape image using a specific text-to-image model and save it locally.
- Turn a product photo into a scene extension (outpaint) and remove the background for ecommerce assets.
- Generate an upbeat instrumental track, then create a synchronized music video using the music task IDs.
- Convert a smartphone clip to an anime-style video, then upscale it for presentation.
- Produce a talking-head AI avatar video from a headshot and an audio script.
FAQ
Use --wait --json by default to receive a single, structured response with output URLs and metadata. Use async mode only when you need non-blocking submission and plan to poll the task ID later.
How do I supply an input image for edits?
Pass a publicly accessible image URL via --param image_urls=<url> for image-to-image or editing models; local paths are not accepted as image_urls.