WeChat Share
by @liuhao6741
Export and import selected OpenClaw workspace files between workspaces with optional burn-after-read. Use when the user wants to share SOUL.md, AGENTS.md, TO...
clawhub install wechat-shareš About This Skill
name: wechat-share description: Export 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. user-invocable: true metadata: {"openclaw":{"requires":{"bins":["curl","python3"]}}}
wechat-share
Use this skill when the user wants to move selected files from one OpenClaw workspace to another.
This skill solves two scenarios:
1. Export selected workspace files into a one-time db9 share. 2. Import a received share back into the current workspace.
Supported commands:
/wechat-share export/wechat-share preview --db-id "" --api-token "" /wechat-share import --db-id "" --api-token "" [--burn] Recipients should install wechat-share first, then use preview and import.
Language
What This Skill Shares
Share only files from the current workspace. Typical examples:
SOUL.mdAGENTS.mdTOOLS.mdUSER.mdskills/Do not share:
~/.openclaw/**Core Model
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.
Safety Rules
...~/.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.Required Tools
This skill requires:
curlpython3If either tool is missing, stop and explain what is missing.
Action Routing
When invoked:
1. If args start with export, follow the export workflow.
2. If args start with import, follow the import workflow.
3. Otherwise ask which action the user wants.
Export Workflow
Step 1: Ask what to share
Ask:
Keep the question short. Offer common candidates if helpful.
Step 2: Validate the selection
For each selected path:
If nothing valid remains, stop and explain why.
Step 3: Confirm before upload
Before creating the share, show:
Step 4: Create the share
Prepare a fresh share container and capture the values needed for import.
1. Create an anonymous db9 account:
curl -sS -X POST "https://api.db9.ai/customer/anonymous-register" \
-H "Content-Type: application/json" \
-d '{}'
2. Extract token from the JSON response.
3. 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 " \
-H "Content-Type: application/json" \
-d '{"name":"wechat-share-20260323-103015-ab12"}'
Capture at least:
api_tokendb_idStep 5: Build the manifest
Build 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:fileCount
- paths
- totalBytes when easy to computeStep 6: Upload files and manifest
Upload every selected file to:
/files//files/Use the SQL API:
curl -sS -X POST "https://api.db9.ai/customer/databases//sql" \
-H "Authorization: Bearer " \
-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:
sha256curlStep 7: Return the share instructions
Return a localized message that the sender can forward directly.
Always include:
1. A short title
2. A brief preview summary
3. A skill installation step
4. A short /wechat-share preview ... command
5. A short /wechat-share import ... command
6. A short security note
The export result must be structured in two parts:
1. A short sender-facing summary. 2. One complete recipient-facing block that can be copied and forwarded as-is.
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 "" --api-token ""
Use this quick command:
/wechat-share import --db-id "" --api-token ""
If burn-after-read is enabled, use:
/wechat-share import --db-id "" --api-token "" --burn
The preview summary should include:
Inside the recipient-facing block, present the flow in this order:
1. Install wechat-share
2. Preview the share
3. Import the share
Aim 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.Step 8: Burn behavior
If burn is requested, prefer deleting the whole share database:
curl -sS -X DELETE "https://api.db9.ai/customer/databases/" \
-H "Authorization: Bearer "
If whole-database deletion fails, fall back to SQL:
SELECT fs9_remove('/manifest.json');
SELECT fs9_remove('/files', true);
Import Workflow
Step 1: Parse the share
Accept:
--db-id "" --api-token "" --burnIf either --db-id or --api-token is missing, ask the user to paste the full share command.
Step 2: Read the manifest
Use the SQL endpoint with curl:
curl -sS -X POST "https://api.db9.ai/customer/databases//sql" \
-H "Authorization: Bearer " \
-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.
Step 3: Validate the manifest
For every manifest item:
remotePath must start with /files/destPath must be relativedestPath must not contain ..If validation fails, stop before writing anything.
Step 4: Show a preview before import
Before copying any file, show:
If the current action is preview, stop after this step.
Step 5: Download to a temp directory
Never write directly into the workspace before validation and checksum checks finish.
For each manifest item:
fs9_read(remotePath) through the SQL APIStep 6: Copy into the workspace
After all files pass validation:
destPathThen report which files were imported.
Step 7: Burn if requested
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.
Step 8: Return the result
Remind the user:
api_token is sensitiveImplementation Notes
jq.UX Rules For Returned Messages
Dependency Fallback
If curl or python3 is missing:
Do not recommend db9 CLI or psql as required dependencies for this skill.
Examples
For localized share messages and install-first recipient instructions, read examples.md.
š” Examples
For localized share messages and install-first recipient instructions, read examples.md.