image-generation
Image Generation Skill
This skill allows agents to automatically generate high-quality images (defaulting to hand-drawn style) based on user intent.
Core Features
- Smart Prompt Optimization: Transforms simple user intent into detailed hand-drawn style prompts.
- Fast Generation: Uses non-streaming interfaces to significantly speed up image generation.
- Auto-Save: Automatically downloads generated images locally and saves metadata and API responses simultaneously.
Prerequisites
Before using this skill, ensure that the DASHSCOPE_API_KEY environment variable is set:
export DASHSCOPE_API_KEY="Your API Key"
User Guide
1. Refine the Prompt
You need to refine the user's original intent into a prompt suitable for image generation. For hand-drawn versions of architecture or flowcharts, it's recommended to include keywords like "hand-drawn", "sketch", "architectural drawing", etc.
2. Run the Script
Use the following command to call the generation script:
node skills/image-generate/scripts/generate_image.js "Your detailed prompt"
3. View Results
After the script completes, it will generate the following files in the current directory:
image_YYYY-MM-DDTHH-mm-ss.png: The generated image file.metadata_YYYY-MM-DDTHH-mm-ss.json: Metadata including prompt, file size, and duration.response_YYYY-MM-DDTHH-mm-ss.json: Raw API response data (for debugging).
Example
User Intent: "Help me draw an architecture diagram of an AI coding assistant."
Recommended Prompt: "A detailed hand-drawn architectural diagram of an AI coding assistant, showing the interaction between the user, the IDE, and the LLM, technical sketch style, clean lines, white background."
Execution Command:
node skills/image-generate/scripts/generate_image.js "A detailed hand-drawn architectural diagram of an AI coding assistant, showing the interaction between the user, the IDE, and the LLM, technical sketch style, clean lines, white background."
More from qwenlm/qwen-code-examples
weixin-channel-setup
帮助用户快速配置和使用微信通道功能。当用户想要"配置微信"、"连接微信"、"设置微信机器人"、"weixin setup"、"wechat channel"时使用此技能。
86dashboard-builder
Build full-stack dashboard applications using React/Next.js + shadcn/ui + Tailwind CSS + Recharts + Express with customizable data sources. Use when creating data visualization dashboards, business intelligence interfaces, monitoring systems, KPI displays, analytics platforms, or any project requiring data visualization with modern UI components and dynamic effects.
73youtube transcript extractor
Extracts timestamped transcripts from YouTube videos for translation, summarization, and content creation.
12auto-pr
Automated PR submission assistant, including code review, documentation generation, and PR creation
10oss-styles
|
3codegraph-qa
Use CodeScope to analyze any indexed codebase via its graph database (neug) and vector index (zvec). Supports Python, JavaScript/TypeScript, C, and Java (including Hadoop-scale repositories). Covers call graphs, dependency analysis, dead code detection, hotspots, module coupling, architectural layering, commit history, change attribution, semantic code search, impact analysis, full architecture reports, and bug root cause analysis from GitHub issues. Use this skill whenever the user asks about code structure, code dependencies, who calls what, why something changed, finding similar functions, generating architecture reports, understanding module boundaries, analyzing GitHub issues/bugs, finding bug root causes, understanding why a project has many bugs, tracing bugs to code, indexing Java projects, or any question that benefits from a code knowledge graph — even if they don't mention "CodeScope" by name. If a `.codegraph` or similar index directory exists in the workspace, this skill applies.
2