importlisted
Install: claude install-skill crisandrews/ClawCode
# Import an OpenClaw Agent
Import an existing agent from an OpenClaw installation into this directory, then offer the same setup steps a new agent gets (QMD, messaging, crons).
## Part 1: Copy the agent
1. **Discover OpenClaw workspaces** across plausible source locations. Users
commonly run OpenClaw as `root` and then run ClawCode as a non-root user
(e.g. inside an LXC where the service user is `claude`), so checking only
`~/.openclaw` misses those setups. Look in every readable root below and
union the results:
```bash
for root in \
"${CLAWCODE_OPENCLAW_ROOT:-}" \
"$HOME/.openclaw" \
"/root/.openclaw"; do
[[ -z "$root" ]] && continue
[[ -r "$root" ]] || continue
ls -d "$root"/workspace* 2>/dev/null
done | sort -u
```
Override the search roots with the `CLAWCODE_OPENCLAW_ROOT` env var when
OpenClaw data lives in a non-standard location (e.g. a mounted volume).
If the loop returns nothing, ask the user for an absolute path to the
source workspace instead of silently falling back.
For each workspace found, read `IDENTITY.md` to show the agent's name.
Typical layouts:
- `<root>/workspace/` — default agent (main)
- `<root>/workspace-eva/` — agent "eva"
- `<root>/workspace-jack/` — agent "jack"
2. **Let the user choose** which agent to import (or use argument if provided).
3. **Determine the source path**: use the absolute path from the chosen
workspace (e.g. `/root/.openclaw/workspace-ev