← 返回 Skills 市场
netanel-abergel

Skill Analytics

作者 Netanel Abergel · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
81
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install heleni-skill-analytics
功能描述
Track skill usage across all agent sessions. Logs every skill invocation to a JSONL file, generates daily summaries with top skills, unused skills, and trend...
使用说明 (SKILL.md)

Skill Analytics

Track which skills are used, when, and why. Turns the skill library into a feedback loop.


Log Format

Every skill invocation should append one line to data/skill-analytics.jsonl:

echo '{"ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","skill":"SKILL_NAME","trigger":"TRIGGER_PHRASE","context":"GROUP_OR_DM"}' \
  >> /opt/ocana/openclaw/workspace/data/skill-analytics.jsonl

Fields:

  • ts — ISO 8601 UTC timestamp
  • skill — skill name (e.g. meetings, supervisor)
  • trigger — short phrase that caused selection (e.g. "schedule meeting", "מה הסטטוס")
  • contextdm, group:\x3Cname>, or cron

How to Log (for agents)

Add this at the TOP of any skill (after reading SKILL.md, before doing work):

mkdir -p /opt/ocana/openclaw/workspace/data
echo "{\"ts\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"skill\":\"SKILL_NAME\",\"trigger\":\"TRIGGER\",\"context\":\"CONTEXT\"}" \
  >> /opt/ocana/openclaw/workspace/data/skill-analytics.jsonl

Replace SKILL_NAME, TRIGGER, CONTEXT with real values.


Triggers for This Skill

  • "skill usage" / "skill stats" / "skill report"
  • "which skills am I using" / "what skills are popular"
  • "analytics report" / "daily skill summary"
  • "unused skills" / "what skills are never used"

Generate Daily Report

#!/bin/bash
LOG="/opt/ocana/openclaw/workspace/data/skill-analytics.jsonl"
TODAY=$(date -u +%Y-%m-%d)
YESTERDAY=$(date -u -d "yesterday" +%Y-%m-%d 2>/dev/null || date -u -v-1d +%Y-%m-%d)

echo "## 📊 Skill Usage Report — $TODAY"
echo ""

# Total invocations (last 24h)
TOTAL=$(grep "$TODAY\|$YESTERDAY" "$LOG" 2>/dev/null | wc -l)
echo "**Total invocations (last 24h):** $TOTAL"
echo ""

# Top skills
echo "### Top Skills"
grep "$TODAY\|$YESTERDAY" "$LOG" 2>/dev/null \
  | jq -r '.skill' \
  | sort | uniq -c | sort -rn \
  | head -10 \
  | awk '{printf "- **%s** — %d uses\
", $2, $1}'
echo ""

# All-time top skills
echo "### All-Time Top Skills"
jq -r '.skill' "$LOG" 2>/dev/null \
  | sort | uniq -c | sort -rn \
  | head -10 \
  | awk '{printf "- **%s** — %d uses\
", $2, $1}'
echo ""

# Unused skills (compare against known list)
KNOWN_SKILLS="ai-pa billing-monitor calendar-setup eval hebrew-nikud maintenance meetings memory-tiering monday-for-agents owner-briefing pa-onboarding self-learning self-monitor skill-master skill-scout supervisor whatsapp youtube-watcher skill-analytics"
echo "### Unused Skills (all-time)"
for skill in $KNOWN_SKILLS; do
  COUNT=$(jq -r '.skill' "$LOG" 2>/dev/null | grep -c "^${skill}$" || echo 0)
  [ "$COUNT" -eq 0 ] && echo "- $skill"
done
echo ""

# Usage by context
echo "### Usage by Context"
jq -r '.context' "$LOG" 2>/dev/null \
  | sort | uniq -c | sort -rn \
  | awk '{printf "- %s: %d\
", $2, $1}'
echo ""

# Recent activity (last 5)
echo "### Recent Activity"
tail -5 "$LOG" 2>/dev/null \
  | jq -r '"- \(.ts | .[11:16]) — \(.skill) [\(.trigger)]"'

Daily Cron (optional)

Add to crontab to auto-send report every morning:

# Skill analytics report — 7:25 AM Israel (before morning briefing)
25 5 * * * /opt/ocana/openclaw/workspace/scripts/skill-report.sh

Report Format (output)

## 📊 Skill Usage Report — 2026-04-03

**Total invocations (last 24h):** 14

### Top Skills
- **supervisor** — 4 uses
- **meetings** — 3 uses
- **whatsapp** — 2 uses
- **owner-briefing** — 2 uses
- **self-monitor** — 1 use

### All-Time Top Skills
- **supervisor** — 28 uses
- **meetings** — 19 uses
...

