← 返回 Skills 市场
rwonly

agentar

作者 Rex Wang · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
293
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install agentar
功能描述
Export and import AI agent avatar (aka agentar) instances as portable .claw packages for backup, sharing, and migration.
使用说明 (SKILL.md)

\r \r

Agentar Skill Overview\r

\r Fast CLI to distribute an AI agent.\r \r

CLI Reference\r

\r

Save (Export)\r

\r

node {baseDir}/scripts/clawctl.mjs save \x3Cnamespace/name:tag> [options]\r
```\r
\r
| Flag | Description | Default |\r
|------|-------------|---------|\r
| `-o \x3Cpath>` | Output file path | `./\x3Cname>-\x3Ctag>.claw` |\r
| `--source \x3Cpath>` | OpenClaw state directory | `~/.openclaw` |\r
| `--description \x3Ctext>` | Package description | (empty) |\r
| `--include-memory` | Include MEMORY.md | false |\r
\r
### Load (Import)\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs load \x3Cfile> [options]\r
```\r
\r
Load **automatically creates a backup** before installing. This can be skipped with `--no-backup`.\r
\r
| Flag | Description | Default |\r
|------|-------------|---------|\r
| `--target \x3Cpath>` | Target OpenClaw state dir | `~/.openclaw` |\r
| `--agent-name \x3Cname>` | Name for the imported agent | from manifest |\r
| `--dry-run` | Preview without installing | false |\r
| `--no-backup` | Skip auto-backup | false |\r
\r
### Backup\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs backup [--source \x3Cpath>] [--label \x3Ctext>]\r
```\r
\r
Create a snapshot of current workspace + config. Stored in `~/.openclaw/.agentar-backups/\x3Cid>/`.\r
\r
### List Backups\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs backups [--source \x3Cpath>]\r
```\r
\r
### Rollback\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs rollback [\x3Cid>] [--target \x3Cpath>]\r
```\r
\r
Restore from a backup. If no `\x3Cid>` given, uses the latest. Before restoring, a safety backup of the current state is created automatically.\r
\r
---\r
\r
## AI Agent Behavior Guide\r
\r
When the user triggers this skill, follow the intelligent workflows below instead of blindly running commands.\r
\r
### Export Workflow\r
\r
When the user says things like "导出 claw", "export my setup", "backup my openclaw":\r
\r
**Step 1 — Gather context automatically**\r
\r
Before asking the user anything, silently gather:\r
\r
```bash\r
# Check what's in the workspace\r
ls ~/.openclaw/workspace/\r
\r
# Read identity to infer a good package name\r
cat ~/.openclaw/workspace/IDENTITY.md 2>/dev/null | head -20\r
\r
# Check installed skills (these get recorded in the manifest)\r
clawhub list --workdir ~/.openclaw 2>/dev/null\r
\r
# Check config exists\r
test -f ~/.openclaw/openclaw.json && echo "config exists" || echo "no config"\r
```\r
\r
**Step 2 — Infer smart defaults, then confirm with user**\r
\r
Based on what you found:\r
- **ref**: Use the agent's name/identity as the package name. Example: if IDENTITY.md says the agent is called "X", use `user/x:v1`. If unclear, ask.\r
- **output**: Default to `~/Desktop/\x3Cname>.claw` (easy to find and share). On Linux, use `~/`.\r
- **description**: Summarize the agent's personality/purpose from IDENTITY.md or SOUL.md in one sentence.\r
- **include-memory**: Default NO. Only suggest YES if the user explicitly mentions wanting to transfer memories.\r
\r
Present your plan concisely:\r
\r
> I'll export your OpenClaw as `user/x:v1` to `~/Desktop/x-v1.claw`.\r
> Description: "An assistant named X with ..."\r
> Memory: not included\r
> Skills bundled: [email protected], custom-skill (2 skills from ~/.openclaw/skills/)\r
>\r
> Proceed?\r
\r
**Step 3 — Execute and report**\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs save \x3Cref> -o \x3Cpath> --description "\x3Cdesc>"\r
```\r
\r
After success, tell the user:\r
1. The file location and size\r
2. How many files were included\r
3. How many credentials were stripped (reassure them it's safe to share)\r
4. How to transfer it: "Copy this file to another machine, then tell that machine's OpenClaw '请安装这个 claw 包'"\r
\r
### Import Workflow\r
\r
When the user says things like "导入 claw", "install this claw", "load this package", or provides a `.claw` file path:\r
\r
**Step 1 — Locate the .claw file**\r
\r
If the user didn't specify a path, search for it:\r
\r
```bash\r
# Check common locations\r
ls ~/Desktop/*.claw ~/Downloads/*.claw /tmp/*.claw ~/*.claw 2>/dev/null\r
```\r
\r
If multiple `.claw` files found, list them and ask which one. If none found, ask the user for the path.\r
\r
**Step 2 — Preview first (always)**\r
\r
ALWAYS dry-run before installing:\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs load \x3Cfile> --dry-run\r
```\r
\r
Present the preview to the user clearly:\r
- Package name and description\r
- Number of workspace files (list them)\r
- Required credentials that need to be configured\r
- Required skills that need to be installed\r
\r
**Step 3 — Analyze conflicts**\r
\r
Before installing, check what already exists:\r
\r
```bash\r
# Check if workspace files would be overwritten\r
ls ~/.openclaw/workspace/\r
```\r
\r
If existing files would be overwritten, WARN the user explicitly:\r
\r
> The following files already exist and will be overwritten:\r
> - IDENTITY.md\r
> - SOUL.md\r
>\r
> Your current agent personality will be replaced. A backup will be created automatically so you can rollback if needed. Continue?\r
\r
**Step 4 — Install (with auto-backup)**\r
\r
The load command automatically creates a backup before installing:\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs load \x3Cfile>\r
```\r
\r
This will output something like:\r
```\r
  Creating backup before install...\r
  Backup created: 20260308-143022 (12 files)\r
  Rollback with: clawctl rollback 20260308-143022\r
```\r
\r
Tell the user the backup id and reassure them they can rollback at any time.\r
\r
**Step 5 — Post-install intelligence**\r
\r
This is where AI adds the most value. The `load` command already handles:\r
- Auto-backup before install (with rollback id)\r
- Workspace file installation\r
- **Bundled skill installation** (skills packaged in the .claw are auto-installed to `~/.openclaw/skills/`)\r
- Existing skill version comparison (skips if same or newer version already installed)\r
\r
After the load command completes, the agent should handle:\r
\r
1. **Skill gap check** — The load output shows "Additional skills referenced in config (not bundled, may be built-in)". For each:\r
   - If it's a built-in OpenClaw skill (like `coding-agent`, `github`), it's already available — no action needed.\r
   - If it's a ClawHub skill, offer to install:\r
\r
   ```bash\r
   clawhub install \x3Cskill-name> --workdir ~/.openclaw\r
   ```\r
\r
2. **Config merge** — Read both `~/.openclaw/openclaw.json` and `~/.openclaw/openclaw.imported.json`. Identify what the imported config adds (new model providers, channel settings, skill configurations) vs what the current config already has. Present a summary:\r
\r
   > The imported config includes:\r
   > - Telegram channel config (needs bot token)\r
   > - Custom model provider "kimi-code"\r
   > - Skill config for "nano-banana-pro"\r
   >\r
   > Your current config already has: [list]\r
   > New items to merge: [list]\r
   > Shall I merge the non-sensitive settings?\r
\r
   If the user agrees, read both JSON files, merge intelligently (keep current credentials, add new non-sensitive settings), and write back to `openclaw.json`.\r
\r
3. **Credential checklist** — For each `$CLAW_PLACEHOLDER` in the imported config, tell the user exactly what they need to set:\r
\r
   > To complete the setup, you need to configure:\r
   > - Telegram bot token: `openclaw config set channels.telegram.botToken \x3Cyour-token>`\r
   > - Gateway auth token: `openclaw config set gateway.auth.token \x3Cyour-token>`\r
\r
4. **Verification** — After everything is done, do a quick health check:\r
\r
   ```bash\r
   # Verify workspace files are in place\r
   ls ~/.openclaw/workspace/\r
   # Verify skills are installed\r
   ls ~/.openclaw/skills/\r
   # Verify config is valid JSON\r
   node -e "JSON.parse(require('fs').readFileSync(require('os').homedir()+'/.openclaw/openclaw.json','utf8')); console.log('Config OK')"\r
   ```\r
\r
### Rollback Workflow\r
\r
When the user says "回滚", "rollback", "undo import", "restore my old config":\r
\r
**Step 1 — List available backups**\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs backups\r
```\r
\r
Show the user what's available with timestamps and labels.\r
\r
**Step 2 — Confirm which backup to restore**\r
\r
If only one backup exists, confirm:\r
\r
> Found 1 backup: `20260308-143022` (before-load:my-bot.claw, 12 files)\r
> Restore this? A safety backup of your current state will be created first.\r
\r
If multiple, ask user to pick.\r
\r
**Step 3 — Execute rollback**\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs rollback \x3Cid>\r
```\r
\r
The rollback command automatically creates a safety backup of the current state before restoring, so the user can undo the undo if needed.\r
\r
**Step 4 — Verify**\r
\r
```bash\r
ls ~/.openclaw/workspace/\r
```\r
\r
Confirm the restored files match expectations.\r
\r
### Manual Backup Workflow\r
\r
When the user says "备份一下当前状态", "save a checkpoint", "backup before I try something":\r
\r
```bash\r
node {baseDir}/scripts/clawctl.mjs backup --label "user description here"\r
```\r
\r
Report the backup id so they can reference it later.\r
\r
### Edge Cases\r
\r
- **User says "导出" without any context**: Gather info first, then propose defaults. Never ask more than 2 questions.\r
- **User provides a URL instead of a file path**: Download the file first with `curl -o /tmp/downloaded.claw \x3Curl>`, then proceed with import.\r
- **Import on a fresh OpenClaw with no existing config**: Skip conflict checking, just install everything directly. Auto-backup still runs (backs up the empty state — gives a clean rollback target).\r
- **User wants to export + share in one step**: After export, suggest easy transfer methods (AirDrop, scp, cloud drive).\r
- **Multiple .claw files**: If the user says "install all claw packages", iterate through them one by one with preview for each.\r
- **Rollback chain**: Each rollback creates a safety backup, so the user can always undo a rollback. Explain this when asked.\r
- **Disk space**: If the user has many backups, suggest cleaning old ones: `rm -rf ~/.openclaw/.agentar-backups/\x3Cold-id>`.\r
\r
## What Gets Exported\r
\r
- Workspace files (system prompt, agent personality, custom instructions)\r
- Sanitized configuration (credentials replaced with `$CLAW_PLACEHOLDER`)\r
- **All user-installed skills** from `~/.openclaw/skills/` (full files, auto-installed on import)\r
- Skill list and channel list (metadata for dependency tracking)\r
\r
## What Does NOT Get Exported\r
\r
- API keys, tokens, passwords (automatically stripped)\r
- Session logs and history\r
- Memory (unless `--include-memory` is specified)\r
- Credentials directory\r
- Binary files (images, keys, certificates)\r
\r
## What Gets Backed Up (on load/rollback)\r
\r
- All workspace files (`~/.openclaw/workspace/`)\r
- Configuration (`~/.openclaw/openclaw.json`)\r
- Stored in `~/.openclaw/.agentar-backups/\x3Ctimestamp>/`
安全使用建议
This skill appears to implement export/import workflows, but several things don't add up. Before installing or using it: 1) Confirm which binary/script it actually expects — either an 'agentar' binary or the Node script scripts/clawctl.mjs — and inspect that code locally (don't rely only on this instruction file). 2) Be aware it instructs the agent to read files in ~/.openclaw and search Desktop/Downloads silently; if you want control, require explicit user confirmation before those reads. 3) Treat incoming .claw packages as untrusted: always run the suggested dry-run, review the package contents, and back up your OpenClaw state before installing. 4) Disable or review auto-installation of bundled skills in imports — those will be copied into ~/.openclaw/skills/ and can execute arbitrary code. 5) If you cannot inspect the referenced scripts or verify the 'credential stripping' behavior, avoid sharing sensitive packages and consider running tool actions in a sandboxed environment. These inconsistencies and privacy-sensitive behaviors are why I rate the skill as suspicious.
功能分析
Type: OpenClaw Skill Name: agentar Version: 1.0.0 The agentar skill provides powerful administrative capabilities for exporting, importing, and backing up OpenClaw agent instances, which involves high-risk behaviors such as broad file system access to ~/.openclaw, modification of core configuration files, and remote file downloading via curl (SKILL.md). While the instructions include safety measures like automated backups and dry-runs, the skill's ability to overwrite the agent's identity and soul files, combined with the execution of local scripts (clawctl.mjs) using potentially unsanitized inputs, creates a significant attack surface. No clear evidence of malicious intent was found, but the capabilities are inherently risky and go beyond simple task execution.
能力评估
Purpose & Capability
Registry metadata and the SKILL.md disagree: the metadata requires a binary named 'agentar', but the runtime instructions repeatedly call node {baseDir}/scripts/clawctl.mjs. This skill is instruction-only and provides no code files, so the referenced scripts/binary will not actually be present unless installed separately. That mismatch is disproportionate and unclear.
Instruction Scope
The SKILL.md explicitly directs the agent to 'silently gather' local data (ls of ~/.openclaw/workspace/, cat ~/.openclaw/workspace/IDENTITY.md, clawhub list, searching Desktop/Downloads/tmp for .claw files). Those filesystem reads are broadly consistent with backup/import functionality, but the instructions emphasize doing them without first asking the user and thus raise privacy/consent concerns. The import workflow also auto-installs bundled skills into ~/.openclaw/skills/, which can introduce arbitrary third-party code.
Install Mechanism
There is no install spec (instruction-only), which minimizes installer risk. However, the runtime commands reference a local Node script (scripts/clawctl.mjs) that is not included in the package; without that script or the claimed 'agentar' binary, the instructions are not executable. This gap is an incoherence to resolve before trusting the skill.
Credentials
The skill does not request environment variables or credentials (requires.env is empty), which is appropriate. That said, the skill plans to read local files (IDENTITY.md, SOUL.md, installed-skills lists) and to report how many credentials were 'stripped' from a package — but no mechanism is provided to verify what is stripped. Verify the credential-stripping behavior before sharing packages.
Persistence & Privilege
always:false and default model invocation are fine. The import process will write backups to ~/.openclaw/.agentar-backups/ and auto-install bundled skills into ~/.openclaw/skills/, which is expected for an import tool but does modify user state and can expand attack surface if .claw packages are untrusted.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agentar
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agentar 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of agentar: export/import AI agent avatars as portable .claw packages. - Provides CLI commands to save (export), load (import), backup, list, and rollback AI agent instances via OpenClaw. - Exports agent workspace, config, and skills as a shareable .claw package, with optional memory inclusion. - Import command auto-previews package contents, auto-creates backups, and checks for file conflicts. - Workflows guide users through export, import, backup, and rollback processes with safety and clarity. - Includes detailed CLI references and AI behavior guidelines for smooth agent migration and sharing.
元数据
Slug agentar
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

agentar 是什么?

Export and import AI agent avatar (aka agentar) instances as portable .claw packages for backup, sharing, and migration. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 293 次。

如何安装 agentar?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agentar」即可一键安装,无需额外配置。

agentar 是免费的吗?

是的,agentar 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

agentar 支持哪些平台?

agentar 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 agentar?

由 Rex Wang(@rwonly)开发并维护,当前版本 v1.0.0。

💬 留言讨论