Token导航 LogoToken导航TokenDH.com
图像处理执行命令github未标认证来源可访问许可证需确认审计提醒

image-gen图像生成器

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

16,338

周安装

674

GitHub Stars

49

下载量

5,338
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:image-gen(图像生成器)
来源仓库:https://github.com/marswaveai/skills
仓库路径:skills/image-gen
安装命令:
npx skills add https://github.com/marswaveai/skills --skill image-gen
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/marswaveai/skills --skill image-gen

简介

image-gen 用于辅助图像生成、图片编辑和视觉素材处理。

  • 适合根据文本生成图片、处理背景或整理视觉提示词。
  • 使用时需确认输入图片、版权来源、输出格式和模型限制。
  • 涉及人物、品牌或公开展示素材时,应核对授权和合规边界。
  • image-gen 属于图像处理类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

When to Use

  • User wants to generate an AI image from a text description
  • User says "generate image", "draw", "create picture", "配图"
  • User says "生成图片", "画一张", "AI图"
  • User needs a cover image, illustration, or concept art

When NOT to Use

  • User wants to create audio content (use /podcast, /speech)
  • User wants to create a video (use /explainer)
  • User wants to edit an existing image (not supported)
  • User wants to extract content from a URL (use /content-parser)

Purpose

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.

Hard Constraints

  • Always check CLI auth following shared/cli-authentication.md
  • Follow shared/cli-patterns.md for command execution and error handling
  • Always read config following shared/config-pattern.md before any interaction
  • Output saved to .listenhub/image-gen/YYYY-MM-DD-{jobId}/ — never ~/Downloads/

Step -1: CLI Auth Check

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.

Step 0: Config Setup

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")

Setup Flow (user-initiated reconfigure only)

Only run when the user explicitly asks to reconfigure. Display current settings:

当前配置 (image-gen):
  输出方式:{inline / download / both}

Then ask:

  1. outputMode: Follow 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")

Interaction Flow

Step 1: Image Description

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.

Step 2: Model

Ask:

Question: "Which model?"
Options:
  - "pro (recommended)" — gemini-3-pro-image-preview, higher quality
  - "flash" — gemini-3.1-flash-image-preview, faster and cheaper, unlocks extreme aspect ratios (1:4, 4:1, 1:8, 8:1)

Step 3: Resolution and Aspect Ratio

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)

Step 4: Reference Images (optional)

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.

  • Max 5 references
  • Supported formats: jpg, png, webp, gif
  • Max 10MB per file

Each reference will be passed as a --reference flag to the CLI.

Step 5: Confirm & Generate

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.

Workflow

  1. Build CLI command: Construct the listenhub image create command with all collected parameters.
  2. Execute: Run the command with run_in_background: true and timeout: 180000: listenhub image 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: listenhub image 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).
  3. Parse result and present 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

Prompt Handling

Default: Pass the user's prompt directly without modification.

When to offer optimization:

  • Prompt is very short (a few words) AND user hasn't requested verbatim
  • Ask: "Would you like help enriching the prompt with style/lighting/composition details?"

When to never modify:

  • Long, detailed, or structured prompts — treat the user as experienced
  • User says "use this prompt exactly"

Optimization techniques (if user agrees):

  • Style: "cyberpunk" → add "neon lights, futuristic, dystopian"
  • Scene: time of day, lighting, weather
  • Quality: "highly detailed", "8K quality", "cinematic composition"
  • Always use English keywords (models trained on English)
  • Show optimized prompt before submitting

API Reference

  • CLI authentication: shared/cli-authentication.md
  • CLI execution patterns: shared/cli-patterns.md
  • Config pattern: shared/config-pattern.md
  • Output mode: shared/output-mode.md

Composability

  • Invokes: nothing (direct CLI call)
  • Invoked by: platform skills for cover images (Phase 2)

Example

User: "Generate an image: cyberpunk city at night"

Agent workflow:

  1. Prompt is short → offer enrichment → user declines
  2. Ask model → "pro"
  3. Ask resolution → "2K"
  4. Ask ratio → "16:9"
  5. No references
listenhub image create \
  --prompt "cyberpunk city at night" \
  --model "gemini-3-pro-image-preview" \
  --lang en \
  --aspect-ratio 16:9 \
  --size 2K \
  --json

Parse CLI JSON output per outputMode (see shared/output-mode.md).

Example 2 — With Reference Images

User: "Generate an image in this style" (provides local files and a URL)

Agent workflow:

  1. Ask prompt → "a serene mountain lake at dawn"
  2. Ask model → "pro"
  3. Ask resolution → "2K"
  4. Ask ratio → "16:9"
  5. References → /path/to/style-reference.png, https://example.com/photo.jpg
listenhub image create \
  --prompt "a serene mountain lake at dawn" \
  --model "gemini-3-pro-image-preview" \
  --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).

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.01%
按下载量换算1,762

Claude

31.97%
按下载量换算1,707

Cursor

19.27%
按下载量换算1,029

Gemini CLI

9.72%
按下载量换算519

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/marswaveai/skills --skill image-gen 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills