返回顶部
s

sudocode-nano-banana2Sudocode图像生成

Generate or edit images with Sudocode's nano-banana2 image service. Use when the user wants text-to-image or image-to-image generation through the bundled Sudocode API client, or when packaging/installing this image-generation skill on another machine.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
159
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

sudocode-nano-banana2

Sudocode Nano Banana2

通过远程 Sudocode API,根据文本提示生成图像,或根据提示编辑本地图像。

首次运行时初始化环境

在首次实际使用前,检查所需变量是否存在:

bash
uv run python dir>/scripts/initenv.py --check-only

如果检查报告缺少变量,请告知用户先在 https://sudocode.us 注册并申请 API 密钥,然后运行:

bash
uv run python dir>/scripts/initenv.py

初始化程序会提示输入值,并将其持久化到 ~/.openclaw/.env 文件中。

使用捆绑脚本

运行:

bash
uv run python dir>/scripts/sudocodenanobanana2.py --prompt ... [--inputimage path] [--output path]

输入参数:

  • - --prompt:必需
  • --input_image:可选的本地图像路径,用于图像到图像的编辑
  • --output:可选的输出路径,默认为 output.png

环境变量:

  • - SUDOCODEIMAGEAPIKEY:必需的 API 密钥;如果缺失,请引导用户前往 https://sudocode.us 注册并申请 API 密钥
  • SUDOCODEBASE_URL:可选的远程 Sudocode 服务 API 基础 URL,默认为 https://sudocode.run

行为说明:

  • - 此技能是一个 API 客户端,而非本地推理模型
  • 它将提示和可选的输入图像发送到配置的 Sudocode 端点
  • 仅在使用初始化程序时,才会将凭据存储到 ~/.openclaw/.env 文件中
  • 它将生成的图像文件和每次运行的日志写入所选输出路径附近的本地磁盘

初始化程序将这些值写入 ~/.openclaw/.env,以便后续会话可以重复使用。

远程 API 和模型命名

此技能命名为 sudocode-nano-banana2,因为它将 Sudocode 的 Nano Banana 2 图像能力打包为 OpenClaw 使用。

捆绑脚本当前调用由配置的 Sudocode 兼容端点暴露的上游模型标识符 gemini-3.1-flash-image-preview。技能名称和上游模型标识符有意不同:一个是打包的技能名称,另一个是服务当前使用的后端路由。

如果缺少 requests,请使用以下命令安装:

bash
uv pip install requests

打包与可移植性

此技能按标准技能包结构组织:

  • - SKILL.md:触发元数据和操作说明
  • scripts/initenv.py:首次运行环境引导辅助程序
  • scripts/sudocodenano_banana2.py:捆绑的运行时脚本

请勿在可分发包中包含生成的图像、日志或其他本地运行产物。

传递生成的图像

在 OpenClaw 中使用此技能时,请使用 message 工具发送生成的文件,以便用户实际接收图像。

使用:

text
message(action=send, filePath=/absolute/path/to/output.png)

然后回复 NO_REPLY 以避免重复文本。

请勿依赖读取图像文件或将本地路径粘贴到聊天中。

错误处理

如果脚本以退出码 2 结束,请向用户转发以下消息:

text
❌ 额度不足或请求过于频繁!
👉 请前往 https://sudocode.us 登录并充值后重试。

对于其他故障,直接显示脚本输出。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 sudocode-nano-banana2-1776280382 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 sudocode-nano-banana2-1776280382 技能

通过命令行安装

skillhub install sudocode-nano-banana2-1776280382

下载

⬇ 下载 sudocode-nano-banana2 v1.0.1(免费)

文件大小: 6.49 KB | 发布时间: 2026-4-17 16:15

v1.0.1 最新 2026-4-17 16:15
- Clarified that the skill is an API client for Sudocode's remote nano-banana2 service, not a local inference model.
- Updated the description to reflect use of the Sudocode API client and remote model naming.
- Added a section explaining the difference between the skill name (`sudocode-nano-banana2`) and the upstream model identifier (`gemini-3.1-flash-image-preview`).
- Noted that generated images and logs are written to disk near the output path, and credentials are stored only via the initializer.
- Improved instructions for packaging, delivery, and environment setup for consistency with remote API usage.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部