Skill Usage Setup
Install and configure the OpenClaw Skill Usage plugin.
This skill performs three kinds of actions as part of its normal purpose:
- 1. installs an external npm package (
openclaw-skill-usage) - restarts the OpenClaw Gateway so the plugin can load
- optionally enables cloud-backed usage analytics by writing usage metadata to a TiDB Cloud Zero instance
Use it only when the user explicitly wants skill-usage analytics and understands the local-vs-cloud tradeoff.
After setup, users can:
- - see which skills are actually being used
- rank skills for
1d, 7d, 30d, and INLINECODE4 - break usage down by installation, agent, and channel account
- optionally join multiple OpenClaw installations into one shared leaderboard
Safety / consent rules
- - Installing this plugin is an external package installation.
- Restarting the gateway is a privileged local operation.
- Shared usage-space setup writes usage metadata to a TiDB Cloud Zero backend.
- Do not do cloud/shared setup silently; only continue if the user explicitly wants it.
- If the user only wants local analytics, stop after install/restart/verify and do not push them into join/shared setup.
Trigger phrases
Use this skill when the user expresses intent to install, enable, or configure skill usage analytics.
Common triggers include:
- - "install skill usage"
- "setup skill usage"
- "add usage analytics"
- "show which skills are used most"
- "enable /skillusage"
- "setup shared skill leaderboard"
- "track skill usage across machines"
When to use this skill
Use this skill when the user wants to:
- - install the
openclaw-skill-usage plugin - enable
/skillusage commands - use the
skill_usage_stats tool from agents - check whether skill usage is working at all after install
- run basic usage queries such as
top or INLINECODE9 - understand local-only vs shared usage spaces
- generate a join token for another installation
- connect another installation into the same usage space
This skill is especially appropriate when the user is still in the setup / enablement / verification phase and has not yet fully established the plugin on their machine.
When NOT to use this skill
Do not use this skill for:
- - deep analysis of already-working usage data when no setup or verification help is needed
- advanced troubleshooting unrelated to installing, enabling, restarting, verifying, or joining skill usage
- general OpenClaw gateway debugging outside the scope of this plugin
What gets installed
This setup installs the npm package:
CODEBLOCK0
This provides:
- -
/skillusage slash commands - the
skill_usage_stats tool - local skill usage tracking
- optional TiDB Cloud Zero sync for shared usage spaces
Source repository:
- - https://github.com/lucifinil/openclaw-skill-usage
Privacy and data flow
By default, the plugin is useful locally and can still answer top / status with local-only data.
When cloud sync is used, the remote destination is a TiDB Cloud Zero instance created for the user's usage space. The plugin's /skillusage status output shows the cloud instance id and a claim URL for that instance.
That claim URL matters: the user can use it to claim the TiDB Cloud Zero instance into their own TiDB Cloud account, making the backend directly visible and controllable from their side rather than remaining an opaque shared service.
Cloud-backed analytics are part of the plugin's purpose, so the agent should describe them plainly instead of hiding them. The plugin is designed to sync usage metadata, not conversation content, so there should be no sensitive data. The intended synced fields are limited to:
- - skill names
- installation labels
- agent labels
- channel labels
- timestamps, status, and latency
The plugin does not sync:
- - message bodies or conversation text
- prompts or completions
- SKILL.md contents
- API keys, auth tokens, cookies, or other secrets
Definition of Done
This task is not complete until all of the following are true:
- 1. the plugin is installed
- the OpenClaw Gateway has been restarted
- INLINECODE15 works
- INLINECODE16 works
- if the user wanted cross-machine sharing, they were shown how to use
/skillusage join-token and INLINECODE18
Install flow
Step 1 — Install plugin
Run:
CODEBLOCK1
If the user is working from a local cloned repo instead of npm, a development install may use:
CODEBLOCK2
But prefer the published npm package for normal setup.
Step 2 — Restart Gateway
Run:
CODEBLOCK3
Before restarting, tell the user clearly that the gateway will restart and they may need to wait about a minute before testing commands.
Step 3 — Verify install
Check:
CODEBLOCK4
A successful install should return usable output rather than a missing-command or plugin-load error.
Example output
Compact top output:
CODEBLOCK5
Status output:
CODEBLOCK6
Join / shared usage spaces
By default, one installation starts in its own local usage space.
Only proceed with shared usage-space setup if the user explicitly wants cross-machine sharing and understands that usage metadata will be written to the TiDB Cloud Zero instance for that usage space.
If the user wants to share usage across multiple installations:
On installation 1
CODEBLOCK7
On installation 2
CODEBLOCK8
After join, top can show multiple installation blocks in one shared leaderboard.
Notes for the agent
- - Prefer npm installation for regular users.
- Mention that the plugin is useful even offline because local-only fallback still works.
- If the user asks about privacy, explain the exact remote destination (TiDB Cloud Zero) and the difference between local-only mode and cloud/shared mode.
- Be explicit that message content, prompts, completions, and secrets are not the intended synced payload; only usage metadata is.
- Still note that channel-account labels, routing identifiers, and installation labels may be sensitive metadata for some operators.
- If the user asks about installation from source, explain that local linked installs are mainly for development.
Example agent actions
- install
openclaw-skill-usage
- restart gateway
- run
/skillusage status
- explain whether the result is local-only or cloud-synced
- - "Check if skill usage is working"
- run
/skillusage status
- run
/skillusage top 7d
- confirm that the plugin is loaded and returning usable analytics output
- if setup is not complete yet, finish install/restart/verify first
- then run
/skillusage top 7d or use
skill_usage_stats
- explain the returned ranking in plain language
- - "Set up a shared leaderboard across two machines"
- install on both machines
- restart gateway on both machines
- run
/skillusage join-token on machine 1
- run
/skillusage join <token> on machine 2
- verify the joined result with
/skillusage status and INLINECODE29
- install plugin
- restart gateway
- confirm slash commands work
- demonstrate
status and INLINECODE31
技能使用设置
安装并配置 OpenClaw 技能使用 插件。
该技能在其正常用途中执行三种操作:
- 1. 安装外部 npm 包(openclaw-skill-usage)
- 重启 OpenClaw Gateway 以便加载插件
- 可选地通过将使用元数据写入 TiDB Cloud Zero 实例来启用基于云的使用分析
仅在用户明确需要技能使用分析并理解本地与云端的权衡时使用。
设置完成后,用户可以:
- - 查看哪些技能正在被实际使用
- 对 1天、7天、30天 和 全部 时间段内的技能进行排名
- 按安装、代理和频道账户细分使用情况
- 可选地将多个 OpenClaw 安装合并到一个共享排行榜中
安全/同意规则
- - 安装此插件属于外部包安装。
- 重启网关属于特权本地操作。
- 共享使用空间设置会将使用元数据写入 TiDB Cloud Zero 后端。
- 不要静默执行云端/共享设置;仅在用户明确要求时才继续。
- 如果用户只需要本地分析,则在安装/重启/验证后停止,不要推动用户加入/共享设置。
触发短语
当用户表达安装、启用或配置技能使用分析的意图时使用此技能。
常见触发词包括:
- - 安装技能使用
- 设置技能使用
- 添加使用分析
- 显示最常用的技能
- 启用 /skillusage
- 设置共享技能排行榜
- 跨机器追踪技能使用
何时使用此技能
当用户想要以下操作时使用此技能:
- - 安装 openclaw-skill-usage 插件
- 启用 /skillusage 命令
- 从代理使用 skillusagestats 工具
- 安装后检查技能使用是否正常工作
- 运行基本使用查询,如 top 或 status
- 理解仅本地与共享使用空间的区别
- 为另一个安装生成加入令牌
- 将另一个安装连接到同一使用空间
当用户仍处于设置/启用/验证阶段且尚未在其机器上完全建立插件时,此技能特别适用。
何时不使用此技能
不要将此技能用于:
- - 对已经正常工作的使用数据进行深入分析(无需设置或验证帮助时)
- 与安装、启用、重启、验证或加入技能使用无关的高级故障排除
- 超出此插件范围的通用 OpenClaw Gateway 调试
安装内容
此设置安装 npm 包:
bash
openclaw plugins install openclaw-skill-usage
提供以下功能:
- - /skillusage 斜杠命令
- skillusagestats 工具
- 本地技能使用追踪
- 可选的 TiDB Cloud Zero 同步用于共享使用空间
源代码仓库:
- - https://github.com/lucifinil/openclaw-skill-usage
隐私与数据流
默认情况下,该插件在本地有用,并且仍然可以使用仅本地数据回答 top / status 查询。
当使用云同步时,远程目标是为用户使用空间创建的 TiDB Cloud Zero 实例。插件的 /skillusage status 输出显示云实例 ID 和该实例的认领 URL。
该认领 URL 很重要:用户可以使用它将 TiDB Cloud Zero 实例认领到自己的 TiDB Cloud 账户中,从而使后端从用户侧直接可见和可控,而不是保持为不透明的共享服务。
基于云的分析是插件用途的一部分,因此代理应如实描述而非隐藏。该插件设计为同步使用元数据,而非对话内容,因此不应包含敏感数据。预期的同步字段限于:
- - 技能名称
- 安装标签
- 代理标签
- 频道标签
- 时间戳、状态和延迟
该插件不同步:
- - 消息正文或对话文本
- 提示或补全内容
- SKILL.md 内容
- API 密钥、认证令牌、cookies 或其他机密信息
完成标准
此任务未完成,直到以下所有条件都满足:
- 1. 插件已安装
- OpenClaw Gateway 已重启
- /skillusage status 正常工作
- /skillusage top 7d 正常工作
- 如果用户需要跨机器共享,已向他们展示如何使用 /skillusage join-token 和 /skillusage join
安装流程
步骤 1 — 安装插件
运行:
bash
openclaw plugins install openclaw-skill-usage
如果用户使用的是本地克隆仓库而非 npm,开发安装可能使用:
bash
openclaw plugins install --link
但常规设置优先使用已发布的 npm 包。
步骤 2 — 重启 Gateway
运行:
bash
openclaw gateway restart
重启前,明确告知用户网关将重启,他们可能需要等待约一分钟才能测试命令。
步骤 3 — 验证安装
检查:
text
/skillusage status
/skillusage top 7d
成功安装应返回可用输出,而非命令缺失或插件加载错误。
示例输出
紧凑的 top 输出:
text
技能: weather (37)
- - 代理: elon 26 | main 10 | tim 1
- 频道: disc/el 26 | wa 6 | tim 2 | unknown 3
=====================================
技能: skill-vetter (12)
- - 代理: main 9 | tim 2 | elon 1
- 频道: wa 7 | disc/el 3 | tim 1 | unknown 1
=====================================
技能: github (8)
- - 代理: elon 6 | main 1 | unknown 1
- 频道: disc/el 6 | wa 1 | unknown 1
状态输出:
text
技能使用状态:
数据源:云同步使用空间
范围:当前使用空间
使用空间:7f2c...(已加入)
此安装:Mac-mini
数据库:openclawskillusage
云实例:zero_abc123
过期时间:2026-04-06T10:00:00.000Z
认领 URL:https://...
同步总数:38 次触发,45 次尝试
最后观测时间:2026-03-08T07:40:00.000Z
最后云同步:2026-03-08T07:40:02.000Z
待处理本地记录:0
最后同步错误:无
发送的元数据:技能 ID/名称、安装 ID/标签、频道账户键/标签/平台、代理 ID、路由/会话标识符、时间戳、状态、延迟
加入/共享使用空间
默认情况下,一个安装在其自己的本地使用空间中启动。
仅在用户明确需要跨机器共享并理解使用元数据将写入该使用空间的 TiDB Cloud Zero 实例时,才进行共享使用空间设置。
如果用户想要在多个安装之间共享使用数据:
在安装 1 上
text
/skillusage join-token
在安装 2 上
text
/skillusage join
加入后,top 可以在一个共享排行榜中显示多个安装块。
代理注意事项
- - 对于普通用户,优先使用 npm 安装。
- 提及即使离线该插件也很有用,因为仅本地回退仍然有效。
- 如果用户询问隐私问题,解释确切远程目标(TiDB Cloud Zero)以及仅本地模式与云端/共享模式的区别。
- 明确说明消息内容、提示、补全和机密信息不是预期的同步负载;只有使用元数据是。
- 但仍需注意,频道账户标签、路由标识符和安装标签对于某些操作者可能是敏感元数据。
- 如果用户询问从源代码安装,解释本地链接安装主要用于开发。
代理操作示例
- 安装 openclaw-skill-usage
- 重启网关
- 运行 /skillusage status
- 解释结果是仅本地还是云同步
- 运行 /skillusage status
- 运行 /skillusage top 7d
- 确认插件已加载并返回可用的分析输出
- 如果设置尚未完成,先完成安装/重启/验证
- 然后运行 /skillusage top 7d 或使用 skill
usagestats
- 用通俗语言解释返回的排名
- 在两台机器上安装
- 在两台机器上重启网关
- 在机器 1 上运行 /skillusage join-token
- 在机器 2 上运行 /skillusage join
- 使用 /skillusage status 和 /skillusage top 7d 验证加入结果
-