ClawMart Install Skill
You are helping the user find and install an OpenClaw configuration pack from ClawMart. Follow these steps exactly and in order.
Configuration
- - ClawMart API base URL: INLINECODE0
- Config file: INLINECODE1
- Install target:
~/.openclaw/workspace/ (non-skill files) - Skills target:
~/.openclaw/workspace/skills/ (skill folders) - Backup directory: INLINECODE4
Step 1: Check API Token
Read ~/.openclaw/clawmart-config.json. If the file does not exist or token is empty:
Tell the user:
You need a ClawMart API Token to download packs. Please visit https://clawmart-gray.vercel.app/dashboard/tokens to generate one, then paste it here.
Once the user provides a token (format: cm_ followed by hex characters), save it:
CODEBLOCK0
Write this to ~/.openclaw/clawmart-config.json.
Step 2: Determine Search Query
Extract the pack name from the user's message. If the user said something like "install Deep Research Analyst", the search query is "Deep Research Analyst".
If no specific name was mentioned, ask:
Which pack would you like to install? Enter a search keyword.
Step 3: Search ClawMart
Call:
CODEBLOCK1
Parse the packs array from the response. If empty, tell the user:
No packs found matching "{query}". Please try different keywords.
Then stop.
If results exist, display them as a numbered list:
CODEBLOCK2
Wait for user input.
Step 4: Show Pack Details
Use the data already returned from the search response (no extra API call needed). Display:
CODEBLOCK3
Note the id from the search result — it is used in Step 6 to call the download endpoint.
Step 5: Check for Conflicts
Before downloading, check what files exist in ~/.openclaw/workspace/ and ~/.openclaw/skills/.
Compare with the pack's file list. If any files would be overwritten, list them:
CODEBLOCK4
Step 6: Download Pack
Call the download endpoint:
CODEBLOCK5
The response is JSON — no signed URL, no ZIP file:
CODEBLOCK6
Store this response in memory for Step 8.
Step 7: Backup Conflicting Files
If any conflicting files were found in Step 5:
- 1. Create backup directory: INLINECODE13
- Copy each conflicting file to the backup directory
- Tell the user: INLINECODE14
Step 8: Install Files
Write each entry from the files array in the download response:
- -
type == "SKILLS" → write content to INLINECODE18 - INLINECODE19 → do not write to disk; parse the JSON and display the
clawhub_skills list (see below) - All other files → write
content to INLINECODE22
Create directories if they don't exist.
External skills handling: If the response includes a skills-manifest.json file, parse its clawhub_skills array and inform the user:
CODEBLOCK7
Step 9: Confirm Installation
Tell the user:
CODEBLOCK8
Notes
- - Pack detail page: INLINECODE25
- If token authentication fails (401), direct the user to regenerate at INLINECODE26
- Local skill files are installed to
~/.openclaw/workspace/skills/ and visible after installation - External skills listed in
skills-manifest.json must be installed separately via their own source - No restart required — OpenClaw loads new configuration on the next conversation
ClawMart 安装技能
你正在帮助用户从 ClawMart 查找并安装 OpenClaw 配置包。请严格按照以下步骤并按顺序执行。
配置
- - ClawMart API 基础 URL:https://clawmart-gray.vercel.app
- 配置文件:~/.openclaw/clawmart-config.json
- 安装目标目录:~/.openclaw/workspace/(非技能文件)
- 技能目标目录:~/.openclaw/workspace/skills/(技能文件夹)
- 备份目录:~/.openclaw/backups/
步骤 1:检查 API 令牌
读取 ~/.openclaw/clawmart-config.json。如果文件不存在或 token 为空:
告知用户:
你需要一个 ClawMart API 令牌才能下载配置包。请访问 https://clawmart-gray.vercel.app/dashboard/tokens 生成一个令牌,然后粘贴到此处。
用户提供令牌后(格式:cm_ 后跟十六进制字符),保存为:
json
{
token: <用户提供的令牌>,
base_url: https://clawmart-gray.vercel.app
}
将此内容写入 ~/.openclaw/clawmart-config.json。
步骤 2:确定搜索查询
从用户消息中提取配置包名称。如果用户说安装 Deep Research Analyst,则搜索查询为Deep Research Analyst。
如果未提及具体名称,则询问:
你想安装哪个配置包?请输入搜索关键词。
步骤 3:搜索 ClawMart
调用:
GET {base_url}/api/packs/search?q={query}&limit=8
从响应中解析 packs 数组。如果为空,告知用户:
未找到匹配{query}的配置包。请尝试其他关键词。
然后停止。
如果存在结果,以编号列表形式显示:
找到以下配置包:
- 1. <配置包标题 A>
作者:@用户名 · ⭐ 4.8 · ↓ 1.2K
包含:SOUL、AGENTS、MEMORY、SKILLS ×3
配置包描述...
- 2. <配置包标题 B>
作者:@用户名 · ⭐ 4.5 · ↓ 856
包含:SOUL、AGENTS
配置包描述...
请选择要安装的配置包(输入编号,或输入 0 取消):
等待用户输入。
步骤 4:显示配置包详情
使用搜索响应中已返回的数据(无需额外 API 调用)。显示:
配置包详情:
─────────────────────────────
标题:
作者: @
评分: ⭐ rating> · ↓ count>
描述:
─────────────────────────────
确认安装?(y/n)
注意搜索结果中的 id——它将在步骤 6 中用于调用下载接口。
步骤 5:检查冲突
在下载之前,检查 ~/.openclaw/workspace/ 和 ~/.openclaw/skills/ 中存在哪些文件。
与配置包的文件列表进行比较。如果有任何文件将被覆盖,列出它们:
以下文件将被覆盖(原文件将备份到 ~/.openclaw/backups/2026-03-28-143022/):
· claude.soul.md (现有文件将被备份)
· research.agents.md (新文件)
是否继续?(y/n)
步骤 6:下载配置包
调用下载接口:
POST {base_url}/api/packs/{id}/download
Authorization: Bearer {token}
Content-Type: application/json
响应为 JSON 格式——没有签名 URL,没有 ZIP 文件:
json
{
version: 1.0.0,
files: [
{ name: SOUL.md, type: SOUL, size: 4200, content: ... },
{ name: skills/my.skill.md, type: SKILLS, size: 980, content: ... },
{ name: skills-manifest.json, type: OTHER, size: 180, content: {\clawhub_skills\:[...]} }
]
}
将此响应存储在内存中,供步骤 8 使用。
步骤 7:备份冲突文件
如果在步骤 5 中发现任何冲突文件:
- 1. 创建备份目录:~/.openclaw/backups/{YYYY-MM-DD-HHmmss}/
- 将每个冲突文件复制到备份目录
- 告知用户:已将 {n} 个文件备份到 ~/.openclaw/backups/{timestamp}/
步骤 8:安装文件
将下载响应中 files 数组的每个条目写入:
- - type == SKILLS → 将 content 写入 ~/.openclaw/workspace/skills/{去除 skills/ 前缀的名称}/SKILL.md
- name == skills-manifest.json → 不写入磁盘;解析 JSON 并显示 clawhub_skills 列表(见下文)
- 所有其他文件 → 将 content 写入 ~/.openclaw/workspace/{名称}
如果目录不存在则创建。
外部技能处理: 如果响应中包含 skills-manifest.json 文件,解析其 clawhub_skills 数组并告知用户:
此配置包引用了不会自动安装的外部技能:
- (v1.0.0)
- (v2.0.0)
要安装它们,请为每个来源运行相应的插件安装命令。
步骤 9:确认安装
告知用户:
安装完成!
已安装到 ~/.openclaw/workspace/:
· claude.soul.md
· research.agents.md
· deep_analysis.boot.md
· memory_projects.json
已安装到 ~/.openclaw/skills/:
· 3 个技能文件
备份位置:~/.openclaw/backups/2026-03-28-143022/(将文件复制回原处以恢复)
重启 OpenClaw 以加载新配置。
备注
- - 配置包详情页面:{baseurl}/packs/{id}
- 如果令牌认证失败(401),引导用户在 {baseurl}/dashboard/tokens 重新生成
- 本地技能文件安装到 ~/.openclaw/workspace/skills/,安装后即可查看
- skills-manifest.json 中列出的外部技能必须通过各自来源单独安装
- 无需重启——OpenClaw 将在下次对话时加载新配置