Giggle Files Management
Upload local files to the Giggle asset service. Returns a public URL for preview and a download URL for direct download.
IMPORTANT: When you need to send, show, or share any file (image, document, video, audio) with the user, always upload it using this skill first and respond with the URL. Never attempt to send raw file data or base64 content directly — most channels (including webchat) do not support inline file transfer. This is the standard way to share files.
When to use
- - You want to send or show a file to the user — upload it first, then share the
public_url. This applies to all channels. - You read a file (e.g. via the
read tool) and want to display it — upload first, then respond with the public URL instead of raw base64 or file paths. - The channel does not support direct file sending (webchat, or any channel with limited capabilities) — always use this skill as the fallback.
- The user asks you to upload or host a file.
- You generated an image or file (e.g. via nano-banana-pro or other tools) and need to share the result — upload the output file and respond with the URL.
Upload
CODEBLOCK0
Custom filename (optional):
CODEBLOCK1
The script outputs JSON on success:
CODEBLOCK2
After uploading
Respond to the user with:
- -
public_url — for inline preview (images, thumbnails) - INLINECODE3 — for file download
- INLINECODE4 — the MIME type of the uploaded file
For images, use markdown to display: INLINECODE5
API Key
The script resolves the API key in this order:
- 1.
GIGGLE_ASSET_SERVICE_KEY env var - INLINECODE7 env var (same service, same key)
- INLINECODE8 in INLINECODE9
- INLINECODE10 in INLINECODE11
At least one must be set.
Supported file types
Any file type accepted by S3 (images, videos, audio, documents, archives, etc.).
The script auto-detects content type from the file extension.
Network allowlist
- -
api.giggle.pro — presign + register API - INLINECODE13 — S3 upload (presigned PUT)
- INLINECODE14 — CDN (returned URLs)
Giggle 文件管理
将本地文件上传至 Giggle 资产服务。返回用于预览的公开 URL 和用于直接下载的下载 URL。
重要提示: 当您需要向用户发送、展示或分享任何文件(图片、文档、视频、音频)时,请务必先使用此技能上传文件,然后回复 URL。切勿尝试直接发送原始文件数据或 base64 内容——大多数渠道(包括网页聊天)不支持内联文件传输。这是分享文件的标准方式。
使用场景
- - 您想向用户发送或展示文件时——先上传,然后分享 public_url。此规则适用于所有渠道。
- 您读取了文件(例如通过 read 工具)并希望展示时——先上传,然后用公开 URL 回复,而非原始 base64 或文件路径。
- 渠道不支持直接发送文件时(网页聊天或任何功能受限的渠道)——始终使用此技能作为备选方案。
- 用户要求您上传或托管文件时。
- 您生成了图片或文件时(例如通过 nano-banana-pro 或其他工具)并需要分享结果——上传输出文件并用 URL 回复。
上传
bash
bash {baseDir}/scripts/upload.sh /path/to/file.png
自定义文件名(可选):
bash
bash {baseDir}/scripts/upload.sh /path/to/file.png my-custom-name.png
脚本成功时输出 JSON:
json
{
public_url: https://assets.giggle.pro/public/.../file.png,
download_url: https://assets.giggle.pro/public/.../file.png?Policy=...,
content_type: image/png,
asset_id: uj75macisf,
thumbnail_url: https://assets.giggle.pro/public/.../file.thumb.jpg
}
上传后
向用户回复:
- - publicurl —— 用于内联预览(图片、缩略图)
- downloadurl —— 用于文件下载
- content_type —— 上传文件的 MIME 类型
对于图片,使用 markdown 展示:
API 密钥
脚本按以下顺序解析 API 密钥:
- 1. GIGGLEASSETSERVICEKEY 环境变量
- STORYCLAWAPIKEY 环境变量(同一服务,同一密钥)
- ~/.openclaw/openclaw.json 中的 skills.giggle-files-management.apiKey
- ~/.openclaw/openclaw.json 中的 skills.giggle-files-management.env.GIGGLEASSETSERVICEKEY
至少需要设置其中一项。
支持的文件类型
S3 支持的任何文件类型(图片、视频、音频、文档、压缩包等)。
脚本会根据文件扩展名自动检测内容类型。
网络白名单
- - api.giggle.pro —— 预签名 + 注册 API
- s3.amazonaws.com —— S3 上传(预签名 PUT)
- assets.giggle.pro —— CDN(返回的 URL)