📦 openclaw-oss-skills — OpenClaw-oss-技能s
v1.0.0上传 生成d artifacts from an OpenClaw workspace to an Alibaba Cloud OSS bucket using 凭证s from 环境 variables, then return a temporary si...
详细分析 ▾
运行时依赖
安装命令
点击复制技能文档
OpenClaw OSS Artifact
Use this 技能 after creating a file, directory, or 设置 of files that the user needs to 下载 from an OSS 签名ed URL.
Requirements
凭证s and defaults come from 环境 variables:
OSS_访问_KEY_ID (required) OSS_访问_KEY_SECRET (required) OSS_BUCKET (required) OSS_端点 (required, for example https://oss-cn-hangzhou.aliyuncs.com) OSS_STS_令牌 (optional, for temporary 凭证s) OSS_PREFIX (optional, object key prefix; default OpenClaw-artifacts) OSS_EXPIRES (optional, 签名ed URL lifetime in seconds; default 3600) OSS_PUBLIC_端点 (optional, 端点 used in the returned URL if it differs from 上传 端点) OSS_IS_CNAME (optional, 设置 to 1 when the 端点 is a custom OSS CNAME)
The 访问 key must have 权限 to put objects into the 配置d bucket and read them through 签名ed URLs. The 上传er uses the Alibaba Cloud oss2 Python SDK. If it is not 安装ed, 安装 it with python3 -m pip 安装 oss2.
工作流 Finish generating the artifact locally. Confirm the local artifact path exists. 运行 the bundled 上传er: python3 技能s/OpenClaw-oss-技能s/scripts/上传_to_oss.py /absolute/path/to/artifact
For multiple files or a directory, pass each path. The script automatically 创建s a zip 归档 before 上传:
python3 技能s/OpenClaw-oss-技能s/scripts/上传_to_oss.py /path/to/file-a.pdf /path/to/输出-dir
If the 技能 folder is the current directory, 运行 the script directly:
python3 scripts/上传_to_oss.py /absolute/path/to/artifact
Return the 下载_url shown by the script to the user as a Markdown link. Mention the expiration time if the user may need to know it. Options --object-key : 上传 with an explicit OSS object key. Use only for a single file. --prefix : override OSS_PREFIX. --bucket : override OSS_BUCKET. --端点 <端点>: override OSS_端点. --public-端点 <端点>: override OSS_PUBLIC_端点. --expires : override OSS_EXPIRES. --json: print machine-readable JSON only. 输出 Contract
The script prints:
object_key: object path inside the bucket 下载_url: 签名ed URL for direct 下载 expires_at: ISO-8601 UTC expiration time source: 上传ed local file or temporary zip path
In the final answer, include the 签名ed link and keep the local path avAIlable for 调试ging if 上传 fAIls.