From agentic-ai-skills
Generates images with ERNIE Image via configurable YAML endpoints for cloud or local services. Use for Chinese-first text-to-image, multilingual/long/multi-region text rendering, portable configs without code changes.
npx claudepluginhub agenticaiplan/agenticaiskills --plugin agentic-ai-skillsThis skill uses the workspace's default tool permissions.
使用 ERNIE Image 做文生图,默认走**服务调用模式**,并支持切换到兼容原生 `/generate` 接口的模式。这个 skill 适合:
agents/openai.yamlassets/cloud-config.portable.cn.yamlassets/cloud-config.portable.yamlassets/ernie-image-gen.example.yamlassets/local-config.portable.cn.yamlreferences/local-deploy.mdreferences/portable-usage.mdreferences/prompting.mdreferences/service-config-and-api.mdscripts/__init__.pyscripts/common.pyscripts/generate_image.pyscripts/health_check.pyscripts/validate_config.pyDeprecated (use baoyu-imagine): Generates AI images using OpenAI, Azure OpenAI, Google, OpenRouter, DashScope, GLM-Image, MiniMax, Jimeng, Seedream, Replicate APIs. Supports text-to-image, references, ratios, batch from prompts. For generate/create/draw requests.
Generates and edits images using fal.ai nano-banana-pro model via Bash scripts. Supports text rendering in Cyrillic/CJK, infographics, complex compositions, and reference image editing.
Generates images from text, edits images with references, performs product placement, style transfer, and multi-image composition using OpenAI DALL-E or Google Gemini.
Share bugs, ideas, or general feedback.
使用 ERNIE Image 做文生图,默认走服务调用模式,并支持切换到兼容原生 /generate 接口的模式。这个 skill 适合:
model_dir / weight_tar_path 等部署上下文,但不希望写死本机路径这个 skill 的默认行为是:
assets/cloud-config.portable.cn.yamlopenai_compatiblebase_url、auth_token_env、modehealth_check.py,再生成assets/local-config.portable.cn.yaml无论是在另一台电脑、另一个项目,还是分享给别人用,优先检查这 5 项:
base_url
auth_token_env
ERNIE_IMAGE_API_KEYmode
openai_compatiblenative_generateoutput.artifact_dir
${ERNIE_IMAGE_ARTIFACT_DIR:-./achievement}weight_tar_path
推荐直接从这两个模板开始:
assets/cloud-config.portable.yamlassets/cloud-config.portable.cn.yamlassets/local-config.portable.cn.yaml如果你只是普通云端调用,最常用的动作其实只有两步:
export ERNIE_IMAGE_API_KEY='你的key'
python3 scripts/generate_image.py --config assets/cloud-config.portable.cn.yaml --prompt '一只可爱的橘猫表情包'
assets/cloud-config.portable.cn.yamlassets/cloud-config.portable.yamlmode: openai_compatible 或 native_generatebase_urlauth_token_envmodel_dir(通常不用改)weight_tar_path(可留空,或用环境变量占位)output.artifact_dir(推荐相对路径或环境变量)python3 scripts/health_check.py \
--config assets/cloud-config.portable.cn.yaml
python3 scripts/generate_image.py \
--config assets/cloud-config.portable.cn.yaml \
--prompt "一只戴宇航员头盔的橘猫,电影感打光,超高细节"
assets/local-config.portable.cn.yamlbase_urlmodemodel_dirweight_tar_pathoutput.artifact_dirpython3 scripts/health_check.py \
--config assets/local-config.portable.cn.yaml
python3 scripts/generate_image.py \
--config assets/local-config.portable.cn.yaml \
--prompt "一只戴宇航员头盔的橘猫,电影感打光,超高细节"
更详细的跨机器/跨项目使用方式见:
references/portable-usage.mdopenai_compatible优先调用:
GET /healthPOST /v1/images/generations适合:
size / response_formatnative_generate调用:
GET /healthPOST /generate适合:
ernie-image-siliconflow 原生接口height / width / num_inference_steps / guidance_scaleseedwidthheightnum_inference_stepsguidance_scale详细模板见:
references/prompting.mdoutput.artifact_dir统一配置文件为 YAML,核心字段:
modebase_urlmodelauth_token_envopenai_pathnative_pathhealth_pathmodel_dirweight_tar_pathdefaults.widthdefaults.heightdefaults.num_inference_stepsdefaults.guidance_scaledefaults.response_formatoutput.artifact_diroutput.save_metadata跨机器复用建议:
weight_tar_path 推荐写成 ${ERNIE_IMAGE_WEIGHT_TAR_PATH:-}output.artifact_dir 推荐写成 ${ERNIE_IMAGE_ARTIFACT_DIR:-./achievement} 或项目内相对目录artifact_dir 会相对配置文件所在目录解析字段说明见:
references/service-config-and-api.mdreferences/portable-usage.md如果你要直接适配你自己的本地部署项目、容器服务或云函数服务,也可以继续用这个 skill。
skill 本身只关心接口与配置,不绑定某个固定项目目录。
注意:
部署与联调说明见:
references/local-deploy.mdscripts/validate_config.py:校验 YAML 配置scripts/health_check.py:健康检查scripts/generate_image.py:统一生成入口当需要稳定行为时,优先直接运行这些脚本,而不是让 agent 临时拼 HTTP 请求。