Guide · Agent skill
How to use the Image Generation (Qwen-Image) agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The image-gen skill lets an agent create and save images inside its sandbox. It is aimed at people who need a quick illustration or poster draft during an agent workflow, and at developers who want a working template for calling an image API from an agent. After this guide you will know what the skill does, how to install it, what it needs to run, and how to ask for images so the agent uses it.
Quick start
- 1Download the ZIP. Download the image-gen skill ZIP from this page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use or into your project's .claude/skills/ folder.
- 3Set your API key. Add SILICONFLOW_API_KEY to the environment of the agent sandbox.
- 4Confirm dependencies. Make sure Python with requests is available in the sandbox and the chat-widgets skill and present_artifacts tool are present.
- 5Ask for an image. Describe the picture, poster or illustration you want in plain language.
- 6Review the result. Check the image shown in the chat and the saved file in your project folder.
What an agent skill is and what image-gen does
An agent skill is a folder with a SKILL.md file that gives an AI agent instructions for a specific task. When your request matches the skill's description, the agent follows those instructions.
When you ask for a picture, poster or illustration, the image-gen skill has the agent write a short Python script. The script sends your description to SiliconFlow's Qwen-Image model by default, reads the image address from the response, downloads the image inside the sandbox, and saves it to your project folder. The agent then shows the image in the chat and, if you want a downloadable file, registers it as an artifact.
- Default endpoint: POST https://api.siliconflow.cn/v1/images/generations
- Default model: Qwen/Qwen-Image
- Default parameters: negative_prompt is an empty string, num_inference_steps is 20, guidance_scale is 7.5
Install the image-gen skill
Download the ZIP for this skill from this page. Then choose one of the options below.
For a personal setup, unzip the download into ~/.claude/skills/. For a single project, unzip it into the project's .claude/skills/ folder. In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills.
- Personal: unzip into ~/.claude/skills/
- Project only: unzip into <your-project>/.claude/skills/
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Set up the requirements
The skill needs a SiliconFlow account and an API key. The key must be set as the environment variable SILICONFLOW_API_KEY in the agent sandbox environment. The skill reads it there and does not rely on the backend server's environment variables.
The sandbox also needs Python with the requests library. The skill depends on two other pieces: the chat-widgets skill, which displays images in the chat, and the present_artifacts tool, which creates downloadable file cards. Without SILICONFLOW_API_KEY the skill cannot produce images, and the agent is instructed to tell you to add it.
- SiliconFlow account and API key
- SILICONFLOW_API_KEY set in the agent sandbox environment
- Python with the requests library in the sandbox
- chat-widgets skill (dependency)
- present_artifacts tool (dependency)
Trigger the skill with natural requests
You do not need a special command. Ask for an image in plain language. The skill is meant to activate when you ask to generate an image, poster, illustration or text-to-image output, or when you name Qwen-Image or another compatible image interface.
If you don't give size, style or other details, the agent is told to use reasonable defaults rather than asking you many follow-up questions. You can add detail when you want more control.
- Generate an illustration of a quiet harbour at dusk in soft watercolour style.
- Make a poster for a community bake sale, warm colours, room for a title at the top.
- Use Qwen-Image to create a flat vector icon of a bicycle for my app's about page.
- Save the image into this project's assets folder as a PNG.
Check the results and where files are saved
The agent saves the final image into the current working folder in a location that fits your project structure, unless you say where to put it. The reply should show the image in the chat. The agent is instructed not to show the temporary image address from the API as the final result.
If you need to download or keep the file, ask for a downloadable file. The agent then registers the saved path with present_artifacts so you get a file card.
- Saved as generated-image.png in the project folder in the default example script
- Final reply displays the image inline through the chat-widgets Image format
- Downloadable file card appears only when you ask for a file
output_path = workdir / "generated-image.png"Safety notes: scripts and network use
This skill runs scripts and uses the network. Your description is sent to the third-party API at api.siliconflow.cn, and the generated file's content leaves your environment for that service. Do not use it for sensitive or confidential prompts.
Generated images can be unpredictable. For final brand assets or anything that needs fully controlled output, review the result by hand. The skill also tells the agent not to call the backend MinIO upload tool; image generation and download both happen inside the sandbox.
- Prompts are sent to api.siliconflow.cn
- Do not use for confidential or sensitive content
- Review outputs before using them as final brand assets
- Image generation and download happen inside the sandbox
Use it with other compatible image models
If you name another image model or compatible interface, the agent can call it following that interface's protocol. Whatever the method, the goal is to get the image bytes or base64 data, save the file in the working folder, and then display it using the chat-widgets Image format.
The default example is a template. The agent can adapt its prompt and save location, so you can use it as a starting point for your own API calls.
What people use it for
- Drafting a poster layout for an event before a designer refines it
- Creating a quick illustration for a document or slide deck inside an agent workflow
- Generating a set of concept images that are saved directly into a project folder
- Using the script as a template for calling an image-generation API from an agent sandbox
Frequently asked questions
Is the image-gen skill free to use?
The source does not state pricing or licence terms for SiliconFlow's API. The skill itself is listed under the MIT licence. Check SiliconFlow's own terms for any costs of using its API.
What do I need to install the image-gen skill?
You need the skill ZIP from this page, a place to unzip it (~/.claude/skills/ or a project's .claude/skills/), a SiliconFlow API key set as SILICONFLOW_API_KEY in the agent sandbox, and Python with requests in the sandbox. The chat-widgets skill and present_artifacts tool are also required.
Why does the skill say it cannot generate images?
The skill cannot produce images if SILICONFLOW_API_KEY is missing from the agent sandbox environment. Add the key there, not only to your local machine or the backend server.
Does my prompt leave my computer?
Yes. The description is sent to the third-party API at api.siliconflow.cn, and the image is generated and returned by that service. Avoid confidential or sensitive prompts.
Can I use a model other than Qwen-Image?
The skill says it can work with other compatible image models or interfaces if you name them. The agent follows that interface's protocol and must end with image bytes or base64 that it saves to the project.
Why is my image not showing as a download?
The image is shown in the chat by default. A downloadable file card appears only when you ask for a file, because the agent then registers the path with present_artifacts.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use image-gen if you want quick illustration or poster drafts inside an agent workflow, already use SiliconFlow, or want a template for calling an image API from a sandbox. Pick something else if your prompts are confidential, or if you need fully controlled final brand assets without human review.
Download the skill