ClawGo workspace sync skill
Download a zip from clawgo.me, back up existing files, and copy Markdown from the archive into the local OpenClaw workspace.
Service limits
- - Base URL: INLINECODE0
- Key: 12 alphanumeric characters (server normalizes to uppercase)
- Only
.zip payloads; require status: ready before download - Target folder: INLINECODE3
Workflow
Step 1 — Check key readiness
CODEBLOCK0
- -
available: true and status: ready → continue - INLINECODE6 → stop with error: "No zip uploaded for this key yet"
- Missing key (404) → stop with error: "Key not found"
Step 2 — Download zip to a temp path
CODEBLOCK1
Verify: file size must be greater than zero.
Step 3 — Extract and inspect
CODEBLOCK2
Run these safety checks after extraction. If anything looks wrong, warn the user clearly and ask whether to proceed:
- - List archive contents
- Require at least one of:
SOUL.md, AGENTS.md, INLINECODE9 - If empty or none of the expected Markdown files → stop with error
Step 4 — Back up current workspace files
CODEBLOCK3
Tell the user the backup path so they can roll back manually if needed.
Step 5 — Write archive files into the workspace
CODEBLOCK4
Only files present in the zip are copied; local files missing from the zip are left unchanged (not removed).
Step 6 — Report results
Tell the user:
- - Files successfully written from the zip
- Files skipped because they were absent from the zip
- Backup directory path
- Suggestion: run
/reset to restart the session so new workspace content loads
Workspace file reference
| File | Role |
|---|
| INLINECODE11 | Primary identity, reasoning style, behavioral guardrails |
| INLINECODE12 |
Session bootstrap, tool policy, hard limits |
|
TOOLS.md | Local tooling notes and proxy routing |
|
IDENTITY.md | Display name, role, emoji metadata |
|
USER.md | User profile and session context |
|
HEARTBEAT.md | Scheduled task notes |
Errors
| Situation | Action |
|---|
| INLINECODE17 | Stop; ask the user to upload a zip first |
| Key missing (404) |
Stop; invalid key |
| No expected Markdown in zip | Stop; archive content does not match expectations |
| Downloaded file size is 0 | Stop; retry or report failure |
| Copy failed (permissions, etc.) | Report error; backup remains available |
技能名称: clawgo-clone
详细描述:
ClawGo 工作区同步技能
从 clawgo.me 下载一个 zip 文件,备份现有文件,并将归档中的 Markdown 文件复制到本地 OpenClaw 工作区。
服务限制
- - 基础 URL: https://clawgo.me
- 密钥: 12 个字母数字字符(服务器统一转换为大写)
- 仅支持 .zip 文件;下载前需确认 status: ready
- 目标文件夹: ~/.openclaw/workspace/
工作流程
步骤 1 — 检查密钥就绪状态
bash
curl -s https://clawgo.me/api/clones/{key}/availability
- - available: true 且 status: ready → 继续
- status: pending → 停止并报错:此密钥尚未上传 zip 文件
- 密钥不存在(404)→ 停止并报错:密钥未找到
步骤 2 — 将 zip 下载到临时路径
bash
curl -s -L -o /tmp/clone-{key}.zip \
https://clawgo.me/api/clones/{key}/download
验证:文件大小必须大于零。
步骤 3 — 解压并检查
bash
mkdir -p /tmp/clone-{key}
unzip -o /tmp/clone-{key}.zip -d /tmp/clone-{key}/
解压后执行以下安全检查。如果发现任何问题,请清晰警告用户并询问是否继续:
- - 列出归档内容
- 至少需要包含以下文件之一:SOUL.md、AGENTS.md、TOOLS.md
- 如果为空或不包含任何预期的 Markdown 文件 → 停止并报错
步骤 4 — 备份当前工作区文件
bash
BACKUP_DIR=/tmp/backup-before-clone-$(date +%Y%m%d-%H%M%S)
mkdir -p $BACKUP_DIR
WORKSPACE=$HOME/.openclaw/workspace
for f in SOUL.md AGENTS.md TOOLS.md IDENTITY.md USER.md HEARTBEAT.md; do
[ -f $WORKSPACE/$f ] && cp $WORKSPACE/$f $BACKUP_DIR/$f
done
告知用户备份路径,以便需要时手动回滚。
步骤 5 — 将归档文件写入工作区
bash
WORKSPACE=$HOME/.openclaw/workspace
SRC=/tmp/clone-{key}
for f in SOUL.md AGENTS.md TOOLS.md IDENTITY.md USER.md HEARTBEAT.md; do
[ -f $SRC/$f ] && cp $SRC/$f $WORKSPACE/$f
done
仅复制 zip 中存在的文件;本地存在但 zip 中缺失的文件保持不变(不会被删除)。
步骤 6 — 报告结果
告知用户:
- - 从 zip 成功写入的文件
- 因 zip 中缺失而跳过的文件
- 备份目录路径
- 建议:运行 /reset 重启会话以加载新的工作区内容
工作区文件参考
| 文件 | 作用 |
|---|
| SOUL.md | 主要身份、推理风格、行为准则 |
| AGENTS.md |
会话启动、工具策略、硬限制 |
| TOOLS.md | 本地工具说明和代理路由 |
| IDENTITY.md | 显示名称、角色、表情符号元数据 |
| USER.md | 用户配置文件和会话上下文 |
| HEARTBEAT.md | 定时任务说明 |
错误处理
| 情况 | 操作 |
|---|
| status: pending | 停止;请用户先上传 zip 文件 |
| 密钥缺失(404) |
停止;无效密钥 |
| zip 中无预期的 Markdown 文件 | 停止;归档内容不符合预期 |
| 下载文件大小为 0 | 停止;重试或报告失败 |
| 复制失败(权限等) | 报告错误;备份仍然可用 |