Skill Stats - Skill Usage Statistics
Analyze and track skill usage across Claude Code and OpenClaw environments.
Features
Claude Code
- - Scans all session files under INLINECODE0
- Categorizes by scope (builtin/plugin/user/project)
- Shows usage frequency, success rate, and last used time
- Identifies unused and deleted skills
OpenClaw
- - Scans all session files under INLINECODE1
- Categorizes by scope (openclaw-workspace/openclaw-global)
- Parses toolCall-type skill invocation records
- Stores statistics independently
Usage
Execute the statistics script with the required --context parameter:
Claude Code Environment:
CODEBLOCK0
OpenClaw Environment:
CODEBLOCK1
Output Examples
Claude Code
CODEBLOCK2
OpenClaw
CODEBLOCK3
How It Works
Claude Code
- 1. Scans all session files (.jsonl) under INLINECODE3
- Extracts
Skill tool invocation records - Calculates call counts, success rates, and project usage for each skill
- Displays results categorized by scope
OpenClaw
- 1. Scans session files (.jsonl) under INLINECODE5
- Parses toolCall-type skill invocations (via
read tool reading SKILL.md) - Identifies workspace-level and global-level skills
- Stores statistics independently
Data Storage
- - Claude Code: INLINECODE7
- OpenClaw: INLINECODE8
技能统计 - 技能使用统计
分析和追踪Claude Code与OpenClaw环境中的技能使用情况。
功能特性
Claude Code
- - 扫描 ~/.claude/projects/ 下的所有会话文件
- 按作用域分类(内置/插件/用户/项目)
- 显示使用频率、成功率和最后使用时间
- 识别未使用和已删除的技能
OpenClaw
- - 扫描 ~/.openclaw/agents/main/sessions/ 下的所有会话文件
- 按作用域分类(openclaw工作区/openclaw全局)
- 解析toolCall类型的技能调用记录
- 独立存储统计数据
使用方法
使用必需的 --context 参数执行统计脚本:
Claude Code 环境:
bash
npx -y tsx ${SKILL_DIR}/scripts/main.ts --context claude-code
OpenClaw 环境:
bash
npx -y tsx ${SKILL_DIR}/scripts/main.ts --context openclaw
输出示例
Claude Code
====================================================================================================
技能使用统计
====================================================================================================
最后更新:2026-03-05T09:26:33.759Z
【内置 - 内置技能】
技能名称 调用次数 成功率 最后使用 时间间隔 状态
keybindings-help 1 100.0% 2026/02/09 19:52 23天前 活跃
【用户 - 用户技能】
skill-stats 24 100.0% 2026/03/03 22:11 1天前 活跃
nano-banana 10 100.0% 2026/02/24 16:58 9天前 活跃
OpenClaw
====================================================================================================
技能使用统计
====================================================================================================
最后更新:2026-03-05T09:26:06.765Z
【OPENCLAW全局 - OpenClaw全局技能】
技能名称 调用次数 成功率 最后使用 时间间隔 状态
enterprise-doc 1 100.0% 2026/03/04 14:45 1天前 活跃
file-upload 1 100.0% 2026/03/05 14:46 今天 活跃
工作原理
Claude Code
- 1. 扫描 ~/.claude/projects/ 下的所有会话文件(.jsonl)
- 提取 Skill 工具调用记录
- 计算每个技能的调用次数、成功率和项目使用情况
- 按作用域分类显示结果
OpenClaw
- 1. 扫描 ~/.openclaw/agents/main/sessions/ 下的会话文件(.jsonl)
- 解析toolCall类型的技能调用(通过 read 工具读取SKILL.md)
- 识别工作区级别和全局级别的技能
- 独立存储统计数据
数据存储
- - Claude Code:~/.claude/skill-stats/global-stats.json
- OpenClaw:~/.openclaw/skill-stats/openclaw-global-stats.json