CatchClaw Agentar Manager
Source: This skill is from the CatchClaw skill repository.
An agentar is a distributable agent archive (ZIP) containing workspace files such as SOUL.md, skills, and other configuration. It can be installed as a new agent or used to overwrite an existing agent with a single command.
Trigger Conditions
- - User asks to search / find / browse agentars
- User asks to install / download a specific agentar
- User asks to export / package an agent as an agentar
- User asks to rollback / undo / restore a previous agent workspace
- User mentions the keyword "agentar" or "catchclaw"
Important: Before performing any action, verify the bundled CLI works (see CLI Setup). Do not run search, install, export, or rollback until verification passes.
CLI Setup (mandatory — run before any command)
Before running any search, install, export, or rollback command, you MUST verify the bundled CLI. The CLI (agentar_cli.mjs) is bundled in this skill's directory — no download or copy is needed.
- 1. Locate: The CLI is at the same directory as this SKILL.md (e.g.
~/.agents/skills/catchclaw/agentar_cli.mjs). - Verify: Run
node <skill-dir>/agentar_cli.mjs version. Only after it succeeds, proceed with search/install/export/rollback.
Never run $CLI search, $CLI install, $CLI export, or $CLI rollback until verification passes.
CLI Location
The CLI is bundled in this skill's directory. Run it directly:
CODEBLOCK0
Where <skill-dir> is the directory containing this SKILL.md (e.g. ~/.agents/skills/catchclaw/).
All commands below use $CLI as shorthand for node <skill-dir>/agentar_cli.mjs.
Environment Variables (optional)
These are listed in metadata.openclaw.requires.env for registry/security analysis. Neither is required for normal use; omit both to use defaults.
- -
AGENTAR_API_BASE_URL — Override the default API base URL (defaults to https://catchclaw.me) - INLINECODE14 — Override the default CLI config directory (defaults to
~/.agentar)
Paths read or written by the bundled CLI
Aligned with metadata.openclaw.requires.config and metadata.json in this skill:
| Path | Access | Purpose |
|---|
| INLINECODE18 | read/write | CLI config (config.json), optional standalone install copy of INLINECODE20 |
| INLINECODE21 |
read/write | Main agent workspace (
install --overwrite, export) |
|
~/.openclaw/agentar-workspaces/ | read/write | Per-agent workspaces (
install --name …) |
|
~/agentar-exports/ | write | Default directory for
export ZIP output |
|
<skill-dir>/skills/.credentials | write (optional) | Written when install is run with
--api-key |
Commands
Search
CODEBLOCK1
Search the CatchClaw marketplace for agentars matching the keyword.
Install
CODEBLOCK2
Install an agentar from the marketplace.
Options:
- -
--name <name> — Create a new agent with the given name. Existing agents are not affected. (Preferred; list this option first when prompting.) - INLINECODE30 — Overwrite the main agent (
~/.openclaw/workspace). Existing workspace is backed up automatically. Never use without the user's explicit selection. - INLINECODE32 — (Optional) API key to save into
skills/.credentials for agentars that require backend authentication.
Export
CODEBLOCK3
Export an agent as a distributable agentar ZIP package. MEMORY.md is excluded by default. Output defaults to ~/agentar-exports/. Sensitive files (.credentials, .env, .secret, .key, .pem) are automatically filtered out.
Options:
- -
--agent <id> — Agent ID to export. If the user did not specify an agent, you MUST list agents and ask the user to choose before running export; do not export without the user's selection. - INLINECODE41 — Output ZIP file path.
- INLINECODE42 — Include MEMORY.md in export (excluded by default).
Rollback
CODEBLOCK4
Restore a workspace from backup. Without --latest, lists all available backups for selection. The current workspace is automatically backed up before restoring, so rollback is always safe.
Version
CODEBLOCK5
Show the CLI version.
Installation Rules
Before executing install:
- 1. Slug required: If the user wants to install an agentar but has not specified which one (no slug), prompt the user to enter the agentar name/slug to install. Do NOT run install without a slug.
- Mode confirmation (CRITICAL - MUST ASK USER): You MUST explicitly ask the user to choose the installation mode. Do NOT proceed with installation until the user has made a clear choice. NEVER assume or default to any mode without user confirmation.
Present the following two options to the user and wait for their response:
- 1. new — Create a new agent. The existing agents are not affected.
- overwrite — Overwrite the main agent (~/.openclaw/workspace). The existing workspace will be backed up automatically.
Important:
- - Do NOT execute install until the user explicitly selects one of the above options
- Do NOT use "new" as a default without asking
- Do NOT use "overwrite" unless the user explicitly selects it
- If the user chooses "new" but doesn't specify a name, use the slug as the default name
After the user explicitly selects "new", execute: $CLI install <slug> --name <user-specified name>
After the user explicitly selects "overwrite", execute: INLINECODE46
Never execute install without both: (1) a slug, and (2) explicit user confirmation of installation mode.
Export Rules
When the user has not specified which agent to export, you MUST let the user choose first. Do NOT export on your own. If --agent <id> was not provided by the user:
- 1. Run
$CLI export without --agent to list available agents (or equivalent to show choices). - Present the list to the user and ask which agent to export.
- Only after the user explicitly selects an agent, run
$CLI export --agent <user-selected-id> (and optional -o, --include-memory as needed). Never assume or pick an agent for the user.
- - MEMORY.md is excluded by default. Only include it if the user explicitly requests it with
--include-memory. - Sensitive files are automatically filtered out during export (
.credentials, .env, .secret, .key, .pem). - After a successful export, remind the user to review the exported ZIP for any sensitive data (API keys, credentials, personal information).
- Export is a purely local operation — it does not require network access.
Error Handling
| Error | Action |
|---|
| CLI file not found | Verify the skill is installed correctly — agentar_cli.mjs should be in the skill directory |
| API unreachable or network error |
Suggest checking network connectivity, or override the API URL with:
export AGENTAR_API_BASE_URL=<url> |
| Node.js not installed | Instruct user to install Node.js from https://nodejs.org/ |
| Download or extraction failure | Show the error message and suggest retrying the command |
Workflow
- 1. Search: Run
$CLI search <keyword> to find agentars. Each result includes a slug identifier. - Install: If the user did not specify which agentar to install (no slug), ask the user to enter the agentar name/slug. Then confirm installation mode: present [1] new, [2] overwrite; never use overwrite without explicit user selection. Only after you have both slug and mode, execute the install command.
- Export: If the user did not specify which agent to export, run
$CLI export (no --agent) to list agents, present the list to the user, and ask them to choose. Only after the user selects an agent, run $CLI export --agent <id>. Do not export without the user's explicit selection. - Rollback: If the user wants to undo an overwrite install, run
$CLI rollback to list available backups and restore one.
CatchClaw Agentar Manager
来源: 该技能来自 CatchClaw 技能仓库。
Agentar 是一种可分发的智能体归档文件(ZIP 格式),包含工作区文件,如 SOUL.md、技能和其他配置。它可以通过一条命令安装为新的智能体,或用于覆盖现有的智能体。
触发条件
- - 用户要求搜索/查找/浏览 agentar
- 用户要求安装/下载特定的 agentar
- 用户要求导出/打包智能体为 agentar
- 用户要求回滚/撤销/恢复之前的智能体工作区
- 用户提及关键词 agentar 或 catchclaw
重要提示: 在执行任何操作之前,请验证捆绑的 CLI 是否正常工作(参见 CLI 设置)。在验证通过之前,不要运行搜索、安装、导出或回滚命令。
CLI 设置(强制要求——在任何命令之前执行)
在运行任何搜索、安装、导出或回滚命令之前,您必须验证捆绑的 CLI。 CLI(agentar_cli.mjs)已捆绑在此技能目录中——无需下载或复制。
- 1. 定位: CLI 与此 SKILL.md 位于同一目录(例如 ~/.agents/skills/catchclaw/agentarcli.mjs)。
- 验证: 运行 node /agentarcli.mjs version。仅当该命令成功执行后,才能继续执行搜索/安装/导出/回滚操作。
在验证通过之前,切勿运行 $CLI search、$CLI install、$CLI export 或 $CLI rollback。
CLI 位置
CLI 已捆绑在此技能目录中。直接运行:
bash
node /agentar_cli.mjs
其中 是包含此 SKILL.md 的目录(例如 ~/.agents/skills/catchclaw/)。
以下所有命令均使用 $CLI 作为 node /agentar_cli.mjs 的简写。
环境变量(可选)
这些变量列在 metadata.openclaw.requires.env 中,用于注册表/安全分析。正常使用均不需要;省略两者将使用默认值。
- - AGENTARAPIBASEURL — 覆盖默认的 API 基础 URL(默认为 https://catchclaw.me)
- AGENTARHOME — 覆盖默认的 CLI 配置目录(默认为 ~/.agentar)
捆绑 CLI 读取或写入的路径
与此技能中的 metadata.openclaw.requires.config 和 metadata.json 对齐:
| 路径 | 访问权限 | 用途 |
|---|
| ~/.agentar/ | 读/写 | CLI 配置(config.json),agentar_cli.mjs 的可选独立安装副本 |
| ~/.openclaw/workspace |
读/写 | 主智能体工作区(install --overwrite,export) |
| ~/.openclaw/agentar-workspaces/ | 读/写 | 每个智能体的工作区(install --name …) |
| ~/agentar-exports/ | 写 | export ZIP 输出的默认目录 |
|
/skills/.credentials | 写(可选) | 当使用 --api-key 运行 install 时写入 |
命令
搜索
bash
$CLI search
在 CatchClaw 市场中搜索与关键词匹配的 agentar。
安装
bash
$CLI install --name [--api-key ]
$CLI install --overwrite
从市场安装 agentar。
选项:
- - --name — 使用给定的名称创建新的智能体。现有智能体不受影响。(推荐;提示时请将此选项列在首位。)
- --overwrite — 覆盖主智能体(~/.openclaw/workspace)。现有工作区会自动备份。未经用户明确选择,切勿使用。
- --api-key — (可选)API 密钥,保存到 skills/.credentials 中,用于需要后端身份验证的 agentar。
导出
bash
$CLI export [--agent ] [-o ] [--include-memory]
将智能体导出为可分发的 agentar ZIP 包。默认排除 MEMORY.md。输出默认为 ~/agentar-exports/。敏感文件(.credentials、.env、.secret、.key、.pem)会自动过滤掉。
选项:
- - --agent — 要导出的智能体 ID。如果用户未指定智能体,您必须列出智能体并请用户选择后再运行导出;未经用户选择,不要导出。
- -o, --output — 输出 ZIP 文件路径。
- --include-memory — 在导出中包含 MEMORY.md(默认排除)。
回滚
bash
$CLI rollback
$CLI rollback --latest
从备份恢复工作区。不带 --latest 时,列出所有可用备份供选择。恢复前当前工作区会自动备份,因此回滚始终安全。
版本
bash
$CLI version
显示 CLI 版本。
安装规则
在执行 install 之前:
- 1. 需要 slug: 如果用户想要安装 agentar 但未指定具体是哪一个(没有 slug),请提示用户输入要安装的 agentar 名称/slug。没有 slug 时不要运行 install。
- 模式确认(关键——必须询问用户): 您必须明确要求用户选择安装模式。在用户做出明确选择之前,不要继续安装。未经用户确认,切勿假设或默认任何模式。
向用户展示以下两个选项并等待其回应:
- 1. new — 创建新的智能体。现有智能体不受影响。
- overwrite — 覆盖主智能体(~/.openclaw/workspace)。现有工作区将自动备份。
重要提示:
- - 在用户明确选择上述选项之一之前,不要执行 install
- 未经询问,不要将 new 作为默认选项
- 除非用户明确选择,否则不要使用 overwrite
- 如果用户选择 new 但未指定名称,则使用 slug 作为默认名称
在用户明确选择 new 后,执行:$CLI install --name <用户指定的名称>
在用户明确选择 overwrite 后,执行:$CLI install --overwrite
在同时满足以下两个条件之前,切勿执行 install:(1) 有 slug,(2) 用户明确确认安装模式。
导出规则
当用户未指定要导出哪个智能体时,您必须让用户先选择。不要自行导出。 如果用户未提供 --agent :
- 1. 运行不带 --agent 的 $CLI export 以列出可用智能体(或等效方式显示选项)。
- 向用户展示列表并询问要导出哪个智能体。
- 仅在用户明确选择智能体后,运行 $CLI export --agent <用户选择的id>(以及可选的 -o、--include-memory)。切勿假设或为用户选择智能体。
- - MEMORY.md 默认排除。仅在用户使用 --include-memory 明确要求时才包含它。
- 导出期间敏感文件会自动过滤掉(.credentials、.env、.secret、.key、.pem)。
- 成功导出后,提醒用户检查导出的 ZIP 中是否包含任何敏感数据(API 密钥、凭据、个人信息)。
- 导出是纯本地操作——不需要网络访问。
错误处理
| 错误 | 操作 |
|---|
| CLI 文件未找到 | 验证技能是否正确安装——agentarcli.mjs 应位于技能目录中 |
| API 无法访问或网络错误 |
建议检查网络连接,或使用以下命令覆盖 API URL:export AGENTARAPIBASEURL= |
| Node.js 未安装 | 指导用户从 https://nodejs.org/ 安装 Node.js |
| 下载或解压失败 | 显示错误消息并建议重试该命令 |
工作流程
- 1. 搜索:运行 $CLI search 查找 agentar。每个结果都包含一个 slug 标识符。
- 安装:如果用户未指定要安装哪个 agentar(没有 slug),请询问用户输入 agentar