npx skills add https://github.com/yonatangross/orchestkit --skill analytics从 ~/.claude/analytics/ 查询本地分析数据。所有数据均为本地存储,隐私安全(项目ID已哈希处理,不包含个人身份信息)。
解析用户的参数以确定显示哪个报告。如果未提供参数,则使用 AskUserQuestion 让用户选择。
| 子命令 | 描述 | 数据源 | 参考 |
|---|---|---|---|
agents | 按频率、时长、模型细分统计的热门代理 | agent-usage.jsonl | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
models | 模型委托细分(opus/sonnet/haiku) |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
agent-usage.jsonl |
${CLAUDE_SKILL_DIR}/references/jq-queries.md |
skills | 按调用次数统计的热门技能 | skill-usage.jsonl | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
hooks | 最慢的钩子和失败率 | hook-timing.jsonl | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
teams | 团队生成次数、空闲时间、任务完成情况 | team-activity.jsonl | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
session | 重放包含工具、令牌、时间线的会话时间线 | CC 会话 JSONL | ${CLAUDE_SKILL_DIR}/references/session-replay.md |
cost | 包含缓存节省的令牌成本估算 | stats-cache.json | ${CLAUDE_SKILL_DIR}/references/cost-estimation.md |
trends | 每日活动、模型委托、高峰时段 | stats-cache.json | ${CLAUDE_SKILL_DIR}/references/trends-analysis.md |
summary | 所有类别的统一视图 | 所有文件 | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
# 包含模型细分的热门代理
jq -s 'group_by(.agent) | map({agent: .[0].agent, count: length}) | sort_by(-.count)' ~/.claude/analytics/agent-usage.jsonl
# 所有时间令牌成本
jq '.modelUsage | to_entries | map({model: .key, input: .value.inputTokens, output: .value.outputTokens})' ~/.claude/stats-cache.json
agents, models, skills, hooks, teams, summary — 从 Read("${CLAUDE_SKILL_DIR}/references/jq-queries.md") 中运行匹配子命令的 jq 查询。将结果呈现为 Markdown 表格。
session — 遵循 Read("${CLAUDE_SKILL_DIR}/references/session-replay.md") 中的 4 步流程:定位会话文件、解析引用(最新/部分/完整 ID)、解析 JSONL、呈现时间线。
cost — 将 Read("${CLAUDE_SKILL_DIR}/references/cost-estimation.md") 中的模型特定定价应用于 CC 的 stats-cache.json。显示每个模型的细分、总计和缓存节省。
trends — 遵循 Read("${CLAUDE_SKILL_DIR}/references/trends-analysis.md") 中的 4 步流程:每日活动、模型委托、高峰时段、所有时间统计。
summary — 运行所有子命令并呈现统一视图:总会话数、前 5 名代理、前 5 名技能、团队活动、唯一项目数。
加载 Read("${CLAUDE_SKILL_DIR}/references/data-locations.md") 以获取完整的数据源文档。
| 文件 | 内容 |
|---|---|
agent-usage.jsonl | 包含模型、时长、成功状态的代理生成事件 |
skill-usage.jsonl | 技能调用 |
hook-timing.jsonl | 钩子执行时间和失败率 |
session-summary.jsonl | 会话结束摘要 |
task-usage.jsonl | 任务完成情况 |
team-activity.jsonl | 团队生成和空闲事件 |
每个类别在 rules/ 目录下都有单独的规则文件,按需加载:
| 类别 | 规则 | 影响 | 关键模式 |
|---|---|---|---|
| 数据完整性 | ${CLAUDE_SKILL_DIR}/rules/data-privacy.md | 关键 | 哈希项目 ID,永不记录个人身份信息,仅限本地 |
| 成本与令牌 | ${CLAUDE_SKILL_DIR}/rules/cost-calculation.md | 高 | 按令牌类型单独定价,缓存节省 |
| 性能 | ${CLAUDE_SKILL_DIR}/rules/large-file-streaming.md | 高 | 对 >50MB 文件使用流式 jq,支持轮转感知查询 |
| 可视化 | ${CLAUDE_SKILL_DIR}/rules/visualization-recharts.md | 高 | Recharts 图表,ResponsiveContainer,工具提示 |
| 可视化 | ${CLAUDE_SKILL_DIR}/rules/visualization-dashboards.md | 高 | 仪表板网格,统计卡片,小部件注册表 |
总计:4 个类别中的 5 条规则
| 参考 | 内容 |
|---|---|
${CLAUDE_SKILL_DIR}/references/jq-queries.md | 所有 JSONL 子命令的即用型 jq 查询 |
${CLAUDE_SKILL_DIR}/references/session-replay.md | 会话 JSONL 解析、时间线提取、呈现 |
${CLAUDE_SKILL_DIR}/references/cost-estimation.md | 定价表、成本公式、每日成本查询 |
${CLAUDE_SKILL_DIR}/references/trends-analysis.md | 每日活动、模型委托、高峰时段查询 |
${CLAUDE_SKILL_DIR}/references/data-locations.md | 所有数据源、文件格式、CC 会话结构 |
jq 而不使用 -s — 加载 Read("${CLAUDE_SKILL_DIR}/rules/large-file-streaming.md")<name>.<YYYY-MM>.jsonl — 历史查询时需包含team 字段仅在团队/群组会话期间存在pid 是一个 12 字符的 SHA256 哈希值 — 不可逆,仅用于分组将结果呈现为清晰的 Markdown 表格。包含计数、百分比和平均值。如果文件不存在,则注明该类别尚未收集任何数据。
ork:explore - 代码库探索和分析ork:feedback - 收集用户反馈ork:remember - 存储项目知识ork:doctor - 健康检查诊断每周安装次数
98
代码仓库
GitHub 星标数
134
首次出现
2026年2月13日
安全审计
安装于
codex91
opencode91
gemini-cli89
cursor89
github-copilot87
claude-code84
Query local analytics data from ~/.claude/analytics/. All data is local-only, privacy-safe (hashed project IDs, no PII).
Parse the user's argument to determine which report to show. If no argument provided, use AskUserQuestion to let them pick.
| Subcommand | Description | Data Source | Reference |
|---|---|---|---|
agents | Top agents by frequency, duration, model breakdown | agent-usage.jsonl | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
models | Model delegation breakdown (opus/sonnet/haiku) | agent-usage.jsonl | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
skills | Top skills by invocation count | skill-usage.jsonl | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
hooks | Slowest hooks and failure rates | hook-timing.jsonl | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
teams | Team spawn counts, idle time, task completions | team-activity.jsonl | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
session | Replay a session timeline with tools, tokens, timing | CC session JSONL | ${CLAUDE_SKILL_DIR}/references/session-replay.md |
cost | Token cost estimation with cache savings | stats-cache.json | ${CLAUDE_SKILL_DIR}/references/cost-estimation.md |
trends | Daily activity, model delegation, peak hours | stats-cache.json | ${CLAUDE_SKILL_DIR}/references/trends-analysis.md |
summary | Unified view of all categories | All files | ${CLAUDE_SKILL_DIR}/references/jq-queries.md |
# Top agents with model breakdown
jq -s 'group_by(.agent) | map({agent: .[0].agent, count: length}) | sort_by(-.count)' ~/.claude/analytics/agent-usage.jsonl
# All-time token costs
jq '.modelUsage | to_entries | map({model: .key, input: .value.inputTokens, output: .value.outputTokens})' ~/.claude/stats-cache.json
agents, models, skills, hooks, teams, summary — Run the jq query from Read("${CLAUDE_SKILL_DIR}/references/jq-queries.md") for the matching subcommand. Present results as a markdown table.
session — Follow the 4-step process in Read("${CLAUDE_SKILL_DIR}/references/session-replay.md"): locate session file, resolve reference (latest/partial/full ID), parse JSONL, present timeline.
cost — Apply model-specific pricing from Read("${CLAUDE_SKILL_DIR}/references/cost-estimation.md") to CC's stats-cache.json. Show per-model breakdown, totals, and cache savings.
trends — Follow the 4-step process in Read("${CLAUDE_SKILL_DIR}/references/trends-analysis.md"): daily activity, model delegation, peak hours, all-time stats.
summary — Run all subcommands and present a unified view: total sessions, top 5 agents, top 5 skills, team activity, unique projects.
Load Read("${CLAUDE_SKILL_DIR}/references/data-locations.md") for complete data source documentation.
| File | Contents |
|---|---|
agent-usage.jsonl | Agent spawn events with model, duration, success |
skill-usage.jsonl | Skill invocations |
hook-timing.jsonl | Hook execution timing and failure rates |
session-summary.jsonl | Session end summaries |
task-usage.jsonl | Task completions |
team-activity.jsonl |
Each category has individual rule files in rules/ loaded on-demand:
| Category | Rule | Impact | Key Pattern |
|---|---|---|---|
| Data Integrity | ${CLAUDE_SKILL_DIR}/rules/data-privacy.md | CRITICAL | Hash project IDs, never log PII, local-only |
| Cost & Tokens | ${CLAUDE_SKILL_DIR}/rules/cost-calculation.md | HIGH | Separate pricing per token type, cache savings |
| Performance | ${CLAUDE_SKILL_DIR}/rules/large-file-streaming.md | HIGH | Streaming jq for >50MB, rotation-aware queries |
| Visualization | ${CLAUDE_SKILL_DIR}/rules/visualization-recharts.md |
Total: 5 rules across 4 categories
| Reference | Contents |
|---|---|
${CLAUDE_SKILL_DIR}/references/jq-queries.md | Ready-to-run jq queries for all JSONL subcommands |
${CLAUDE_SKILL_DIR}/references/session-replay.md | Session JSONL parsing, timeline extraction, presentation |
${CLAUDE_SKILL_DIR}/references/cost-estimation.md | Pricing table, cost formula, daily cost queries |
${CLAUDE_SKILL_DIR}/references/trends-analysis.md | Daily activity, model delegation, peak hours queries |
${CLAUDE_SKILL_DIR}/references/data-locations.md | All data sources, file formats, CC session structure |
jq without -s — load Read("${CLAUDE_SKILL_DIR}/rules/large-file-streaming.md")<name>.<YYYY-MM>.jsonl — include for historical queriesteam field only present during team/swarm sessionspid is a 12-char SHA256 hash — irreversible, for grouping onlyPresent results as clean markdown tables. Include counts, percentages, and averages. If a file doesn't exist, note that no data has been collected yet for that category.
ork:explore - Codebase exploration and analysisork:feedback - Capture user feedbackork:remember - Store project knowledgeork:doctor - Health check diagnosticsWeekly Installs
98
Repository
GitHub Stars
134
First Seen
Feb 13, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex91
opencode91
gemini-cli89
cursor89
github-copilot87
claude-code84
Excel财务建模规范与xlsx文件处理指南:专业格式、零错误公式与数据分析
45,000 周安装
| Team spawns and idle events |
| HIGH |
| Recharts charts, ResponsiveContainer, tooltips |
| Visualization | ${CLAUDE_SKILL_DIR}/rules/visualization-dashboards.md | HIGH | Dashboard grids, stat cards, widget registry |