skill-usage

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

3,891 stars

Best use case

skill-usage is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using skill-usage should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/skills-usage/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/akira82-ai/skills-usage/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/skills-usage/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How skill-usage Compares

Feature / Agentskill-usageStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 技能使用统计 (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` |

调用示例:
```bash
python3 ~/.claude/skills/skill-usage/stats.py past_30_days
```

4. **重要**:将统计报告直接作为最终回复输出给用户,不要只输出"统计完成"等简短描述

Related Skills

model-usage

3891
from openclaw/skills

Summarize per-model usage for Codex or Claude including cost tracking. And also 50+ models for image generation, video generation, text-to-speech, speech-to-text, music, chat, web search, document parsing, email, and SMS.

claude-code-usage

3891
from openclaw/skills

Check Claude Code OAuth usage limits (session & weekly quotas). Use when user asks about Claude Code usage, remaining limits, rate limits, or how much Claude usage they have left. Includes automated session refresh reminders and reset detection monitoring.

claude-usage

3891
from openclaw/skills

Check Claude Code / Claude Max usage limits. Run when user asks about usage, limits, quota, or how much Claude capacity is left.

minimax-usage

3891
from openclaw/skills

查询 MiniMax Token Plan 剩余用量。slash command。 查询 MiniMax Token Plan 剩余次数和重置时间,支持 M2.7/Speech/视频/图片/音乐等模型的用量查询。 Query MiniMax Token Plan usage and reset time. Supports M2.7, Speech, Video, Image, and Music models.

gmncode-usage

3891
from openclaw/skills

通过 HTTP 接口查询 GMNCODE / gmncode.cn 中转站的大模型用量,包括 dashboard 汇总、每日趋势、按模型拆分的 token 与费用数据。当用户要求查看 GMNCODE token 用量、每日模型消耗、API/中转站花费、dashboard 用量,或希望用脚本/HTTP 接口直接获取 GMNCODE 使用数据而不是手动打开网页时使用。

zai-usage

3891
from openclaw/skills

Monitor Z.AI GLM Coding Plan usage and quota limits. Track token consumption, view reset times, and check subscription status.

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research

agent-autonomy-kit

3891
from openclaw/skills

Stop waiting for prompts. Keep working.

Workflow & Productivity