Token导航 LogoToken导航TokenDH.com
图像处理敏感数据github未标认证来源可访问许可证需确认审计通过

happy-image-gen快乐图像生成

Agent Skill

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

总安装

186

周安装

8

GitHub Stars

284

下载量

65
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/iamzhihuix/happy-claude-skills --skill happy-image-gen

简介

happy-image-gen 用于辅助图像生成、编辑和视觉素材处理,适合根据文本生成图片或整理提示词。

  • 适用于调用图像工具或处理背景素材的场景,帮助 Agent 优化视觉输出。
  • 使用时需确认输入图片、版权来源和模型限制,避免生成侵权或不合规内容。
  • 通过 GitHub 安装,支持 Codex、Claude、Cursor 和 Gemini CLI。
  • 涉及人物、品牌或公开展示素材时,应额外核对授权和真实性。

SKILL.md

happy-image-gen

Generates still images across 8 providers through one CLI: bun scripts/main.ts.... The same CLI handles text-to-image and image-to-image (reference-driven) edits.

Quick usage

bun scripts/main.ts --prompt "A calico cat on green grass, cinematic light" --ar 16:9 --image ./out.png

When to invoke this skill

Invoke this skill whenever the user:

  • Asks to generate, create, draw, render, illustrate, or synthesize an image from text.
  • Asks to restyle or transform an existing image they provide a path to.
  • Names any image-generation model (DALL·E, gpt-image, Flux, SDXL, Gemini Image, Imagen, Seedream, Kolors, Wanx, Stable Diffusion) without specifying 即梦/Dreamina/Jimeng.

Route to happy-dreamina instead when the user explicitly names 即梦, Jimeng, or the dreamina CLI.

Step 0: Preflight (BLOCKING — run before any generation)

Run these checks:

  1. Locate EXTEND.md config. Check in order: If none exist, run bun scripts/main.ts --setup and follow references/config/first-time-setup.md to create one. Do not proceed to generation until the user has at least one provider configured.

- ./.happy-skills/happy-image-gen/EXTEND.md (project) - $XDG_CONFIG_HOME/happy-skills/happy-image-gen/EXTEND.md - ~/.happy-skills/happy-image-gen/EXTEND.md (user)

  1. Verify a provider is usable. Confirm either an env var is set (e.g., OPENAI_API_KEY) or EXTEND.md references an api_key_env / api_key_source that resolves. If nothing resolves, loop back to setup.
  2. Verify Bun is available. Run command -v bun. If missing, fall back to npx -y bun scripts/main.ts....

Step 1: Choose a provider

Pick in this order of preference:

  1. --provider <id> explicitly passed by the user.
  2. The default_provider in EXTEND.md.
  3. The first provider whose API key is present in the environment. Priority when auto-detecting: openaigooglereplicatestabilityfalarkbailiansiliconflow.

See references/providers.md for each provider's required env vars, default models, and strengths (e.g., prefer google for text-in-image, replicate for Flux-family photorealism, ark for Chinese text fidelity).

Step 2: Fill in parameters

  • --prompt: the user's full request, trimmed. Always double-quote.
  • --ar: aspect ratio — 1:1 / 16:9 / 9:16 / 3:4 / 4:3. See references/aspect_ratio_map.md for how each provider interprets this.
  • --quality: draft (fastest + cheapest), hd (default), or ultra (4K-class, slower).
  • --ref <path>: repeat for multiple reference images. Not every provider supports this — see providers.md.
  • --model: override the default model for the chosen provider. Omit unless the user asked for a specific one.
  • --image <path>: REQUIRED — output file path. Use a descriptive name (e.g., ./out/hero-landscape.png).

Step 3: Run

bun scripts/main.ts \
  --prompt "..." \
  --image ./out.png \
  --provider openai \
  --ar 1:1 \
  --quality hd

On success the CLI prints the resolved absolute path and byte count. In --json mode it emits:

{ "success": true, "provider": "openai", "model": "gpt-image-1", "image": "/abs/path.png", "size_bytes": 1416341, "format": "png" }

Echo the path back to the user.

Step 4: Handle errors

  • config: No provider selected... — no API key in env and no EXTEND.md. Loop back to Step 0.
  • [openai] OpenAI images API 401... — key invalid or expired. Ask the user to refresh it.
  • [openai]... 400... content_policy_violation — prompt blocked. Show the raw error to the user; do not paraphrase.
  • Timeouts / network errors — retry once. If still failing, surface the raw message and provider so the user knows what to check.

See references/error_codes.md for a per-provider error table.

References

Read on demand:

  • references/providers.md — all 8 providers, required env vars, default models, strengths.
  • references/aspect_ratio_map.md — how each provider interprets --ar.
  • references/error_codes.md — common errors per provider and fixes.
  • references/config/first-time-setup.md — step-by-step for --setup.
  • references/config/extend-schema.md — EXTEND.md schema reference.

Template for EXTEND.md: assets/EXTEND.template.md.

适合场景

01

文本生成图片

02

图片风格化

03

产品图和创意图

04

需要 FLUX 模型时

能力概览

能力 1

调用 FLUX 图像模型

能力 2

支持文本生图和图像改写

能力 3

覆盖 LoRA 或风格适配

能力 4

适合创意视觉生成

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

平台分布

Codex

35.52%
按下载量换算23

Claude

28.08%
按下载量换算18

Cursor

18.89%
按下载量换算12

Gemini CLI

9.17%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills