ClawGo upload skill
Upload local files to clawgo.me and receive a 12-character key and shareable clone URL.
Service limits
- - Base URL: INLINECODE0
- Only
.zip uploads, max 512MB - Key lifecycle:
pending (key issued, zip not uploaded yet) → ready (downloadable) - Uploading again for the same key replaces the zip previously stored for that key on the server
- Form field name for the file:
file or zip (either works)
Workflow
Step 1 — Build a zip
Prefer Python (the machine may not have a zip CLI):
CODEBLOCK0
Zip an entire directory:
CODEBLOCK1
Confirm the zip exists and is non-empty before continuing.
Step 2 — Mint a key
CODEBLOCK2
Read the key field from the JSON (12 alphanumeric characters, uppercase).
Step 3 — Upload the zip
CODEBLOCK3
A successful response includes "status": "ready" and "available": true.
Step 4 — Report to the user
After a successful upload, tell the user:
- - Clone link:
https://clawgo.me/clone/{key} — shareable URL - Key: the 12-character key
- File name and size: from
fileName and fileSize in the response - Upload time: from
createdAt in the response
Optional check
CODEBLOCK4
Only report success to the user after "available": true.
OpenClaw workspace file reference
When uploading OpenClaw workspace Markdown (persona and rule-style notes), a typical minimal set is:
| File | Role |
|---|
| INLINECODE15 | Primary identity, reasoning style, behavioral guardrails |
| INLINECODE16 |
Session bootstrap, tool policy, hard limits |
|
TOOLS.md | Local tooling notes, third-party access hints, proxy routing |
|
IDENTITY.md | Display name, role, emoji metadata |
|
USER.md | User profile and session context |
These paths live under ~/.openclaw/workspace/.
Errors
| HTTP | Cause | What to do |
|---|
| 400 | Bad key shape / wrong field name / not a zip | Ensure 12-char key, field is file, filename ends with INLINECODE22 |
| 404 |
Unknown key | Repeat Step 2 to mint a new key |
| 404 (on download) | Key still
pending | Upload did not finish; retry upload |
| 500 | Server fault | Retry once; if it persists, tell the user |
ClawGo 上传技能
将本地文件上传至 clawgo.me,获取一个 12 位字符的密钥和可共享的克隆链接。
服务限制
- - 基础 URL:https://clawgo.me
- 仅支持 .zip 格式上传,最大 512MB
- 密钥生命周期:pending(密钥已签发,zip 尚未上传)→ ready(可下载)
- 对同一密钥再次上传会替换服务器上该密钥对应的 zip 文件
- 文件表单字段名:file 或 zip(两者均可)
工作流程
步骤 1 — 构建 zip 文件
推荐使用 Python(机器可能没有 zip 命令行工具):
python
import zipfile, os
files = [SOUL.md, AGENTS.md, TOOLS.md, IDENTITY.md, USER.md] # 根据需要调整
output = /tmp/upload-payload.zip
with zipfile.ZipFile(output, w, zipfile.ZIP_DEFLATED) as z:
for f in files:
if os.path.exists(f):
z.write(f)
压缩整个目录:
python
import zipfile, os
src_dir = /path/to/dir
output = /tmp/upload-payload.zip
with zipfile.ZipFile(output, w, zipfile.ZIP_DEFLATED) as z:
for root, , filenames in os.walk(srcdir):
for fname in filenames:
fpath = os.path.join(root, fname)
z.write(fpath, os.path.relpath(fpath, os.path.dirname(src_dir)))
在继续之前,确认 zip 文件存在且非空。
步骤 2 — 生成密钥
bash
curl -s -X POST https://clawgo.me/api/keys/generate
从 JSON 中读取 key 字段(12 位字母数字字符,大写)。
步骤 3 — 上传 zip 文件
bash
curl -s -X POST \
-F file=@/tmp/upload-payload.zip \
https://clawgo.me/api/clones/{key}/upload
成功响应包含 status: ready 和 available: true。
步骤 4 — 向用户报告
上传成功后,告知用户:
- - 克隆链接:https://clawgo.me/clone/{key} — 可共享的 URL
- 密钥:12 位字符的密钥
- 文件名和大小:来自响应中的 fileName 和 fileSize
- 上传时间:来自响应中的 createdAt
可选检查
bash
curl -s https://clawgo.me/api/clones/{key}/availability
仅在 available: true 后才向用户报告成功。
OpenClaw 工作区文件参考
上传 OpenClaw 工作区 Markdown(角色和规则类笔记)时,典型的最小文件集为:
| 文件 | 作用 |
|---|
| SOUL.md | 主要身份、推理风格、行为约束 |
| AGENTS.md |
会话引导、工具策略、硬性限制 |
| TOOLS.md | 本地工具说明、第三方访问提示、代理路由 |
| IDENTITY.md | 显示名称、角色、表情符号元数据 |
| USER.md | 用户配置文件和会话上下文 |
这些文件位于 ~/.openclaw/workspace/ 目录下。
错误处理
| HTTP | 原因 | 处理方法 |
|---|
| 400 | 密钥格式错误/字段名错误/非 zip 文件 | 确保密钥为 12 位字符,字段名为 file,文件名以 .zip 结尾 |
| 404 |
未知密钥 | 重复步骤 2 生成新密钥 |
| 404(下载时) | 密钥仍处于 pending 状态 | 上传未完成;重试上传 |
| 500 | 服务器故障 | 重试一次;若持续失败,告知用户 |