Agent skill
media-generation
Generate images and videos using fal.ai models through Cloudflare AI Gateway — understand the API, craft prompts, and configure options. Use when the user mentions "generate an image", "generate a video", "create media", "AI image", "AI video", "fal.ai", "seedream", "seedance", or "media prompt".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/media-generation
SKILL.md
Media Generation
Website Foundation generates images and videos through Cloudflare AI Gateway, proxying requests to fal.ai. No API key is needed in the application code — the gateway handles authentication.
Library Functions
src/lib/media.ts exports two functions:
generateImage(env, prompt, options?)
- Model: Seedream v4.5 (ByteDance)
- Default size:
auto_2K(2048x2048) - Cost: ~$0.04 per image
- Returns: Raw
Responsefrom fal.ai withimages[].url
generateVideo(env, prompt, options?)
- Model: Seedance 1.5 Pro (ByteDance)
- Defaults: 16:9 aspect ratio, 720p, 5 seconds, with audio
- Cost: ~$0.26 per 5s video
- Returns: Raw
Responsefrom fal.ai withvideo.url
API Routes
Both require Cloudflare Access authentication:
POST /api/media/generate-image— Accepts{ prompt, imageSize? }POST /api/media/generate-video— Accepts{ prompt, aspectRatio?, resolution?, duration? }
Prompt Tips
- Be specific and descriptive — include subject, setting, lighting, style
- For text in images, Seedream supports rendered text: include
The text "..." should appear - For video, describe action and camera movement; include audio cues for sound generation
- Keep prompts under 500 characters for best results
References
- Seedream API reference — Full input/output schema for image generation
- Seedance API reference — Full input/output schema for video generation
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?