Install
openclaw skills install wechat-shareExport and import selected OpenClaw workspace files between workspaces with optional burn-after-read. Use when the user wants to share SOUL.md, AGENTS.md, TOOLS.md, USER.md, workspace skills, or other text files.
openclaw skills install wechat-shareUse this skill when the user wants to move selected files from one OpenClaw workspace to another.
This skill solves two scenarios:
Supported commands:
/wechat-share export/wechat-share preview --db-id "<db-id>" --api-token "<token>"/wechat-share import --db-id "<db-id>" --api-token "<token>" [--burn]Recipients should install wechat-share first, then use preview and import.
Share only files from the current workspace. Typical examples:
SOUL.mdAGENTS.mdTOOLS.mdUSER.mdskills/Do not share:
~/.openclaw/**For each share, return one standard recipient path:
wechat-shareThe share instruction must carry enough information for the recipient to install the skill, preview the share, and import the files.
...~/.openclaw/**.USER.md, MEMORY.md, or memory/..md, .txt, .json, .yaml, .yml, .toml, .ini, .cfg, .ts, .js, .py, .sh.fs9_read() and fs9_write() text workflow is limited to files up to 10 MB each.This skill requires:
curlpython3If either tool is missing, stop and explain what is missing.
When invoked:
export, follow the export workflow.import, follow the import workflow.Ask:
Keep the question short. Offer common candidates if helpful.
For each selected path:
If nothing valid remains, stop and explain why.
Before creating the share, show:
Prepare a fresh share container and capture the values needed for import.
curl -sS -X POST "https://api.db9.ai/customer/anonymous-register" \
-H "Content-Type: application/json" \
-d '{}'
Extract token from the JSON response.
Create a database with a unique name such as wechat-share-YYYYMMDD-HHMMSS-RAND:
curl -sS -X POST "https://api.db9.ai/customer/databases" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"name":"wechat-share-20260323-103015-ab12"}'
Capture at least:
api_tokendb_idBuild this JSON object with Python:
{
"version": 1,
"createdAt": "2026-03-23T10:00:00Z",
"burnAfterRead": true,
"items": [
{
"remotePath": "/files/SOUL.md",
"destPath": "SOUL.md",
"sha256": "..."
}
]
}
Rules:
remotePath must always point under /files/destPath must always be workspace-relativesha256 for every itemRecommended manifest shape:
versioncreatedAtburnAfterReaditemssummary object with:
fileCountpathstotalBytes when easy to computeUpload every selected file to:
/files//files/<workspace-relative-path>Use the SQL API:
curl -sS -X POST "https://api.db9.ai/customer/databases/<DB_ID>/sql" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"query":"SELECT fs9_write('\"'\"'/files/SOUL.md'\"'\"', '\"'\"'...content...'\"'\"')"}'
Also upload the manifest to /manifest.json with fs9_write().
Do not hand-build large SQL strings in shell. Use Python to:
sha256curlReturn a localized message that the sender can forward directly.
Always include:
/wechat-share preview ... command/wechat-share import ... commandThe export result must be structured in two parts:
Rules for the recipient-facing block:
Label the block clearly, for example:
把下面这段完整转发给对方即可:Forward the block below to the recipient:Use this installation step:
openclaw skills install wechat-share
If openclaw is unavailable but clawhub is available, the fallback is:
clawhub install wechat-share
Use this preview command:
/wechat-share preview --db-id "<DB_ID>" --api-token "<API_TOKEN>"
Use this quick command:
/wechat-share import --db-id "<DB_ID>" --api-token "<API_TOKEN>"
If burn-after-read is enabled, use:
/wechat-share import --db-id "<DB_ID>" --api-token "<API_TOKEN>" --burn
The preview summary should include:
Inside the recipient-facing block, present the flow in this order:
wechat-shareAim for a message that feels easy to forward in one shot in a chat app. Keep the wording minimal. Do not add extra narrative before or after the core steps. Use preview-first wording such as:
请先执行预览命令查看文件列表和覆盖风险;如果结果正常,再执行导入命令。Run the preview command first to review the file list and overwrite risk; if everything looks correct, then run the import command.If burn is requested, prefer deleting the whole share database:
curl -sS -X DELETE "https://api.db9.ai/customer/databases/<DB_ID>" \
-H "Authorization: Bearer <API_TOKEN>"
If whole-database deletion fails, fall back to SQL:
SELECT fs9_remove('/manifest.json');
SELECT fs9_remove('/files', true);
Accept:
--db-id "<db-id>"--api-token "<token>"--burnIf either --db-id or --api-token is missing, ask the user to paste the full share command.
Use the SQL endpoint with curl:
curl -sS -X POST "https://api.db9.ai/customer/databases/<DB_ID>/sql" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"query":"SELECT fs9_read('\"'\"'/manifest.json'\"'\"') AS content"}'
Use Python to parse the JSON response and extract the first cell from rows.
For every manifest item:
remotePath must start with /files/destPath must be relativedestPath must not contain ..If validation fails, stop before writing anything.
Before copying any file, show:
If the current action is preview, stop after this step.
Never write directly into the workspace before validation and checksum checks finish.
For each manifest item:
fs9_read(remotePath) through the SQL APIAfter all files pass validation:
destPathThen report which files were imported.
Burn should happen when either of these is true:
--burnburnAfterRead to truePreferred burn:
DELETEFallback burn:
/manifest.json and /files/Tell the user which burn path succeeded.
Remind the user:
api_token is sensitivejq.If curl or python3 is missing:
Do not recommend db9 CLI or psql as required dependencies for this skill.
For localized share messages and install-first recipient instructions, read examples.md.