下载地址
https://www.zhengdianxue.com/wp-content/uploads/skills/org-hmnmm3a1--creatok-generate-image.zip将提示词发送给你的 AI 安装该 skills
请根据 https://skillhub.cn/install/skillhub.md,安装 @org-hmnmm3a1/creatok-generate-image。AI 图片生成、商品图生成和营销视觉制作工具。支持 Seedream、Nano Banana、GPT Image 等主流图片模型,输入文字描述或上传参考图,即可生成电商商品图、产品场景图、广告素材和社交媒体配图。生成结果可作为 Seedance、即梦、可灵、MiniMax H3、Gemini Omni 等视频模型的角色参考图、商品素材、场景图或视频首帧,也可搭配 LibTV、小云雀、TapNow 等 AI 创作平台继续制作短视频和商业视觉内容。
阅读全文 (展开查看完整说明)
概述
generate-image
This skill is a thin client over the creatok CLI. The CLI owns all interface detail (auth, upload, submission, polling, artifacts, error normalization). The skill expresses intent, runs CLI commands, and reads their JSON output.
Constraints
- The model's final user-facing response should match the user's input language, default English.
- Must request user confirmation before triggering any paid/high-cost image generation call.
- After confirmed, must run the
creatok imagecommand and wait until completion. - Preserve any explicit user-provided prompt verbatim. Follow
Explicit Prompt Preservationin./references/common-rules.md; generation confirmation never authorizes prompt changes. - Avoid technical wording in the user-facing reply unless the user explicitly needs details for debugging.
- Follow shared guidance in
./references/common-rules.md.
The creatok CLI
All API interaction goes through the CLI. Never call HTTP endpoints directly.
- Auth is channel-specific: stable CLI uses
CREATOK_API_KEY; preview CLI usesCREATOK_API_KEY_PREVIEW. These keys are parallel, and preview does not read or fall back toCREATOK_API_KEY. - Every command prints a single JSON envelope to stdout; human logs go to stderr.
- Envelope shape:
{ "ok", "cli_version", "command", "task_id", "status", "data", "artifacts", "update", "error" }. - On error,
error.kind ∈ { auth, notfound, invalid, server, timeout, network, outdated_cli }.
Commands used by this skill:
creatok doctor # check key / reachability / skill drift / updates
creatok capabilities # models, defaults, hard limits
creatok assets create --type image --file "<path>"
creatok image --prompt "<p>" (--options '<json>' | --options-file options.json) --out <dir>
creatok status --task <id> --type image_generation [--wait]Variable parameters (model, resolution, n, aspect_ratio, …) are passed through --options '<json>', e.g. --options '{"model":"nano-banana-2","resolution":"2K","n":2,"aspect_ratio":"16:9"}'. Use --options-file options.json when the shell makes inline JSON quoting unreliable, especially in PowerShell. Do not invent flags; anything beyond --prompt goes inside --options.
Model Selection Rules
Read model list, defaults, and hard limits from creatok capabilities at runtime instead of hardcoding them.
- Use the capabilities
default_modelunless the user explicitly chooses another supported model. - Validate only hard execution constraints (resolution, aspect ratio, n, max reference images) against the model's
limits. - Keep user-facing model explanation minimal.
Inputs to clarify (ask if missing)
- ask only for what is necessary to generate a good image
- resolve model, resolution, image count (
n), and aspect ratio from the user's choices or capabilities defaults, then pass all four explicitly - if the prompt is vague, offer to refine it and wait for explicit permission; otherwise submit it unchanged
- reference images are optional — ask only if the user implies style transfer or subject reference
- for each local reference image, run
creatok assets create --type image --file "<path>"and parsedata.asset.object_key - collect the returned formal Asset keys in
imageObjectKeys; do not pass those same local files through--ref
Workflow
- Entry self-check
- Run
creatok doctor. - If the command is not found, the CLI is not installed — guide the user to install it (see
./references/common-rules.md) and stop. - If
data.api_key_configuredis false orerror.kindisauth, guide the user to configure the channel-specific key:CREATOK_API_KEYfor stable,CREATOK_API_KEY_PREVIEWfor preview. - Check for a newer CLI and, if the user agrees, update before proceeding — follow
./references/common-rules.md(Outdated CLI). - If
data.skills_driftis true, the installed skills are out of sync with the CLI — runcreatok skills installto resync (see./references/common-rules.md).
- Resolve parameters
- Run
creatok capabilitiesand pick the default image model + its limits. - Build a strict
--optionsJSON containingmodel,resolution,n, andaspect_ratio. If the selected model exposespricing.quality_options, choose and pass one supportedqualityexplicitly; otherwise omitquality. AddimageObjectKeysonly when references are used. - For each local reference image, run
creatok assets create --type image --file "<path>". - Parse each formal key from
data.asset.object_key, preserve input order, and put the collected keys inimageObjectKeys. - Asset creation happens before paid-task confirmation. Each created Asset remains in the user's media library and counts toward storage even if the user does not submit image generation.
- Confirmation gate (mandatory, conversation layer)
- Summarize: model, resolution, number of images (
n), aspect ratio, quality when the selected model supports it, and estimated cost/credits from capabilitiespricingif available. - Ask for a simple confirmation. Do not run
creatok imageuntil the user says yes.
- Generate
- Run:
creatok image --prompt "<prompt>" (--options '<json>' | --options-file options.json) --out <run_dir>. - Use the exact approved prompt text for
<prompt>. Do not optimize, rewrite, translate, expand, or correct it during command construction. - When local reference images were created as Assets, submit their same formal keys together with all required fields, for example
--options '{"model":"nano-banana-2","resolution":"2K","n":1,"aspect_ratio":"1:1","imageObjectKeys":["<asset_key_1>","<asset_key_2>"]}'. - Do not also pass
--reffor those files; that would create a second Asset for each local reference. - The CLI submits, polls to completion, and persists artifacts.
- Respond
- Parse the stdout envelope. On success, the final image URLs are at
data.result.images[].url; treat them only as download inputs. - Follow
Mandatory Image-Only Result Responsein./references/common-rules.md: download and verify every successful image, render the required local Markdown image directives, and include the exact打开图片所在位置hyperlink to their containing directory. - The CLI also writes
result.jsonunderartifacts.dirfor recovery. - If
erroris present, maperror.kindto the guidance in./references/common-rules.mdand explain plainly.
Existing Task Recovery
- If the user already has a
task_id, runcreatok status --task <id> --type image_generationinstead of starting a new generation. - In recovery mode, do not ask the user to restate the prompt.
- Add
--waitto keep polling if the user wants to wait for a still-running task. - If succeeded, follow
Mandatory Image-Only Result Responsein./references/common-rules.md; never return the remote image URLs directly. - If still queued/running, explain clearly and offer to keep checking.
- If failed, explain the failure and suggest next steps.
Thin Client Boundary
- This skill only expresses intent and reads CLI JSON. It does not know endpoints, request bodies, or polling mechanics.
- The model should not make the user restate their idea if the direction is already clear from the conversation.