360 Secure SkillHub
360 安全技能中心

neo-infog

通过 Python 脚本调用 Neo 模型 API 完成文生图与图片编辑:文生图依据提示词工程模板构建提取块、最终提示与画布参数;图片编辑直接使用用户原始指令并把源图解析为可用地址、本地路径或缓存键。主 Agent 负责进度与结果投递,长任务在子 Agent 中执行并返回结构化 JSON。

分类:创作
gaclove
gaclove
热度 0.19
最近更新 2026-03-25 01:46:55

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add gaclove/neo-infog
兼容性
OpenClaw 专属
联网要求
需要联网
数据出网
必须出网
Metadata
name
neo-infog
description
使用 Neo 模型生成新图片或编辑已有图片,适用于信息图、海报、插图等视觉内容。Use when the user explicitly asks to create a new image, infographic, poster, or illustration, or asks to edit an existing image and provides a source image. Trigger phrases include 'neo-infog', 'neo 出图', 'neo 生图', '生成信息图', '做一张图', '帮我画', 'create infographic', 'generate image with neo', and edit intents such as '修改这张图' or 'edit this image'. Do not trigger for discussing existing results, asking how the skill works, or mentioning images without a real generation or edit request.
metadata
{"version":"0.7.0","tags":["text-to-image","image-edit","neo"],"requires":{"bins":["python"],"libs":["httpx"]}}

Neo Infographic

Long-running generation must run in a subagent. Use scripts/openclaw_runner.py as the execution entrypoint.

Trigger Rules

text-to-image

Trigger only when all of these are true:

  1. The user explicitly asks to create a new image.
  2. The requested artifact is visual content such as an infographic, poster, illustration, or generic image.
  3. The request is a new generation request, not a reaction to an already generated result.

Do not trigger for:

  • discussing an existing image
  • asking how the skill works
  • mentioning "image" without an actual generation request
  • agent-authored text that happens to contain trigger words

image-edit

Trigger only when both of these are true:

  1. The user explicitly asks to edit or rewrite an existing image.
  2. A source image is available as a URL, local path, cached file key, or can be resolved from a platform attachment.

If the user asks to edit but no source image is available, stop and tell them the edit flow needs the original image.

Main-Agent Flow

  1. Decide whether the request is text-to-image or image-edit.
  2. Spawn a subagent immediately. Do not wait to finish generation before responding.
  3. Reply once with 您的请求正在处理中,完成后会自动发送结果。
  4. Avoid trigger-heavy phrases in that reply to reduce self-triggering.
  5. When the subagent returns status=ok and need_main_agent_send=true, send the result once and then end with NO_REPLY.

Subagent Flow

text-to-image

  1. Analyze the user input.
  2. If the request includes an image or URL, finish extraction before generating anything.
  3. Build extraction blocks and the final prompt using reference/prompt-engineering.md.
  4. Build runtime parameters using reference/runtime-parameters.md.
  5. Execute with reference/openclaw-execution.md.
  6. Return structured JSON only. Do not send user-visible messages from the subagent.

image-edit

  1. Resolve the source image into a usable URL, local path, or cached file key.
  2. Use the user's raw edit instruction as the prompt. Do not run prompt engineering.
  3. Execute with reference/openclaw-execution.md.
  4. Return structured JSON only. Do not send user-visible messages from the subagent.

Return Contract

Return this shape to the main agent:

{
  "status": "ok|error",
  "output_file": "/tmp/openclaw/...",
  "message": "<prompt or edit instruction>",
  "need_main_agent_send": true,
  "error": "<only on failure>"
}

Rules:

  • output_file must point to the wrapper-managed output path.
  • need_main_agent_send is true only for successful generation.
  • Report the real failure reason in error; do not invent fallback explanations.

OpenClaw-Only Guardrails

  • Main agent sends progress and final delivery; subagent never calls message.
  • Do not trigger a second neo-infog run while one is already in flight in the same conversation.
  • Do not bypass scripts/openclaw_runner.py by hand-building timestamped output paths.
  • Do not mention deleted ComfyUI workflows, unet-name, or old workflow JSON files.
  • Use repo-relative paths in reasoning and docs. Use deployed absolute paths only when the execution reference explicitly asks for an example.

References

  • reference/prompt-engineering.md: input extraction contract, [CANVAS] rules, final prompt template
  • reference/runtime-parameters.md: [CANVAS] to --image-size and --aspect-ratio mapping
  • reference/openclaw-execution.md: wrapper entrypoint, command templates, output file naming, JSON return expectations