### Unused Skills (all-time)
- hebrew-nikud
- youtube-watcher

### Usage by Context
- dm: 8
- group:monday-internal-ai: 4
- cron: 2

### Recent Activity
- 07:14 — owner-briefing [morning briefing]
- 07:30 — supervisor [מה הסטטוס]
- 09:02 — meetings [schedule meeting with Daniel]

Reset / Archive

# Archive current log (monthly)
mv /opt/ocana/openclaw/workspace/data/skill-analytics.jsonl \
   /opt/ocana/openclaw/workspace/data/skill-analytics-$(date +%Y-%m).jsonl

# Start fresh
touch /opt/ocana/openclaw/workspace/data/skill-analytics.jsonl

Notes

  • Log file grows ~1KB/day at normal usage — no rotation needed for months
  • If jq not available: python3 -c "import json,sys; [print(json.loads(l)['skill']) for l in sys.stdin]"
  • Log is local only — never sent externally
安全使用建议
This skill is coherent with its stated purpose but has privacy and operational implications you should consider before deploying: - The log records 'trigger' strings and contexts that may contain sensitive user input; treat the JSONL file as sensitive data. Ensure file permissions limit who can read it. - The SKILL.md suggests adding the logging snippet to the top of other skills — do NOT modify third-party skills without review. Prefer running the logging at the agent/platform layer rather than editing every skill. - The SKILL.md claims the log is 'local only' but provides no enforcement; review any cron jobs, backups, or other code that could read or transmit the file. - Add rotation/retention and consider redaction or hashing of sensitive triggers to reduce leak risk. - Verify jq or the Python fallback is available in your runtime; test the report script in a safe environment. If you want to proceed: restrict file ACLs, document what fields are logged, get consent from stakeholders, and consider implementing logging at a single trusted layer rather than inserting snippets into many skills.
功能分析
Type: OpenClaw Skill Name: heleni-skill-analytics Version: 1.0.0 The skill provides local analytics by logging agent activity to a JSONL file, but it introduces a shell injection vulnerability in the 'How to Log' section of SKILL.md. It instructs the agent to use an unsanitized `echo` command to log user-controlled strings (like the 'trigger' phrase), which could lead to arbitrary command execution if the agent processes malicious user input. While the behavior aligns with the stated purpose and no data exfiltration was found, the lack of input sanitization in the provided shell templates poses a high risk.
能力评估
Purpose & Capability
Name/description align with what the SKILL.md asks the agent to do: append invocation records to a JSONL log and produce a daily report. No unrelated binaries, env vars, or installs are requested.
Instruction Scope
The instructions ask that every skill append raw invocation data (including the trigger phrase) to a shared workspace file. That can capture arbitrary user input (potentially sensitive) and the SKILL.md tells maintainers to 'Add this at the TOP of any skill' — i.e., modify other skills' runtime behavior. The file is claimed to be 'local only' but nothing in the instructions enforces or guarantees it won't be read or transmitted by other code or processes.
Install Mechanism
Instruction-only skill with no install steps and no downloads. Uses standard CLI utilities (date, mkdir, echo, grep, jq, tail, awk) — jq is optional with a provided Python fallback.
Credentials
No credentials, env vars, or config paths are requested. The single shared filesystem path (/opt/ocana/openclaw/workspace/data/skill-analytics.jsonl) is justified for local logging, but ownership and access control should be considered.
Persistence & Privilege
always:false and no install means the skill does not force permanent presence. However, the guidance to add logging into other skills implies code changes across other skills (manual or automated), which is intrusive; review and consent are needed before applying widely.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install heleni-skill-analytics
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /heleni-skill-analytics 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of skill-analytics. - Tracks every skill invocation across all agent sessions, logging to a JSONL file. - Provides scripts and instructions to generate daily usage summaries highlighting top, unused, and trending skills. - Includes sample logging and reporting code for agents to easily integrate analytics. - Supports daily reporting by cron job and report reset/archiving instructions. - Documentation details log schema, sample reports, and usage triggers.
元数据
Slug heleni-skill-analytics
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Skill Analytics 是什么?

Track skill usage across all agent sessions. Logs every skill invocation to a JSONL file, generates daily summaries with top skills, unused skills, and trend... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 81 次。

如何安装 Skill Analytics?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install heleni-skill-analytics」即可一键安装,无需额外配置。

Skill Analytics 是免费的吗?

是的,Skill Analytics 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Skill Analytics 支持哪些平台?

Skill Analytics 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Skill Analytics?

由 Netanel Abergel(@netanel-abergel)开发并维护,当前版本 v1.0.0。

💬 留言讨论