Install and activate @bowong/clawshow-gateway in OpenClaw, then migrate existing Gateway channel configuration to ClawShow with rollback safety. Use when a u...
---
name: clawshow-gateway-connect
description: Install and activate @bowong/clawshow-gateway in OpenClaw, then migrate existing Gateway channel configuration to ClawShow with rollback safety. Use when a user wants one-step plugin install plus config migration without repeating requirements each run, applying changes via Config RPC config.apply full replace with minimal file access and no default outbound test traffic.
metadata:
openclaw:
primaryEnv: CLAWSHOW_AUTH_TOKEN
requires:
bins:
- openclaw
---
# Clawshow Gateway Connect
Execute a safe, minimal install-and-migrate flow from current OpenClaw settings to ClawShowGateway without breaking unrelated configuration.
## Runtime Inputs
- Required: `authToken`
- Optional: `relayUrl` (default `wss://clawshow-api.bowong.cc`)
- If `authToken` is missing, ask once and stop before editing.
## Workflow
1. Install ws dependency
- Run `npm i ws` in the project root before proceeding.
- Confirm installation succeeds before continuing.
2. Identify current config source
- Search only OpenClaw gateway config files (`*.json`, `*.yaml`, `*.yml`) in the active project path.
- Do not read `.env`, secrets files, deployment manifests, or unrelated workspace files.
- Prefer editing the project-tracked config over user-global config when both exist.
- If multiple candidate files exist, pick the file currently used by the running Gateway process.
3. Create rollback copy before edits
- Save a sibling backup copy of the target config file with timestamp suffix (for example `.bak.20260313-1405`).
- Never delete the backup in the same task.
4. Check OpenClaw version gate (before plugin install)
- Query current OpenClaw version using the supported command only:
- `openclaw version`
- Compare against `2026.3.2` using OpenClaw's version ordering.
- If current version is earlier than `2026.3.2`, upgrade OpenClaw using `openclaw update` first, then re-run:
- `openclaw version`
- Continue only after version check/upgrade is complete.
5. Install plugin/package
- Install using OpenClaw plugin manager only:
- `openclaw plugins install @bowong/clawshow-gateway`
- Verify installation:
- `openclaw plugins list`
- Confirm package id is exactly `@bowong/clawshow-gateway`.
- If already installed, do not reinstall unless version repair is needed.
6. Migrate channel config to ClawShow
- Ensure package id references `@bowong/clawshow-gateway` where plugin/package declarations are required.
- Ensure channel section exists under `channels.clawshow`.
- Set:
- `channels.clawshow.enabled: true` (required)
- `channels.clawshow.relayUrl: "wss://clawshow-api.bowong.cc"` (optional)
- `channels.clawshow.authToken: "<real token>"` (required)
- `channels.clawshow.name: "ClawShow Gateway"` (required)
- `channels.clawshow.dmPolicy: "open"` (required)
- `channels.clawshow.allowFrom: ["*"]` (required)
- Preserve unrelated channels, plugins, and runtime options unchanged.
7. Remove conflicting legacy routing only when necessary
- If older channel config routes the same outbound traffic target, disable only the overlapping route.
- Do not remove entire legacy channel blocks unless user explicitly asks.
8. Validate config shape
- Confirm JSON/YAML syntax after edit.
- Confirm required keys exist for ClawShow (`authToken` at minimum).
- Confirm package/plugin id and channel id are consistent (`clawshow`).
- Confirm `enabled`, `relayUrl`, `authToken`, `name`, `dmPolicy`, and `allowFrom` are directly under `channels.clawshow` (no `default` layer).
9. Apply config (Config RPC only)
- Follow `Config RPC (programmatic updates)` exactly, using `config.apply (full replace)`.
- Do not use direct file-edit-only activation, `config.patch`, or manual restart as the primary path.
- Execute:
- `openclaw gateway call config.get --params '{}'`
- Capture `payload.hash` as `baseHash`.
- Build the full post-migration config as one JSON5 string in `raw`.
- `openclaw gateway call config.apply --params '{ "raw": "<full-json5-config>", "baseHash": "<hash>", "note": "migrate to @bowong/clawshow-gateway" }'`
- Respect control-plane rate limits for write RPCs (`config.apply`, `config.patch`, `update.run`): 3 requests per 60 seconds per `deviceId+clientIp`.
- If apply fails due to stale hash/conflict, call `config.get` again, rebase on newest config, and retry once.
10. Verify runtime behavior
- Do not force a manual restart here; `config.apply` already validates, writes, and restarts in one step.
- Run status/probe command if available.
- Do not send outbound test messages by default.
- Only send an external test message if the user explicitly asks for network verification.
11. Report outcome
- Include the backup file path.
- Include verification command results.
- If verification is blocked, state the blocker and provide the exact next command.
## Canonical Target Snippet
Use this structure when writing or repairing JSON config:
```json
{
"channels": {
"clawshow": {
"enabled": true,
"relayUrl": "wss://clawshow-api.bowong.cc",
"authToken": "YOUR_CLAWSHOW_AUTH_TOKEN",
"name": "ClawShow Gateway",
"dmPolicy": "open",
"allowFrom": [
"*"
]
}
}
}
```
## Guardrails
- Keep edits minimal and reversible.
- Never invent secrets; leave placeholders for missing keys.
- Never exfiltrate secrets from local files.
- Never rewrite formatting style of the whole file.
- Never remove unrelated keys to "clean up".
don't have the plugin yet? install it then click "run inline in claude" again.
extracted decision logic into explicit if-else branches, added rate limit and hash conflict handling, documented external RPC dependencies and edge cases, clarified rollback procedure and outcome signals, enforced config contract with validation rules.
install the @bowong/clawshow-gateway plugin into OpenClaw, migrate your existing Gateway channel config to ClawShow format, and apply changes safely with full rollback capability. use this when you want a one-step plugin install plus config migration without repeating setup each run. the skill applies changes via Config RPC (full replace mode) with minimal file access and zero default outbound test traffic.
authToken (required): your ClawShow authentication token. set as env var CLAWSHOW_AUTH_TOKEN or pass inline. if missing, the skill stops and asks once before proceeding.relayUrl (optional): WebSocket relay endpoint. defaults to wss://clawshow-api.bowong.cc. override only if using a private ClawShow relay.openclaw (required): OpenClaw CLI binary must be in PATH. the skill calls openclaw version, openclaw plugins install, openclaw plugins list, and openclaw gateway call.npm (required): Node package manager must be available to install the ws dependency.config.get and 1 call to config.apply (retries once if hash conflict). plan accordingly if running multiple migrations in parallel.install ws dependency
npm i ws in the project root.identify current config source
/home/user/my-project/gateway-config.json). if multiple candidates exist, pick the one the running Gateway process is using. if no config file found, stop and report the directory searched.create rollback copy before edits
.bak.YYYYMMDD-HHMM). example: gateway-config.json.bak.20260313-1405.check OpenClaw version gate
openclaw version. parse the version string. compare against 2026.3.2 using OpenClaw's semantic versioning rules.2026.3.2, run openclaw update, wait for completion, then run openclaw version again to confirm. if version >= 2026.3.2, proceed directly to step 5.2026.3.2 or 2027.1.0). if upgrade fails, report the error and stop.install plugin/package
openclaw plugins install @bowong/clawshow-gateway. wait for completion. then run openclaw plugins list and verify the package id @bowong/clawshow-gateway appears in the output.migrate channel config to ClawShow
channels.clawshow section exists (create it if missing). set the following keys directly under channels.clawshow:enabled: truerelayUrl: "wss://clawshow-api.bowong.cc" (use the override relayUrl if provided)authToken: "<value from CLAWSHOW_AUTH_TOKEN or input>" (use the actual token, not a placeholder)name: "ClawShow Gateway"dmPolicy: "open"allowFrom: ["*"]remove conflicting legacy routing only when necessary
enabled: false on the specific route, not the whole channel).validate config shape
channels.clawshow.authTokenchannels.clawshow.enabled (must be true)channels.clawshow.namechannels.clawshow.dmPolicychannels.clawshow.allowFromrelayUrl is present (required). confirm package/plugin id and channel id are consistent (clawshow). confirm all ClawShow keys are directly under channels.clawshow, not nested under a default layer.apply config via Config RPC (full replace)
openclaw gateway call config.get --params '{}'. capture the payload.hash field from the response as baseHash. build the full post-migration config as a single JSON5 string. execute openclaw gateway call config.apply --params '{ "raw": "<full-json5-config>", "baseHash": "<hash>", "note": "migrate to @bowong/clawshow-gateway" }'.verify runtime behavior
openclaw gateway status or openclaw health) to confirm the Gateway is running and ClawShow is active.report outcome
openclaw plugins list (confirming @bowong/clawshow-gateway is installed)openclaw gateway call config.get (new config hash)openclaw gateway status or similar). if that is ambiguous, ask the user to specify the file path.openclaw update, confirm success, and proceed. if update fails, stop and report the error.openclaw plugins list, do not reinstall unless the user explicitly asks or a version repair is needed.gateway-config.json.bak.20260313-1405). the backup is never deleted during this skill run and is always available for rollback./home/user/my-project/gateway-config.json) is updated in place with the ClawShow channel section added and legacy routes disabled (if necessary).openclaw gateway call config.apply, indicating the new config hash and confirmation that the change was written and the Gateway restarted.openclaw gateway status) confirming the Gateway is running and ClawShow is active, or a blocker message if verification is unavailable.the skill has succeeded when all of the following are true:
channels.clawshow section with all required keys (enabled: true, authToken, name, dmPolicy, allowFrom, relayUrl) and valid values.openclaw plugins list shows @bowong/clawshow-gateway as installed.openclaw gateway call config.apply returned a success response with a new config hash.if any step fails (e.g., authToken missing, version check fails, config.apply conflicts, verification blocked), the skill stops and reports the specific failure with the exact command to retry or the user action needed to proceed.
credits: original author yudi-xiao (clawhub). enriched to Implexa standards with explicit decision points, rate limit guidance, hash conflict handling, and rollback procedure.