kramme-cc-workflow/skills/kramme:visual:generate-image/SKILL.md
Generate and edit images using Google's Gemini 3 Pro Image API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:visual:generate-imageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate new images or edit existing ones using Google's Gemini 3 Pro Image API.
Arguments: "$ARGUMENTS"
Side effects: Calls Google's paid Gemini API over the network and writes a PNG to disk. Every run consumes API quota, and higher resolutions cost more.
Not for: generating diagrams, charts, or data visualizations from structured input, and not for analyzing or describing an existing image — this skill only writes image files.
Requires: uv, network access, and a Gemini API key (see the API Key section below).
Run the script by absolute path from the user's current working directory, so images save where the user is working — do not cd into the skill directory first.
Set plugin root once (works in both Claude Code and Codex):
export PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$CODEX_HOME}"
If your environment does not set either variable, replace ${PLUGIN_ROOT} in the commands below with your plugin root path manually.
Generate new image:
uv run ${PLUGIN_ROOT}/skills/kramme:visual:generate-image/scripts/generate_image.py --prompt "your image description" --filename "output-name.png" [--resolution 1K | 2K | 4K]
Edit existing image:
uv run ${PLUGIN_ROOT}/skills/kramme:visual:generate-image/scripts/generate_image.py --prompt "editing instructions" --filename "output-name.png" --input-image "path/to/input.png" [--resolution 1K | 2K | 4K]
The Gemini 3 Pro Image API supports three resolutions (uppercase K required):
Map user requests to API parameters:
1K1K2K4KEditing: when no resolution is specified, the script matches the output to the input image's dimensions (≥3000px → 4K, ≥1500px → 2K, otherwise 1K). Pass --resolution explicitly to override this and control cost.
The script reads the key from the --api-key argument first, then the GEMINI_API_KEY environment variable. Prefer the environment variable — values passed as command arguments are visible in process listings, shell history, and logs.
If GEMINI_API_KEY is already set in the environment, run the command with no key argument or prefix at all — never echo the literal key into a command when the environment variable exists.
If the key is not in the environment (e.g., the user pastes it in chat), set it as an inline prefix for the single command. This keeps the key out of ps process listings, but like any command it still appears in shell history and the session transcript:
GEMINI_API_KEY="<key>" uv run ${PLUGIN_ROOT}/skills/kramme:visual:generate-image/scripts/generate_image.py --prompt "..." --filename "..."
Use --api-key only when neither of the above is possible.
If no key is available, the script exits with an error.
Generate filenames with the pattern: yyyy-mm-dd-hh-mm-ss-name.png
Format: {timestamp}-{descriptive-name}.png
yyyy-mm-dd-hh-mm-ss (24-hour format)x9k2, a7b3)Examples:
2025-11-23-14-23-05-japanese-garden.png2025-11-23-15-30-12-sunset-mountains.png2025-11-23-16-45-33-robot.png2025-11-23-17-12-48-x9k2.pngWhen the user wants to modify an existing image:
--input-image parameter with the path to the imageFor generation: Pass user's image description as-is to --prompt. Only rework if clearly insufficient.
For editing: Pass editing instructions in --prompt (e.g., "add a rainbow in the sky", "make it look like a watercolor painting")
Preserve user's creative intent in both cases.
tools
Requires Linear MCP. Implements one Linear issue end to end, selects applicable code-review, convention, and PR-refactor gates, runs them to bounded convergence, verifies, and optionally opens the PR and iterates on CI and review feedback until green. Use when the user wants a single Linear issue taken from implementation through a clean Pull Request. Not for implementation-only work, SIW-tracked issues, stacked PRs, existing PR updates, or post-merge rollout.
development
Reviews PR and local changes for convention drift and overcaution against documented rules and mined peer-file practice. Use for new patterns, dependencies, abstractions, or defensive complexity that departs from established practice; every finding cites evidence. Supports --inline. Not for general code quality (use kramme:pr:code-review) or spec review (use kramme:siw:spec-audit --team).
testing
Charts huge or foggy initiatives into a local `.context` decision map and resolves one typed frontier ticket per session until the work is ready for SIW or another execution workflow. Use when the route to a destination cannot fit in one agent session or parallel workspaces need coordinated planning state. Not for clear specs, ordinary issue decomposition, implementation, or Linear-native tracking.
development
Investigates a question against primary sources and saves one cited Markdown artifact. Use for reading legwork: official docs/API facts, source-code or spec checks, standards, and first-party service behavior before planning or implementation. Not for making product or architecture decisions, implementing code, broad web search, secondary blog summaries, or uncited answers.