th0rgal/sandboxed-library-template/media-creation

Claude Code and agent skill by th0rgal/sandboxed-library-template

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Creates images and video via Alibaba Wan 2.6 (DashScope), Google Gemini/Veo, and OpenAI GPT Image 1.5 APIs, plus background extraction workflows. Trigger terms: image generation, video generation, dashscope, wan 2.6, alibaba, gemini, veo, gpt image, openai images, background removal, alpha extraction, transparent png.

Install

npx vskill@latest install th0rgal/sandboxed-library-template/media-creation

SKILL.md

The same SKILL.md was published earlier as th0rgal/sandboxed-library-template/media-creation.

Use when

  • Generate images or video via Alibaba Wan, Google Gemini/Veo, or OpenAI GPT Image APIs.
  • Create transparent PNGs (prefer GPT Image 1.5 for native transparency support).
  • Convert consistent renders (3D, compositing) with different backgrounds into a transparent RGBA output.
  • Prefer Gemini for general image generation; use Wan when content is restricted (e.g., babies).

Don't use when

  • If API access or credentials are not available.
  • If the task does not involve media generation or background extraction.

Outputs

  • Generated media files in artifacts/ (PNG, WEBP, MP4, etc.) or API JSON responses when requested.

Templates or Examples

  • Use the API request examples below as templates.

Transparent Image Generation (Recommended Approach)

Option 1: GPT Image 1.5 Native Transparency (BEST)

GPT Image 1.5 supports native transparency output. This is the simplest and most reliable method:

bash
curl -X POST "https://api.openai.com/v1/images/generations" \
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-1.5",
"prompt": "A cute cartoon cat mascot",
"size": "1024x1024",
"quality": "high",
"background": "transparent",
"output_format": "png"
}'

Notes:

  • background: "transparent" requires output_format: "png" or "webp"
  • Returns base64 data in data[0].b64_json
  • This is the only method that produces TRUE transparency from a single generation
Option 2: Three-Background Extraction (For Consistent Renders Only)

⚠️ IMPORTANT LIMITATION: This workflow ONLY works when you have control over the exact pixel output:

  • ✅ 3D renders (Blender, Maya, etc.)
  • ✅ Compositing software with controlled backgrounds
  • ✅ Screenshots with different desktop backgrounds
  • ❌ Generative AI (each generation produces different results)

The algorithm requires IDENTICAL foreground pixels across all three images. Generative AI models produce different outputs even with the same prompt.

For 3D/compositing use:

bash
python3 scripts/extract_transparency.py \
--black render_black.png \
--white render_white.png \
--colored render_red.png \
--output result.png
Option 3: AI Image + Manual Background Removal

For AI-generated images that need transparency:

  1. Generate the image with any provider
  2. Use a dedicated background removal tool (rembg, remove.bg API, etc.)

Inputs the Agent Should Ask For (only if missing; otherwise proceed)

  • Provider: Alibaba Wan (DashScope), Google (Gemini/Veo), or OpenAI (GPT Image).
  • Model ID and task type (T2I, I2V, T2V).
  • Prompt text and any input image path (for I2V).
  • Output size/resolution and aspect ratio.
  • Desired output format and count.
  • For transparency: whether native transparency (GPT Image) or background extraction is needed.
  • For background extraction: paths to black/white/red background images and the colored background RGB (0-1).

API Keys

The following environment variables should be set for API access:

  • OPENAI_API_KEY - For GPT Image 1.5 generations
  • GOOGLE_GENAI_API_KEY - For Gemini image/Veo video generation
  • DASHSCOPE_API_KEY - For Alibaba Wan 2.6 image/video generation

Outputs / Definition of Done

  • A clear, credential-safe request plan or script snippet.
  • For generation: task submission, polling, and decode/download steps.
  • For background removal: algorithm steps and expected RGBA output.

Procedure

  • Use references/alibaba-wan-api.md for Wan 2.6 endpoints and parameters (image, T2V, I2V).
  • Use references/gemini-banana-api.md for Gemini image and Veo video in the Gemini API.
  • Use references/openai-gpt-image-api.md for GPT Image 1.5 endpoints and parameters.
  • Use references/background-removal-3-bg.md for the three-background alpha extraction algorithm.
  • API keys in code examples are stored encrypted using <encrypted> tags.

Model Quick Reference

ProviderModelUse Case
OpenAIgpt-image-1.5Best for transparent images, high quality
OpenAIgpt-image-1Image edits/inpainting
Googlegemini-2.5-flash-imageFast image generation
Googleveo-3.1-generate-previewVideo generation
Alibabawan2.6-t2vText-to-video
Alibabawan2.6-i2vImage-to-video
Alibabawan2.6-imageImage generation (fewer restrictions)

Checks & Guardrails

  • API keys must be wrapped in <encrypted> tags; they are encrypted at rest.
  • Validate image sizes/formats and rate limits.
  • Ensure base64 encoding formats match API expectations.
  • For transparency: verify the workflow matches the source type (render vs. AI).

References

  • references/alibaba-wan-api.md
  • references/gemini-banana-api.md
  • references/openai-gpt-image-api.md
  • references/background-removal-3-bg.md

Scripts

  • scripts/extract_transparency.py - Extract RGBA from black/white/red background images.

Usage: python3 scripts/extract_transparency.py --black img_black.png --white img_white.png --colored img_red.png --output result.png

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/th0rgal/sandboxed-library-template/media-creation/badge)](https://verified-skill.com/skills/th0rgal/sandboxed-library-template/media-creation)

Something wrong with this skill or its page? Tell us.