Install any skill in seconds. Free to start, no credit card required.
Get Started Free →AI image generation with OpenAI, Google, DashScope and Canghe APIs. Supports text-to-image, reference images, aspect ratios. Sequential by default; parallel generation available on request. Use when user asks to generate, create, or draw images.
.claude/skills/freestylefly-canghe-image-gen/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 107% | 0% |
| case-21 | ✗→✓ | ▲ Improved | 196% | 0% |
| case-23 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 201% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 28% | 0% |
Official API-based image generation. Supports OpenAI, Google, DashScope (阿里通义万象), and Canghe providers.
Agent Execution:
SKILL_DIR = this SKILL.md file's directory${SKILL_DIR}/scripts/main.tsUse Bash to check EXTEND.md existence (priority order):
bash# Check project-level first test -f .canghe-skills/canghe-image-gen/EXTEND.md && echo "project" # Then user-level (cross-platform: $HOME works on macOS/Linux/WSL) test -f "$HOME/.canghe-skills/canghe-image-gen/EXTEND.md" && echo "user"
┌──────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────┼───────────────────┤ │ .canghe-skills/canghe-image-gen/EXTEND.md │ Project directory │ ├──────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.canghe-skills/canghe-image-gen/EXTEND.md │ User home │ └──────────────────────────────────────────────────┴───────────────────┘
┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
EXTEND.md Supports: Default provider | Default quality | Default aspect ratio | Default image size | Default models
Schema: references/config/preferences-schema.md
bash# Basic npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image cat.png # With aspect ratio npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A landscape" --image out.png --ar 16:9 # High quality npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image out.png --quality 2k # From prompt files npx -y bun ${SKILL_DIR}/scripts/main.ts --promptfiles system.md content.md --image out.png # With reference images (Google multimodal or OpenAI edits) npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Make blue" --image out.png --ref source.png # With reference images (explicit provider/model) npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "Make blue" --image out.png --provider google --model gemini-3-pro-image-preview --ref source.png # Specific provider npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "A cat" --image out.png --provider openai # DashScope (阿里通义万象) npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "一只可爱的猫" --image out.png --provider dashscope # Canghe third-party gateway npx -y bun ${SKILL_DIR}/scripts/main.ts --prompt "一只可爱的猫" --image out.png --provider canghe
| Option | Description | |--------|-------------| | --prompt <text>, -p | Prompt text | | --promptfiles <files...> | Read prompt from files (concatenated) | | --image <path> | Output image path (required) | | --provider google\|openai\|dashscope\|canghe | Force provider (default: google) | | --model <id>, -m | Model ID (--ref with OpenAI requires GPT Image model, e.g. gpt-image-1.5) | | --ar <ratio> | Aspect ratio (e.g., 16:9, 1:1, 4:3) | | --size <WxH> | Size (e.g., 1024x1024) | | --quality normal\|2k | Quality preset (default: 2k) | | --imageSize 1K\|2K\|4K | Image size for Google (default: from quality) | | --ref <files...> | Reference images. Supported by Google multimodal, OpenAI edits (GPT Image models), and Canghe (image_url). If provider omitted: Google first, then OpenAI, then Canghe | | --n <count> | Number of images | | --json | JSON output |
| Variable | Description | |----------|-------------| | OPENAI_API_KEY | OpenAI API key | | GOOGLE_API_KEY | Google API key | | DASHSCOPE_API_KEY | DashScope API key (阿里云) | | CANGHE_API_KEY | Canghe API key | | OPENAI_IMAGE_MODEL | OpenAI model override | | GOOGLE_IMAGE_MODEL | Google model override | | DASHSCOPE_IMAGE_MODEL | DashScope model override (default: z-image-turbo) | | CANGHE_IMAGE_MODEL | Canghe model override (default: gemini-3-pro-image-preview) | | OPENAI_BASE_URL | Custom OpenAI endpoint | | GOOGLE_BASE_URL | Custom Google endpoint | | DASHSCOPE_BASE_URL | Custom DashScope endpoint | | CANGHE_BASE_URL | Custom Canghe endpoint (default: https://api.canghe.ai/v1) |
Load Priority: CLI args > EXTEND.md > env vars > <cwd>/.canghe-skills/.env > ~/.canghe-skills/.env
--ref provided + no --provider → auto-select Google first, then OpenAI, then Canghe--provider specified → use it (if --ref, must be google or openai or canghe)| Preset | Google imageSize | OpenAI Size | Use Case | |--------|------------------|-------------|----------| | normal | 1K | 1024px | Quick previews | | 2k (default) | 2K | 2048px | Covers, illustrations, infographics |
Google imageSize: Can be overridden with --imageSize 1K|2K|4K
Supported: 1:1, 16:9, 9:16, 4:3, 3:4, 2.35:1
imageConfig.aspectRatioaspectRatio parameterDefault: Sequential generation (one image at a time). This ensures stable output and easier debugging.
Parallel Generation: Only use when user explicitly requests parallel/concurrent generation.
| Mode | When to Use | |------|-------------| | Sequential (default) | Normal usage, single images, small batches | | Parallel | User explicitly requests, large batches (10+) |
Parallel Settings (when requested):
| Setting | Value | |---------|-------| | Recommended concurrency | 4 subagents | | Max concurrency | 8 subagents | | Use case | Large batch generation when user requests parallel |
Agent Implementation (parallel mode only):
# Launch multiple generations in parallel using Task tool
# Each Task runs as background subagent with run_in_background=true
# Collect results via TaskOutput when all completeCustom configurations via EXTEND.md. See Preferences section for paths and supported options.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-18 | fail→fail | 7,221 | 8,595 | +19% | 1 | 1 | 0% | 333 | 2,393 | +619% | 0 | 0 | — |
case-19 | fail→fail | 4,724 | 6,893 | +46% | 1 | 1 | 0% | 797 | 2,273 | +185% | 0 | 0 | — |
case-01 | fail→fail | 8,370 | 7,237 | -14% | 1 | 1 | 0% | 756 | 2,461 | +226% | 0 | 0 | — |
case-02 | fail→fail | 7,198 | 6,782 | -6% | 1 | 1 | 0% | 918 | 2,277 | +148% | 0 | 0 | — |
case-03 | fail→fail | 6,057 | 8,015 | +32% | 1 | 1 | 0% | 1,199 | 2,419 | +102% | 0 | 0 | — |
case-04 | fail→fail | 13,870 | 11,532 | -17% | 1 | 1 | 0% | 2,948 | 4,273 | +45% | 0 | 0 | — |
case-05 | fail→fail | 17,221 | 7,620 | -56% | 1 | 1 | 0% | 2,892 | 3,151 | +9% | 0 | 0 | — |
case-06 | pass→pass | 4,507 | 4,157 | -8% | 1 | 1 | 0% | 914 | 2,749 | +201% | 0 | 0 | — |
case-07 | fail→pass | 6,092 | 2,244 | -63% | 1 | 1 | 0% | 1,105 | 2,288 | +107% | 0 | 0 | — |
case-08 | fail→fail | 15,395 | 6,622 | -57% | 1 | 1 | 0% | 2,248 | 2,306 | +3% | 0 | 0 | — |
case-09 | fail→fail | 5,910 | 6,973 | +18% | 1 | 1 | 0% | 785 | 2,226 | +184% | 0 | 0 | — |
case-10 | fail→fail | 10,878 | 7,077 | -35% | 1 | 1 | 0% | 799 | 2,249 | +181% | 0 | 0 | — |
case-11 | fail→fail | 13,817 | 6,454 | -53% | 1 | 1 | 0% | 669 | 2,208 | +230% | 0 | 0 | — |
case-12 | fail→fail | 17,744 | 3,656 | -79% | 1 | 1 | 0% | 2,390 | 2,567 | +7% | 0 | 0 | — |
case-13 | fail→fail | 36,054 | 15,223 | -58% | 1 | 1 | 0% | 6,166 | 2,372 | -62% | 0 | 0 | — |
case-14 | fail→fail | 14,174 | 7,305 | -48% | 1 | 1 | 0% | 2,947 | 2,258 | -23% | 0 | 0 | — |
case-15 | fail→fail | 7,342 | 7,884 | +7% | 1 | 1 | 0% | 1,639 | 2,275 | +39% | 0 | 0 | — |
case-16 | fail→fail | 34,094 | 6,397 | -81% | 1 | 1 | 0% | 6,172 | 2,376 | -62% | 0 | 0 | — |
case-17 | fail→fail | 41,479 | 7,931 | -81% | 1 | 1 | 0% | 4,614 | 2,254 | -51% | 0 | 0 | — |
case-20 | pass→pass | 10,935 | 1,837 | -83% | 1 | 1 | 0% | 1,704 | 2,182 | +28% | 0 | 0 | — |
case-21 | fail→pass | 4,937 | 1,771 | -64% | 1 | 1 | 0% | 739 | 2,185 | +196% | 0 | 0 | — |
case-22 | pass→pass | 5,319 | 1,791 | -66% | 1 | 1 | 0% | 729 | 2,180 | +199% | 0 | 0 | — |
case-23 | fail→pass | 13,137 | 1,559 | -88% | 1 | 1 | 0% | 2,051 | 2,114 | +3% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 9 counted toward the lift figure. The other 14 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +13 percentage points is the difference between those two pass rates over the 9 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.