| "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".
npx skills add https://github.com/joeseesun/qiaomu-cut-skill --skill image-gen
/podcast, /speech)/explainer)/content-parser)Generate AI images using the ListenHub CLI. Supports text prompts with optional reference images (local files or URLs), multiple resolutions, and aspect ratios. Images are saved as local files.
shared/cli-authentication.mdshared/cli-patterns.md for command execution and error handlingshared/config-pattern.md before any interaction.listenhub/image-gen/YYYY-MM-DD-{jobId}/ — never ~/Downloads/<HARD-GATE>
Use the AskUserQuestion tool for every multiple-choice step — do NOT print options as plain text. Ask one question at a time. Wait for the user's answer before proceeding to the next step. After all parameters are collected, summarize the choices and ask the user to confirm. Do NOT call the image generation command until the user has explicitly confirmed.
</HARD-GATE>
Follow shared/cli-authentication.md § Auth Check. If CLI is not installed or not logged in, auto-install and auto-login — never ask the user to run commands manually.
Then follow shared/cli-authentication.md § Auth Mode Detection to determine AUTH_MODE and set:
if [ "$AUTH_MODE" = "openapi" ]; then
CMD_PREFIX="listenhub openapi image"
else
CMD_PREFIX="listenhub image"
fi
All subsequent CLI calls use $CMD_PREFIX instead of hardcoded listenhub image.
Follow shared/config-pattern.md Step 0 (Zero-Question Boot).
If file doesn't exist — silently create with defaults and proceed:
mkdir -p ".listenhub/image-gen"
echo '{"outputDir":".listenhub","outputMode":"inline"}' > ".listenhub/image-gen/config.json"
CONFIG_PATH=".listenhub/image-gen/config.json"
CONFIG=$(cat "$CONFIG_PATH")
Do NOT ask any setup questions. Proceed directly to the Interaction Flow.
If file exists — read config silently and proceed:
CONFIG_PATH=".listenhub/image-gen/config.json"
[ ! -f "$CONFIG_PATH" ] && CONFIG_PATH="$HOME/.listenhub/image-gen/config.json"
CONFIG=$(cat "$CONFIG_PATH")
Only run when the user explicitly asks to reconfigure. Display current settings:
当前配置 (image-gen):
输出方式:{inline / download / both}
Then ask:
shared/output-mode.md § Setup Flow Question.Save immediately:
NEW_CONFIG=$(echo "$CONFIG" | jq --arg m "$OUTPUT_MODE" '. + {"outputMode": $m}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"
CONFIG=$(cat "$CONFIG_PATH")
Free text input. Ask the user:
> Describe the image you want to generate.
If the prompt is very short (< 10 words) and the user hasn't asked for verbatim generation, offer to help enrich the prompt. Otherwise, use as-is.
Ask:
Question: "Which model?"
Options:
- "pro (recommended)" — gemini-3-pro-image, higher quality
- "flash" — gemini-3.1-flash-image, faster and cheaper, unlocks extreme aspect ratios (1:4, 4:1, 1:8, 8:1)
Ask both together (independent parameters):
Question: "What resolution?"
Options:
- "1K" — Standard quality
- "2K (recommended)" — High quality, good balance
- "4K" — Ultra high quality, slower generation
Question: "What aspect ratio?"
Options (all models):
- "16:9" — Landscape, widescreen
- "1:1" — Square
- "9:16" — Portrait, phone screen
- "Other" — 2:3, 3:2, 3:4, 4:3, 21:9
If flash model was selected, also offer: 1:4 (narrow portrait), 4:1 (wide landscape), 1:8 (extreme portrait), 8:1 (panoramic)
Question: "Any reference images for style guidance?"
Options:
- "Yes" — Provide file paths or URLs
- "No references" — Generate from prompt only
If yes: Collect reference image paths or URLs (comma-separated). The CLI handles both local files and URLs natively — no need to distinguish between them.
Each reference will be passed as a --reference flag to the CLI.
Summarize all choices:
Ready to generate image:
Prompt: {prompt text}
Model: {pro / flash}
Resolution: {1K / 2K / 4K}
Aspect ratio: {ratio}
References: {yes — N image(s) / no}
Proceed?
Wait for explicit confirmation before running the CLI command.
$CMD_PREFIX create command with all collected parameters.run_in_background: true and timeout: 180000: $CMD_PREFIX create \
--prompt "{description}" \
--model "{model}" \
--lang "{lang}" \
--aspect-ratio {16:9|9:16|1:1} \
--size {1K|2K|4K} \
--json
If reference images were provided, add --reference for each:
$CMD_PREFIX create \
--prompt "{description}" \
--model "{model}" \
--lang "{lang}" \
--aspect-ratio 16:9 \
--size 2K \
--reference ./sketch.png \
--reference ./photo.jpg \
--json
The --lang flag provides a language hint for the prompt. Detect from the user's prompt language (e.g., Chinese prompt → zh, English prompt → en).
Read OUTPUT_MODE from config. Follow shared/output-mode.md for behavior.
Parse the CLI JSON output to extract the image URL:
IMAGE_URL=$(echo "$RESULT" | jq -r '.imageUrl')
inline or both: Download to a temp file, then use the Read tool.
JOB_ID=$(date +%s)
listenhub download "$IMAGE_URL" -o /tmp/image-gen-${JOB_ID}.jpg
Then use the Read tool on /tmp/image-gen-{jobId}.jpg. The image displays inline in the conversation.
Present:
图片已生成!
download or both: Save to the artifact directory.
JOB_ID=$(date +%s)
DATE=$(date +%Y-%m-%d)
JOB_DIR=".listenhub/image-gen/${DATE}-${JOB_ID}"
mkdir -p "$JOB_DIR"
listenhub download "$IMAGE_URL" -o "${JOB_DIR}/${JOB_ID}.jpg"
Present:
图片已生成!
已保存到 .listenhub/image-gen/{YYYY-MM-DD}-{jobId}/:
{jobId}.jpg
Default: Pass the user's prompt directly without modification.
When to offer optimization:
When to never modify:
Optimization techniques (if user agrees):
shared/cli-authentication.mdshared/cli-patterns.mdshared/config-pattern.mdshared/output-mode.mdUser: "Generate an image: cyberpunk city at night"
Agent workflow:
$CMD_PREFIX create \
--prompt "cyberpunk city at night" \
--model "gemini-3-pro-image" \
--lang en \
--aspect-ratio 16:9 \
--size 2K \
--json
Parse CLI JSON output per outputMode (see shared/output-mode.md).
User: "Generate an image in this style" (provides local files and a URL)
Agent workflow:
/path/to/style-reference.png, https://example.com/photo.jpg$CMD_PREFIX create \
--prompt "a serene mountain lake at dawn" \
--model "gemini-3-pro-image" \
--lang en \
--aspect-ratio 16:9 \
--size 2K \
--reference /path/to/style-reference.png \
--reference https://example.com/photo.jpg \
--json
Parse CLI JSON output per outputMode (see shared/output-mode.md).
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Improves the quality of images, especially screenshots, by enhancing resolution, sharpness, and clarity. Perfect for preparing images for presentations, documentation, or social media posts.
Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.
Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
Microscopy data management platform. Access images via Python, retrieve datasets, analyze pixels, manage ROIs/annotations, batch processing, for high-content screening and microscopy workflows.
Python library for working with DICOM (Digital Imaging and Communications in Medicine) files. Use this skill when reading, writing, or modifying medical imaging data in DICOM format, extracting pixel data from medical images (CT, MRI, X-ray, ultrasound), anonymizing DICOM files, working with DICOM metadata and tags, converting DICOM images to other formats, handling compressed DICOM data, or processing medical imaging datasets. Applies to tasks involving medical image analysis, PACS systems, radiology workflows, and healthcare imaging applications.
This skill should be used when working with pre-trained transformer models for natural language processing, computer vision, audio, or multimodal tasks. Use for text generation, classification, question answering, translation, summarization, image classification, object detection, speech recognition, and fine-tuning models on custom datasets.
Take joeseesun/image-gen from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.