vegetapn/writing-assistant-skill
Overview
This skill generates and edits high-quality images using AI models such as FLUX and Gemini via OpenRouter. It handles photos, illustrations, concept art, and general visual assets, saving outputs as standard image files. The tool is designed for quick generation, selective editing, and easy model selection based on quality and cost.
How this skill works
You provide a text prompt and optional input image; the skill sends the prompt and image (if provided) to an OpenRouter-supported model and returns a PNG saved locally. It supports generation and image editing modes, automatic base64 decoding of responses, and model selection between high-quality (Gemini 3 Pro, FLUX.2 Pro) and cost-efficient options. The script checks for an OpenRouter API key and returns clear errors for missing keys or API failures.
When to use it
- Create photorealistic images, illustrations, and concept art from text prompts.
- Edit an existing photo or asset by describing the desired changes.
- Produce visual assets for presentations, posters, websites, or marketing.
- Generate multiple variations by running different prompts or output paths.
- Quick prototyping of visual ideas without manual design tools.
Best practices
- Be specific in prompts and editing instructions (mention exact elements and desired style).
- Pick Gemini 3 Pro or FLUX.2 Pro for highest quality; use FLUX.2-FLEX for cheaper generation-only tasks.
- Include the input image when editing and reference elements by position (e.g., "top-left person").
- Set an explicit output filename to avoid overwriting files and to organize versions.
- Verify your OpenRouter API key is set as an environment variable or in a .env file before running.
Example use cases
- Generate a photorealistic hero image for a poster: "Laboratory setting with modern equipment, photorealistic, well-lit".
- Edit a product photo to change background color: provide the image and prompt "Make the background pure white".
- Create presentation visuals: "Abstract blue and white background with subtle molecular patterns".
- Produce concept art: "Futuristic AI brain with glowing neural networks, neon palette".
- Make scientific illustrations for papers or slides with descriptive prompts and specified output paths.
FAQ
Use google/gemini-3-pro-image-preview or black-forest-labs/flux.2-pro; both support generation and editing with high quality.
How do I provide my API key?
Set OPENROUTER_API_KEY in a .env file or export it as an environment variable; the script also accepts --api-key to override.
Which image formats are supported as input?
PNG, JPEG, GIF, and WebP are supported for editing; outputs are saved as PNG by default.
4 skills
This skill generates and edits high-quality images using OpenRouter models for photos, illustrations, concept art, and visual assets.
This skill helps you post articles or image-text to WeChat Official Account using Chrome CDP, converting Markdown to rich HTML for publication.
This skill generates Xiaohongshu infographic series in multiple styles and layouts, turning content into 1-10 cartoon infographics for easy sharing.
This skill guides you from topic to published article, guiding ideation, clarification, drafting, polishing, illustrations, and optional publication to