Skill Usage

v0.1.0

统计已安装技能在指定时间段内的使用次数,以美观的 TUI 格式展示结果

0· 147·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for akira82-ai/skills-usage.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Skill Usage" (akira82-ai/skills-usage) from ClawHub.
Skill page: https://clawhub.ai/akira82-ai/skills-usage
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install skills-usage

ClawHub CLI

Package manager switcher

npx clawhub@latest install skills-usage
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match what the files implement: stats.py and SKILL.md both enumerate installed skills and parse local Claude history files to produce usage counts and a TUI-like report. Required resources (none) align with a local, file-reading tool.
Instruction Scope
Instructions explicitly tell the agent to read ~/.claude/history.jsonl and ~/.claude/projects/*/*.jsonl and to run the included stats.py, which is necessary for the stated purpose. This does mean the skill reads private conversation history (expected for usage statistics) — a privacy consideration but not unexpected. Minor mismatch: SKILL.md mentions session.jsonl path variants while the code processes all *.jsonl under projects; behavior is consistent with broader file discovery.
Install Mechanism
No install spec is provided (instruction-only skill with a bundled script). No downloads, package installs, or external install URLs are present.
Credentials
The skill requests no environment variables or credentials. It does access files under the user's home (~/.claude/*), which is proportional to its function but exposes potentially sensitive conversation history — the code aggregates counts and does not print raw messages, but users should be aware the skill reads local history files.
Persistence & Privilege
always is false and the skill does not request persistent system-wide changes. It does not modify other skills or global agent settings. Autonomous invocation is allowed by default but not combined with other suspicious privileges.
Assessment
This skill reads your Claude conversation history files (~/.claude/history.jsonl and files under ~/.claude/projects/) and the ~/.claude/skills/ directory to compute usage counts — that is necessary for its purpose but exposes sensitive local data. Before installing or running: review stats.py (already included) to confirm it only aggregates counts (it does), ensure you trust the skill source, and verify file permissions. If you want tighter safety, run the script manually in a shell (python3 ~/.claude/skills/skill-usage/stats.py past_30_days) rather than allowing autonomous invocation, or make a copy of your history files for testing. Note the SKILL.md and README contain slightly different path descriptions (session.jsonl vs any *.jsonl), but the script's behavior is consistent and broader (it scans all *.jsonl under projects).

Like a lobster shell, security has layers — review code before you run it.

latestvk97fed6x1b5gbkpt6a1246gknn8338rq
147downloads
0stars
1versions
Updated 1mo ago
v0.1.0
MIT-0

技能使用统计 (skill-usage)

技能概述

统计并展示已安装技能在指定时间段内的使用情况,包括:

  • 每个技能的调用次数
  • 使用频率排名
  • 总使用次数
  • 时间趋势分析

使用流程

  1. 选择统计时间段
  2. 扫描已安装技能列表
  3. 分析对话历史记录
  4. 以美观的表格形式展示统计结果

可用时间段

选项描述
今天统计从 00:00 到现在的使用情况
过去 7 天统计最近一周的使用情况
过去 30 天统计最近一个月的使用情况
过去 90 天统计最近三个月的使用情况
全部统计所有历史记录

输出格式

统计结果以 Markdown 表格 + 可视化条形图的形式展示:

📊 技能使用统计报告 (过去 7 天)
═══════════════════════════════════════

排名 | 技能名称        | 调用次数 | 使用频率
─────┼────────────────┼──────────┼──────────
 1   │ auto-skills    │    42    │ ████████░░ 80%
 2   │ idea-to-post   │    28    │ ██████░░░░ 60%
 3   │ humanizer-zh   │    15    │ ███░░░░░░░ 30%
─────┼────────────────┼──────────┼──────────
     │ 总计           │    85    │

实现步骤

第一步:选择时间段

使用 AskUserQuestion 工具让用户选择统计时间段。

第二步:扫描已安装技能

列出 ~/.claude/skills/ 目录下的所有技能。

第三步:分析历史记录

解析以下文件:

  • ~/.claude/history.jsonl(全局历史)
  • ~/.claude/projects/*/session.jsonl(项目会话)

查找匹配 /skill-name 模式的记录。

第四步:统计与展示

计算每个技能的使用次数,并按降序排列展示。

数据说明

  • 技能识别:通过历史记录中的 display 字段匹配 /skill-name 模式识别技能调用
  • 时间过滤timestamp 是毫秒级时间戳(数字),需要除以 1000 转换为秒
  • 未使用技能:在结果中显示为 0 次
  • 历史文件位置~/.claude/history.jsonl~/.claude/projects/*/*.jsonl

执行指令

当用户调用此技能时,请按以下步骤执行:

  1. 首先使用 AskUserQuestion 询问统计时间段
  2. 直接调用 ~/.claude/skills/skill-usage/stats.py 脚本,传入时间段参数
  3. 直接将脚本输出作为最终回复,不要做任何额外处理或包装

时间段参数映射:

用户选择脚本参数
今天today
过去 7 天past_7_days
过去 30 天past_30_days
过去 90 天past_90_days
全部all

调用示例:

python3 ~/.claude/skills/skill-usage/stats.py past_30_days
  1. 重要:将统计报告直接作为最终回复输出给用户,不要只输出"统计完成"等简短描述

Comments

Loading comments...