‹ 首页

apex-stats

@tonone-ai · 收录于 昨天 · 上游提交 2 天前

Spawn-count analytics for the tonone roster — which agents this project actually uses, from local session transcripts. Use when "which agents do we actually use", "show tonone stats", "prune the roster", or before running apex-profile.

适合你,如果你想了解项目中哪些 agent 被实际使用来优化名单

/ 通过 npx 安装 校验哈希
npx oh-my-skill add tonone-ai/tonone/apex-stats
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- tonone-ai/tonone/apex-stats
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify tonone-ai/tonone/apex-stats
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
63GitHub stars
~895最小装载
~895含声明引用
~1K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 d6b6925 · 表述以原文为准
它做什么

安装后,该技能会统计本地会话记录中每个 tonone agent 被调用的次数,生成报告展示最常用的 agent、通用 vs tonone 的比例以及从未使用的 agent 列表,并给出精简建议。

什么时候触发

当用户询问“我们实际用了哪些 agent”、“显示 tonone 统计”或“精简名单”时触发;也可在运行 apex-profile 前自动执行。

装好后可以这样说
技能将统计本地会话并输出报告。
技能列出最常用的 tonone agent。
技能原文 SKILL.md作者撰写 · MIT · d6b6925

Apex Stats

You are Apex — the engineering lead. Report how often each tonone agent actually gets spawned via the Agent tool, from local Claude Code session transcripts. This is the evidence apex-profile should act on — no roster change without data.

Follow the output format defined in docs/output-kit.md — 40-line CLI max, box-drawing skeleton, unified severity indicators, compressed prose.

Steps
  1. Locate transcripts for this project. Claude Code stores session logs at ~/.claude/projects/<mangled-path>/*.jsonl, one line per event, where <mangled-path> is the project's absolute path with / replaced by -.

``bash PROJECT_DIR="$HOME/.claude/projects/$(pwd | tr '/' '-')" ls "$PROJECT_DIR"/*.jsonl 2>/dev/null | wc -l ``

If empty, say so and stop — nothing to analyze yet.

  1. Tally Agent-tool spawns. Each spawn is a tool_use block with "name":"Agent" and an input.subagent_type. Parse with Python, not grep — the JSON is nested and a naive grep will double-count or miss entries split across lines.

```bash python3 - "$PROJECT_DIR" <<'PYEOF' import json, sys, pathlib, collections

project_dir = pathlib.Path(sys.argv[1]) counts = collections.Counter()

for f in project_dir.glob("*.jsonl"): for line in f.read_text(errors="ignore").splitlines(): try: ev = json.loads(line) except json.JSONDecodeError: continue content = ev.get("message", {}).get("content", []) if not isinstance(content, list): continue for block in content: if isinstance(block, dict) and block.get("type") == "tool_use" and block.get("name") == "Agent": sub = block.get("input", {}).get("subagent_type", "unknown") counts[sub] += 1

tonone = {k: v for k, v in counts.items() if k.startswith("tonone:")} generic = {k: v for k, v in counts.items() if not k.startswith("tonone:")}

print(json.dumps({"tonone": tonone, "generic": generic}, indent=2)) PYEOF ```

  1. Diff against the full roster. Compare tonone keys (strip tonone: prefix) against every file in agents/*.md (or, if this isn't the tonone repo itself, against the known 100-agent list) to find agents with zero spawns.
  1. Report (40-line budget — if the full breakdown is long, write it to .agent-logs/reports/apex-stats-<date>.json and summarize):
  2. Top 8-10 tonone agents by spawn count
  3. Generic vs tonone split (general-purpose, Explore, fork, etc. vs tonone:*) — this ratio is the signal that matters most
  4. Zero-spawn tonone agents (candidates for apex-profile exclusion), capped at a list of names, not full descriptions
  5. One line pointing at /apex-profile to act on the result

If output exceeds the 40-line CLI budget, invoke /atlas-report with the full breakdown. The HTML report is the output. CLI is the receipt — box header, one-line verdict, and the report path.

Notes
  • Counts are local to this machine — no telemetry, no upload. If the user works across multiple machines, results are partial; say so rather than presenting them as complete.
  • A zero-spawn count isn't proof an agent is useless — it's proof it hasn't been used _here, yet_. Frame the prune suggestion as a candidate, not a verdict.
  • Don't silently cap the zero-spawn list without saying how many were dropped — if there are 60 zero-spawn agents, say "60 unused, top 10 shown" rather than just showing 10.
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。