一键导入
ai-gateway
Generate text, images, and video from the CLI via the Vercel AI Gateway (one key, hundreds of models).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate text, images, and video from the CLI via the Vercel AI Gateway (one key, hundreds of models).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyze recent Claude Code sessions and report where the most tokens (and estimated cost) were burned, with data-driven tips to cut usage and avoid rate limits. Scans ~/.claude/projects session logs over a window (default last 5h, configurable), ranks the heaviest sessions and projects, breaks down cache efficiency and model spend, and renders a minimalist report — in a cmux markdown panel when cmux is available, otherwise as an ASCII summary in the terminal. Use this whenever the user wants to know where their tokens went, why they're hitting (or nearing) usage/rate limits, what their recent Claude Code activity cost, which sessions or projects are the most expensive, or how to optimize token usage. Trigger on phrases like "token burn", "where did my tokens go", "token/usage report", "what's burning tokens", "session cost", "how much have I spent on Claude", "why am I hitting rate limits", "analyze my claude sessions", "token breakdown", "/token-burn", and "/burn".
Packages the current chat (or one or more specific issues/topics) into self-contained handoff files and launches each in its own fresh `claude` session with a dedicated, meaningfully named git worktree — so work continues without manual context copy-paste. Each child claude inherits the CALLER session's permission mode (no hardcoded bypass). Requires cmux: by default each handoff opens as a new cmux workspace; with `--tabs` (or "in this/the same workspace", "as tabs") they open as tabs in the current workspace. Use when the user wants to hand off work to a fresh Claude in its own worktree instead of continuing inline. Trigger phrases: "handoff to worktree", "handoff-to-worktree", "spin this off into its own claude", "fork this into a worktree", "run it in a separate claude". No argument = handoff the whole chat (one worktree); argument(s) = one handoff/worktree per issue or topic.
Hands-free voice loop for driving Claude by voice. Combines the say skill (Gemini TTS audio out), a focus-pull back to the caller's cmux prompt, Wispr Flow dictation (voice in), and an appendix-stop listener so the user ENDS and SUBMITS each turn by saying the word appendix. When active, every reply is spoken aloud and the mic is auto-armed, so the user answers and sends without touching the keyboard. Use when the user asks for hands-free mode, to control Claude by voice, to start the voice flow, or voice mode on. Turn it off with hands-free off, stop voice mode, or stop the voice flow.
Summarize and simplify the last agent message, then speak it aloud via Gemini TTS (Vertex AI, voice Charon), in whatever language the user is using in the session. Falls back to sag/macOS say.
Align recently written or changed code so it matches the surrounding project's established conventions — formatting, naming, imports, comments, and idioms — learned from the codebase itself, then apply the fixes. Use this whenever the user wants their changes to "match the codebase / our conventions / the rest of the app", asks to make a diff or PR style-consistent, wants a style pass or style review before opening a PR, says code "feels off" or inconsistent with the project, or invokes /code-style. Works in any language or framework — it discovers the rules from the repo rather than assuming them. Reach for this even when the user doesn't say the word "style" but clearly wants new code to blend in with existing code — including trimming AI-generated over-commenting down to the codebase's own comment density.
Two-phase research workflow for Medium articles. Phase 1 discovers candidates via RSS tag feeds plus DuckDuckGo content search; Phase 2 spawns one subagent per selected article to fetch full content through the Freedium mirror (paywall bypass) and return a structured digest. Use whenever the user wants to research a topic on Medium, surface trending or recent articles, pull full text from member-only Medium posts, or build a reading list. Triggers include "/medium-research <topic>", "research medium <topic>", "medium research", "find medium articles about X", "what's trending on medium about X". The user has paid Medium membership and treats Freedium use as acceptable for personal research. Do not invoke for non-Medium research (use /last30days for cross-platform).
| name | ai-gateway |
| description | Generate text, images, and video from the CLI via the Vercel AI Gateway (one key, hundreds of models). |
| allowed-tools | ["Bash(ai-gateway:*)","Bash(npm install -g @vesely/ai-gateway-cli)","Bash(npm list -g @vesely/ai-gateway-cli)","Bash(which ai-gateway)","Read"] |
| when_to_use | Use when the user (or your own task) needs to generate text, images, or video via an AI model and prefers a quick CLI call over writing SDK code. Trigger phrases: "generate an image of...", "make an image with AI", "make a video of...", "generate a clip of...", "ask an LLM to...", "use ai-gateway to...", "draft text with AI", "summarize via CLI", "use a Vercel AI Gateway model". Examples: "Generate a hero image of a snow leopard and save it as hero.png", "Use Nano Banana to make a logo", "Make a 5-second video of waves at sunset", "Pipe this README into an LLM and get a summary". Skip when the user wants to integrate AI into source code (use the AI SDK directly), or when they need streaming UI / tool-use / multi-turn chat. |
| argument-hint | <text|image|video> <prompt> [-m model] [-o file] [-n count] [--duration s] [--aspect r] [--resolution r] |
A thin wrapper around the ai-gateway CLI (https://vercel.com/ai-gateway) for one-shot text, image, and video generation. Use it whenever a single CLI call beats writing SDK code.
xai/grok-4.1-fast-non-reasoning (cheap + capable)google/imagen-4.0-fast-generate-001xai/grok-imagine-video-m <model-id>. Browse with ai-gateway models --type image|language|video.bfl/flux-2-pro, bfl/flux-pro-1.1, openai/gpt-image-2, google/imagen-4.0-generate-001, xai/grok-imagine-image.google/gemini-2.5-flash-image (Nano Banana), google/gemini-3.1-flash-image-preview (Nano Banana 2), google/gemini-3-pro-image.anthropic/claude-opus-4.6, openai/gpt-5.4, xai/grok-4.3.xai/grok-imagine-video (cheap), bytedance/seedance-v1.0-lite-t2v, google/veo-3.1-fast-generate-001 (premium, audio), klingai/kling-v2.6-t2v.Run which ai-gateway. If missing, install: npm install -g @vesely/ai-gateway-cli.
Success criteria: which ai-gateway returns a path.
The CLI looks for the key in this order: --key flag → AI_GATEWAY_API_KEY env → ~/.config/ai-gateway-cli/config.json. If AI_GATEWAY_API_KEY is unset AND the config file is missing/empty, ask the user for it once: tell them to either export AI_GATEWAY_API_KEY=... or run ai-gateway config set key <value>. Get a key at https://vercel.com/ai-gateway.
Success criteria: ai-gateway config shows a key (masked) OR $AI_GATEWAY_API_KEY is set.
Text (streamed to stdout):
ai-gateway "<prompt>" # default model
ai-gateway -m anthropic/claude-opus-4.6 "<prompt>"
ai-gateway --json "<prompt>" # full JSON response (.text, .usage)
cat file.md | ai-gateway "<prompt>" # piped stdin is prepended as context
Image (saves to disk, prints path):
ai-gateway image "<prompt>" # ./ai-image-<timestamp>.png
ai-gateway image -o output.png "<prompt>" # custom path
ai-gateway image -n 4 "<prompt>" # 4 images, auto-suffixed
ai-gateway image -m bfl/flux-2-pro -o cover.png "<prompt>" # specific image-only model
ai-gateway image -m google/gemini-2.5-flash-image "<prompt>" # Nano Banana (auto-routed via chat completions)
Video (saves .mp4 to disk, multi-minute job — prints a spinner with elapsed time):
ai-gateway video "<prompt>" # default model, ./ai-video-<timestamp>.mp4
ai-gateway video -o clip.mp4 --duration 5 "<prompt>" # 5-second clip
ai-gateway video -m google/veo-3.1-fast-generate-001 \
--aspect 9:16 --resolution 1080p -o vertical.mp4 "<prompt>" # vertical 1080p Veo
ai-gateway video --json --duration 5 "<prompt>" # JSON with cost + elapsed
Success criteria:
Saved: <absolute path> and the file exists on disk.Saved: <absolute path> to a non-empty .mp4 (or .webm).For text: relay the model output to the user (it's already on stdout). For image: report the absolute path(s) printed by the CLI. Do not re-encode or open the file unless asked.
Success criteria: User has the answer/file path.
~/.config/ai-gateway-cli/config.json directly.n times against /v1/chat/completions since chat has no native batch — be patient with -n 4.ai-gateway models --search <substring> to discover it instead of guessing.--json to the image/video command if the user wants a human-readable result; it suppresses the friendly "Saved: ..." lines.xai/grok-4.1-fast-reasoning, anthropic/claude-opus-4.6, or openai/gpt-5.4 via -m.Unauthorized (401) → key is wrong/expired. Reset with ai-gateway config set key <value>.Not found (404). Unknown model? → run ai-gateway models --search <hint>.Model "<id>" does not support image generation → the chosen model isn't an image-only model and lacks the image-generation tag. Pick from ai-gateway models --type image or use a multimodal LLM listed above.Video generation requires a minimum balance of $10 → top up at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up before retrying.