为Claude Code及其他编码代理提供AI图像和视频生成技能——Gemini、OpenAI和Kie AI支持一个CLI和MCP服务器,内容标记符合欧盟AI法案。
概览
给你的代理提供图像和视频生成能力——一项技能,一次安装,无需学习API。 大致说出你想说的,让它来决定剩下的: 它完整写出了提示词,知道21:9规则排除OpenAI,并读取了从--json回溯的路径。 它在看到目标最终落脚位置后,第二次标记——并将标签贴在平坦的屋顶线上,而不是装卸区上方。 CLI 可以用文字请求——提供者、型号、宽高比、大小、输出名称和目录、质量预设、视频时长、需编辑的输入图像,以及是否标记结果。说出任一,代理按规定使用;省略后自动选择,或退回到你配置的配置。 这就是整个安装过程。—— 技能通过 npx 运行 CLI,NPX 在首次使用时获取并缓存。
概述(AI 翻译)
为你的经纪人提供图片和视频生成功能,涵盖Google Gemini、OpenAI 还有Kie AI——一项技能,一项安装,无需学习API。
大致说出你想说的,让它来决定剩下的:
它完整写出了提示,知道21:9规则排除OpenAI,并阅读了路径
从--json返回。
或者精确,它就不再做决定:
它在看到目标最终落脚的位置后,又做了第二次标记——然后放下 标签在平坦的车顶线上,而不是装卸区上方。
CLI接收的任何内容都可以用文字请求——提供者、模型、方面 比例、大小、输出名和目录、质量预设、视频时长、一个 输入图片编辑,以及是否标记结果。命名任意一个,以及 代理按既定方式使用;不加它,它选择,或者退回到你 配置好。
安装
这就是整个安装过程。没有其他需要设置的了——这项技能运行
通过 npx 进行 CLI,首次使用时获取数据并缓存。
然后给它一个密钥:
交互式向导:选择提供者,输入每个密钥而不被回放, 每个模型与实时API进行验证,为每个提供者选择模型,并设置 默认。一把钥匙就足够开始。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
mediagen — an image and video generation skill for coding agents
Give your agent image and video generation across Google Gemini, OpenAI and Kie AI — one skill, one install, no API to learn.
Say roughly what you want and let it decide the rest:
You: Make a hero image for the landing page, wide, something moody and industrial.
Agent: npx -y mediagen image "A disused loading dock at dusk, wet concrete…"
--aspect-ratio 21:9 --json
→ ./output/image-20260823T094107Z.png
It wrote the prompt out in full, knew 21:9 rules OpenAI out, and read the path
back from --json.
Or be exact, and it stops deciding:
You: Same thing with gemini-3-pro-image, 21:9, 4K, marked as AI-generated,
saved as hero.png.
Agent: npx -y mediagen image "A disused loading dock at dusk, wet concrete…"
--model gemini-3-pro-image --aspect-ratio 21:9 --size 4K
--output-name hero.png --json
→ ./output/hero.jpg
[looks at the image]
npx -y mediagen mark ./output/hero.jpg --visible-label
--label-position top-right --json
→ ./output/hero.labelled.jpg
It marked in a second pass, after seeing where the subject ended up — and put the label on the flat roofline rather than over the loading bay.
Anything the CLI takes can be asked for in words — provider, model, aspect ratio, size, output name and directory, quality preset, video duration, an input image to edit, and whether to mark the result. Name any of them and the agent uses it as given; leave it out and it chooses, or falls back to what you configured.
Install
npx -y skills add Cripacx/mediagen --skill mediagen
That is the whole installation. Nothing else to set up — the skill runs the
CLI through npx, which fetches it on first use and caches it afterwards.
Then give it a key:
npx -y mediagen init
An interactive wizard: pick providers, enter each key without it being echoed, verify each against the live API, choose a model per provider, and set a default. One key is enough to start.
Now just ask your agent for an image.
What your agent can do with it
- Generate images and video from a description, or edit media you already have
- Choose the right provider for the task — the skill knows Gemini handles 21:9 and video, that OpenAI cannot do 16:9 at all, and that Kie aggregates around thirty third-party models
- Take your instructions literally when you give them. Name a model, a
ratio, a size or a filename and it is used as stated.
mediagen modelsis there when you want to see what is available before choosing
安装
npx -y mediagen mcp配置
{
"mcpServers": {
"mediagen": {
"command": "npx",
"args": ["-y", "mediagen", "mcp"],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}