mk:multimodal
Analyses and generates images, video, audio and PDFs with Gemini, MiniMax and OpenRouter, and converts documents to markdown.
| Source | .claude/skills/multimodal/SKILL.md |
| Owner | utility |
| Runtime | claude-code |
| Risk | medium |
| Phase | on-demand |
What it does
Analyses and generates media. It describes, transcribes and extracts from images, video, audio and PDFs with Gemini, converts documents to markdown, and generates images, video, speech and music. Reach for it when a task points at a .png, .jpg, .mp4, .mp3, .pdf or .docx file, or asks to generate media.
When not to use
Plain text files need no skill, so use Read. For Gemini API documentation use mk:docs-finder. To render an HTML or CSS animation to MP4 use mk:html-video. Do not call it for an image that is already described in context.
Usage
All scripts run from the project root as node .claude/hooks/lib/skill-python.cjs .claude/skills/multimodal/scripts/<script>.
| Script | Arguments |
|---|---|
gemini_analyze.py | --files <path> --task <analyze|transcribe|extract> [--resolution low-res] [--json] [--verbose] |
gemini_generate.py | --task <generate-image|generate-video> --prompt "..." [--provider gemini|minimax|openrouter] [--json] |
minimax_generate.py | --task <generate-image|generate-video|generate-speech|generate-music> --prompt "..." [--json] |
document_converter.py | --files doc.pdf --output ./docs/ [--json] [--verbose] |
check_setup.py | No arguments. Checks keys and dependencies. |
If you see python3: command not found or import errors, run mewkit skill env multimodal once from the project root.
Examples: "describe this screenshot", "transcribe ./recordings/standup.mp3 and list decisions and action items", "convert report.pdf to markdown", "generate a hero image", "generate narration".
Keys
| Variable | Required | Use |
|---|---|---|
MEOWKIT_GEMINI_API_KEY (or legacy GEMINI_API_KEY) | For analysis | Gemini analysis and generation |
MEOWKIT_MINIMAX_API_KEY | No | MiniMax image, video, speech and music |
MEOWKIT_OPENROUTER_API_KEY | No | Image generation fallback |
Without a Gemini key analysis fails and generation uses MiniMax or OpenRouter if their keys exist. With no key at all the skill stops with setup instructions. Extra Gemini keys MEOWKIT_GEMINI_API_KEY_2/3/4 rotate on a 429.
Steps
Analysis: detect the format, pick a model (default gemini-2.5-flash), run gemini_analyze.py. Files over 20 MB use the File API. Use --resolution low-res for video to save about 62% of tokens. Output is capped near 3000 tokens, and structured JSON or markdown is preferred.
Generation: a provider router picks the first provider whose key exists.
| Output | Chain |
|---|---|
| Image | Gemini, MiniMax, OpenRouter |
| Video | Gemini, MiniMax |
| Speech and music | MiniMax only |
Set the chain with MEOWKIT_IMAGE_PROVIDER_CHAIN and similar variables. Model IDs and prices change, so read references/models-and-pricing.md and check preview IDs against the provider dashboard.
The other references are vision-understanding.md, audio-processing.md, video-analysis.md, image-generation.md, video-generation.md, minimax-generation.md and document-conversion.md.
Gotchas
| Trap | Detail |
|---|---|
| Audio over 15 minutes | Gemini truncates silently. Split first. |
| PDF over 100 pages | Quality drops. Process in 20-page chunks. |
| Video cost | About 263 tokens per second at default resolution. --verbose prints an estimate. |
| Image generation on the free tier | It needs billing. Use MiniMax or OpenRouter. |
| MiniMax video | Hailuo takes 60 to 180 seconds, with a 600 second timeout. |
| Temperature | Keep Gemini at 1.0, since lowering it degrades output. |