skills/ai-media-generation/SKILL.md
Governs AI-assisted generation of images, video, and audio (Gemini Nano Banana Pro, FLUX, etc.) from any project, with a focus on key security and cost control. Trigger: generate an image/illustration/asset with AI, "generate an image", nano banana, gemini image, generate video, configure an image API.
npx skillsauth add fearovex/claude-config ai-media-generationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Stack-agnostic governance for generating images, video, and audio with AI providers. Security of API keys and explicit cost control come first — generation is never automatic.
Triggers: generate image/illustration/asset with AI, "generate an image", "generá una imagen", nano banana, gemini image, generate video, configure image API, AI media generation, FLUX, image model setup
The provider SDK reads the key from a process environment variable. The user stores it as a
machine-level (OS) environment variable, NOT in any file inside the repository. This is the
safest default: there is no .env to accidentally commit, and the same key works for every
project on that machine.
GEMINI_API_KEY. This is the official name @google/genai reads from
process.env.GEMINI_API_KEY by default — do NOT invent another name.GEMINI_API_KEY, value <the key>. Restart the terminal so the value is loaded.export GEMINI_API_KEY="<the key>" to ~/.zshrc or ~/.bashrc,
then source the file or open a new shell.GEMINI_API_KEY
env var with the same key. That single step is the entire setup — no repo file changes.Use the provider's official SDK (e.g. @google/genai) over a community MCP server. A community
MCP runs third-party code with your key — only acceptable if it is open-source, audited, and the
user explicitly approves it for this task. When unsure, default to the official SDK.
Generate small and curated, never in large batches. The loop:
assets/generated/), never to a temp directory.| Resolution | Approx. cost per image | |------------|------------------------| | 1K–2K | ~$0.134 | | 4K | ~$0.24 |
Always restate the current provider's pricing before a generation — these figures are a reference point, not a guarantee, and providers change pricing.
@google/genai script reading the env var// generate.mjs — run with: node generate.mjs
// Requires the GEMINI_API_KEY machine env var to be set (see Pattern 1).
import { GoogleGenAI } from "@google/genai";
import { writeFile } from "node:fs/promises";
// The SDK reads process.env.GEMINI_API_KEY automatically — do NOT hardcode the key.
const ai = new GoogleGenAI({});
if (!process.env.GEMINI_API_KEY) {
console.error("GEMINI_API_KEY is not set. Add it as a machine env var (see Pattern 1).");
process.exit(1);
}
const response = await ai.models.generateContent({
model: "gemini-2.5-flash-image", // Nano Banana Pro image model
contents: "A minimalist mountain logo, flat vector style, single accent color",
});
// Persist the returned image to a PROJECT folder, not temp.
for (const part of response.candidates[0].content.parts) {
if (part.inlineData) {
const buffer = Buffer.from(part.inlineData.data, "base64");
await writeFile("assets/generated/logo-01.png", buffer);
console.log("Saved assets/generated/logo-01.png");
}
}
.gitignore guard before writing any local key fileIf the user insists on a local file instead of a machine env var, verify .gitignore ignores it
before writing the key. Never create the file otherwise.
# Local secrets — never committed
.env
.env.local
*.local
About to generate:
- Count: 2 images
- Resolution: 2K
- Model: gemini-2.5-flash-image
- Estimated cost: 2 × ~$0.134 = ~$0.27
- Session spend so far: $0.40 → after this: ~$0.67
Approve? (waiting for explicit OK before generating)
.local
files. Verify .gitignore before writing any key to disk. Never paste a key into source code
or into chat.GEMINI_API_KEY is the canonical variable name for @google/genai. Do not rename it.business
Turns an already-investigated customer issue into a short, non-technical engineering-to-CS brief: one natural message that leads with the finding (root cause, real scope, open question), ready to paste into Slack for the support team. Trigger: /support-brief, support brief, brief for support, resumen soporte.
development
Parks the current Claude Code session before going to sleep. Analyzes the conversation, writes a handoff document to docs/handoffs/ in the current project, mirrors the same summary to engram tagged with the session ID, and prints the exact `claude --resume <id>` command for tomorrow. Zero interaction — runs end-to-end on a single invocation. Trigger: /night-park, night park, park session, me voy a dormir, guardar sesion.
testing
Interactive creator for a project feature: scaffolds the domain knowledge markdown at ai-context/features/<slug>.md AND the antenna skill at .claude/skills/<slug>/SKILL.md, both from the canonical templates. Also registers the antenna in the project's CLAUDE.md. Trigger: /feature-define <name>, define feature, documentar funcionalidad, nueva feature.
data-ai
Generates a short, non-technical, informal English summary of an already-investigated customer issue, ready to paste into Slack/email for support, CX, or ops teammates. Trigger: /customer-summary, customer summary, resumir customer issue, slack summary.