Token导航 LogoToken导航

Agent Skill · 研究检索

data-expert(数据专家)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

data-expert 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 55,679。

总安装 470周安装 20GitHub Stars 公开资料未说明下载 165核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:data-expert(数据专家)
来源仓库:https://github.com/studiochat/skills
仓库路径:skills/data-expert
安装命令:
npx skills add https://github.com/studiochat/skills --skill data-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/studiochat/skills --skill data-expert

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

辅助数据整理、指标计算与异常检测,支持 CSV/Excel 分析。适用于 Codex、Claude、Cursor、Gemini CLI 中处理结构化数据集时。通过 github 安装,使用 npx 添加指定技能路径。使用前需确认数据来源字段含义、时间范围及脱敏要求。注意评估是否会导出文件或批量写入敏感信息。

来源仓库内路径:skills/data-expert

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/studiochat/skills --skill data-expert;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

data-expert 怎么安装?

在终端执行 npx skills add https://github.com/studiochat/skills --skill data-expert。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

data-expert 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

data-expert 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

data-expert 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

data-expert 用的人多吗?

公开数据是累计安装 470 次,近一周安装 20 次,下载 165 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

data-expert 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
data-expert

数据专家 · 本页

470—接触敏感数据未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Data Expert

Fetch data from the Studio Chat API, process it with Python, and produce actionable analysis. All API calls are authenticated automatically via environment variables. The API base URL (https://api.studiochat.io) is hardcoded in the scripts.

Key Terminology

Assistants and playbooks are the same concept. In the API, the term "playbook" is used everywhere — but users refer to them as "assistants." When the user says "assistant," "bot," or "agent," they mean a playbook. Use playbook_base_id to filter by assistant (all versions) or playbook_id for a specific version.

Setup

Set the following environment variables before using the scripts:

export STUDIO_API_TOKEN="sbs_your_api_key_here"
export STUDIO_PROJECT_ID="your-project-uuid"

API keys are available by request from the Studio Chat team at hey@studiochat.io.

Tools

fetch.py — Single API call

python3 scripts/fetch.py <path> [--params key=value ...] [-o file.json]
python3 scripts/fetch.py <path> --method POST [--body '{}'] [-o file.json]

export_conversations.py — Batch export with all metadata

python3 scripts/export_conversations.py \
  --start YYYY-MM-DD --end YYYY-MM-DD [filters] [--messages] \
  [--sentiment negative,neutral,positive] [--resources irrelevant,partial,relevant] \
  [--min-messages N] [--max-messages N] [--sort-by field] [--sort-order asc|desc] \
  [--format json|csv] -o output.json

Every conversation includes all metadata inline: summary, sentiment (label + reason), resources (label + reason), user_intent, sentiment_shift, deflection_quality, handoff_reason, recontact_risk (each with label + reason), skills, tags, handoff status, message count, latency, model. Use --messages to also fetch full message history (one API call per conversation).

Workflow

  1. Fetch — Pull data from the API
  2. Save — Write raw JSON to a working directory for reference
  3. Process — Use Python to parse, filter, aggregate, compute
  4. Report — Write findings to markdown or CSV

Always save intermediate data to files. This enables re-processing without re-fetching.

API Endpoints

Full specifications: references/api-reference.md

High-Level Metrics

EndpointReturns
GET /projects/{pid}/conversations/analyticsTotals, deflection rate, time series, breakdowns by playbook/tag
GET /account/conversations/analyticsAccount-wide totals across all projects
GET /projects/{pid}/conversations/metrics/aggregateSentiment, resource-quality, sentiment shift, deflection quality, handoff reason, and recontact risk distributions (filterable by tags, inbox_id, playbook_base_id)

Conversation Data

EndpointReturns
GET /projects/{pid}/conversationsPaginated list with all metadata inline: summary, user_intent, sentiment (label+reason), resources (label+reason), sentiment_shift, deflection_quality, handoff_reason, recontact_risk (each with label+reason), skills, tags, handoff, message_count, latency, model. Filters: playbook, date, handoff, tags, winback, inbox, search, sentiment, resources, message count, sorting
GET /projects/{pid}/conversations/summariesLightweight summaries for batch scanning: summary, sentiment, resources, user_intent, sentiment_shift, deflection_quality, handoff_reason, recontact_risk, tags, has_handoff, message_count, skills
GET /projects/{pid}/conversations/{cid}Full detail: all metadata + complete message history with per-message token usage/cost + tool calls + citations
POST /projects/{pid}/conversations/batchBatch detail: same as above for up to 50 conversations in a single request. Body: {"conversation_ids": [...]}
GET /projects/{pid}/conversations/{cid}/messagesMessage history + citations (without metadata — prefer the detail endpoint above)
GET /projects/{pid}/conversations/{cid}/metricsSentiment, resource quality, summary for one conversation
POST /projects/{pid}/conversations/{cid}/metrics/analyzeTrigger scoring for an unscored conversation

AI Insights

EndpointReturns
GET /projects/{pid}/conversations/insights/trending-topics/statusCached topic analysis
POST /projects/{pid}/conversations/insights/trending-topics/generateStart new topic analysis
GET /projects/{pid}/conversations/insights/trending-topics/job/{jid}Poll job progress
GET /projects/{pid}/conversations/insights/trending-topics/analysis/{aid}Completed topic analysis

Resource Analytics

EndpointReturns
GET /projects/{pid}/analytics/api-toolsAPI tool usage: totals, success/fail, avg duration, time series, recent calls
GET /projects/{pid}/analytics/api-tools/sparklinesLightweight per-tool daily counts for sparklines (trailing N days)
GET /projects/{pid}/analytics/toolkitsToolkit usage: totals, success/fail, by-action breakdown, param breakdown, time series, recent calls
GET /projects/{pid}/analytics/toolkit-calls/sparklinesLightweight per-toolkit daily counts for sparklines (trailing N days)
GET /projects/{pid}/analytics/skillsSkill usage: totals, success/fail, time series, recent loads. Filters: skill_name, date range, search
GET /projects/{pid}/analytics/skills/sparklinesLightweight per-skill daily counts for sparklines (trailing N days)
GET /projects/{pid}/analytics/kbsKB citation usage: total citations, by-source breakdown, time series, recent. Filters: kb_id, item_id, source, date range, search
GET /projects/{pid}/analytics/kbs/sparklinesLightweight per-KB daily citation counts for sparklines (trailing N days)
GET /projects/{pid}/analytics/kbs/{kb_id}/itemsPer-item citation traffic for a specific KB: item_id, count, sorted by most-cited. Use to find top FAQ/article/snippet items

Configuration Context

EndpointReturns
GET /projects/{pid}/playbooksAll playbooks (instructions, KB links, versions)
GET /playbooks/{id}Full playbook content
GET /playbooks/{id}/historyVersion history
GET /playbooks/{id}/versions/{n}Specific historical version
GET /playbooks/{base_id}/activeCurrently active version
GET /playbooks/{base_id}/active/historyDeployment timeline
GET /playbooks/{id}/settingsKill switch, winback, URL shortener
GET /projects/{pid}/knowledgebasesAll KBs with types and status
GET /knowledgebases/{id}Full KB content
GET /knowledgebases/{id}/items/{item_id}Individual item metadata
GET /projects/{pid}/scheduleOffice hours, timezone, overrides
GET /projects/{pid}/api-toolsCustom HTTP integrations
GET /projects/{pid}/settingsProject personality tone

Quality Testing

EndpointReturns
GET /playbooks/{base_id}/eval-casesTest cases for a playbook
GET /playbooks/{base_id}/eval-runsTest run history (paginated)
GET /eval-runs/{run_id}Full run results with per-case scores
GET /playbooks/{base_id}/eval-cases/export-yamlAll cases in YAML format

Fetching Patterns

1. Aggregate Overview (fast, no pagination)

# High-level totals + breakdowns
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations/analytics" \
  --params start_date=2025-01-01T00:00:00Z end_date=2025-02-01T00:00:00Z \
  -o analytics.json

# Sentiment + resource quality distributions
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations/metrics/aggregate" \
  --params start_date=2025-01-01T00:00:00Z end_date=2025-02-01T00:00:00Z \
  -o metrics_agg.json

2. Filtered Analytics (by playbook, tag)

# Analytics for a specific playbook (use base_id for all versions)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations/analytics" \
  --params start_date=2025-01-01T00:00:00Z end_date=2025-02-01T00:00:00Z \
    playbook_base_ids=PLAYBOOK_BASE_UUID \
  -o playbook_analytics.json

# Analytics filtered by tags (AND logic)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations/analytics" \
  --params start_date=2025-01-01T00:00:00Z end_date=2025-02-01T00:00:00Z \
    tags=billing,refund \
  -o billing_refund_analytics.json

3. Conversation Listing with Filters

# Only handoff conversations
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params start_date=2025-01-01T00:00:00Z end_date=2025-02-01T00:00:00Z \
    has_handoff=true limit=100 \
  -o handoffs.json

# Filter by sentiment (server-side, no enrichment needed)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params sentiment=negative limit=100 \
  -o negative_convos.json

# Filter by resource quality
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params resources=irrelevant limit=100 \
  -o irrelevant_resources.json

# Short conversations sorted by message count
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params max_messages=3 sort_by=message_count sort_order=asc limit=100 \
  -o short_convos.json

# Lightweight summaries for batch scanning
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations/summaries" \
  --params sentiment=negative limit=50 \
  -o negative_summaries.json

3b. Conversation Deep Dive (single or batch)

Note on conversation IDs: The conversation_id is the external platform ID — the one assigned by the messaging platform (e.g., Chatwoot, Intercom). It is NOT an internal database primary key. This is the same ID visible in the platform UI and in webhook payloads.

# Full detail for a single conversation — metadata + messages + tool calls + citations
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations/CONVERSATION_ID" \
  -o conversation_detail.json

# Batch detail for multiple conversations (up to 50) — single API call
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations/batch" \
  -X POST --body '{"conversation_ids": ["conv-1", "conv-2", "conv-3"]}' \
  -o batch_detail.json

Each conversation in the detail response includes:

  • All metadata (same as the list endpoint)
  • Complete message history with all tool calls (name, arguments, results)
  • Message metadata (reasoning explanation, labels, handoff info, latency)
  • KB citations extracted from search tool calls

4. Batch Export (all conversations with metadata)

# Export all conversations — summary, sentiment, resources, skills, tags come inline
python3 scripts/export_conversations.py \
  --start 2025-01-01 --end 2025-02-01 -o all_conversations.json

# Export with full message history (slower — one call per conversation)
python3 scripts/export_conversations.py \
  --start 2025-01-01 --end 2025-02-01 --messages -o full_export.json

# Export only negative sentiment as CSV
python3 scripts/export_conversations.py \
  --start 2025-01-01 --end 2025-02-01 --sentiment negative --format csv -o negative.csv

# Export handoff conversations only
python3 scripts/export_conversations.py \
  --start 2025-01-01 --end 2025-02-01 --handoff true -o handoffs.json

5. Single Conversation Deep Dive

# Get full message history
python3 scripts/fetch.py "/projects/$STUDIO_PROJECT_ID/conversations/CONV_ID/messages" -o messages.json

# Get quality metrics
python3 scripts/fetch.py "/projects/$STUDIO_PROJECT_ID/conversations/CONV_ID/metrics" -o metrics.json

# Trigger scoring for an unscored conversation
python3 scripts/fetch.py "/projects/$STUDIO_PROJECT_ID/conversations/CONV_ID/metrics/analyze" --method POST

6. Trending Topics Analysis

# Check if analysis exists
python3 scripts/fetch.py "/projects/$STUDIO_PROJECT_ID/conversations/insights/trending-topics/status"

# Start new analysis
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations/insights/trending-topics/generate" \
  --method POST --body '{"tags": ["billing"]}'

# Poll job until complete
python3 scripts/fetch.py "/projects/$STUDIO_PROJECT_ID/conversations/insights/trending-topics/job/JOB_ID"

7. Resource Analytics — API Tools & Toolkits

# API tool usage overview (all tools)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/api-tools" \
  --params start_date=2025-01-01 end_date=2025-02-01 \
  -o api_tool_usage.json

# API tool usage for a specific tool
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/api-tools" \
  --params api_tool_id=TOOL_UUID start_date=2025-01-01 end_date=2025-02-01 \
  -o api_tool_detail.json

# API tool sparklines (lightweight, trailing 14 days by default)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/api-tools/sparklines" \
  -o api_tool_sparklines.json

# Sparklines with custom window (e.g., 30 days)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/api-tools/sparklines" \
  --params days=30 \
  -o api_tool_sparklines_30d.json

# Toolkit usage overview (all toolkits)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/toolkits" \
  --params start_date=2025-01-01 end_date=2025-02-01 \
  -o toolkit_usage.json

# Toolkit usage for a specific toolkit
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/toolkits" \
  --params toolkit_slug=TOOLKIT_SLUG start_date=2025-01-01 end_date=2025-02-01 \
  -o toolkit_detail.json

# Toolkit usage filtered by action
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/toolkits" \
  --params toolkit_slug=TOOLKIT_SLUG action_name=ACTION_NAME \
  -o toolkit_action_usage.json

# Toolkit usage with param_filter (filter by input param key:value)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/toolkits" \
  --params toolkit_slug=TOOLKIT_SLUG param_filter=ticket_type_id:67 \
  -o toolkit_param_filtered.json

# Toolkit sparklines (lightweight, trailing 14 days by default)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/toolkit-calls/sparklines" \
  -o toolkit_sparklines.json

# Search recent toolkit calls by keyword
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/toolkits" \
  --params toolkit_slug=TOOLKIT_SLUG search=error limit=20 \
  -o toolkit_errors.json

8. KB Citation Analytics

# KB citation usage overview (all KBs)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/kbs" \
  --params start_date=2025-01-01 end_date=2025-02-01 \
  -o kb_citation_usage.json

# Citation usage for a specific KB
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/kbs" \
  --params kb_id=KB_UUID start_date=2025-01-01 end_date=2025-02-01 \
  -o kb_detail.json

# Citation usage for a specific item within a KB
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/kbs" \
  --params kb_id=KB_UUID item_id=ITEM_UUID \
  -o kb_item_detail.json

# KB sparklines (lightweight, trailing 14 days by default)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/kbs/sparklines" \
  -o kb_sparklines.json

# Per-item citation traffic for a KB (top items by citation count)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/kbs/KB_UUID/items" \
  --params limit=50 \
  -o kb_item_traffic.json

# Per-item traffic filtered by date range
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/kbs/KB_UUID/items" \
  --params start_date=2025-01-01 end_date=2025-02-01 limit=10 \
  -o kb_top_items.json

9. Skill Analytics

# Skill usage overview (all skills)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/skills" \
  --params start_date=2025-01-01 end_date=2025-02-01 \
  -o skill_usage.json

# Skill usage for a specific skill
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/skills" \
  --params skill_name=refund-process start_date=2025-01-01 end_date=2025-02-01 \
  -o skill_detail.json

# Skill sparklines (lightweight, trailing 14 days by default)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/skills/sparklines" \
  -o skill_sparklines.json

# Search recent skill loads by keyword
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/skills" \
  --params search=error limit=20 \
  -o skill_errors.json

Analysis Recipes

Deflection Rate Analysis

import json

with open("analytics.json") as f:
    data = json.load(f)

print(f"Total conversations: {data['total_conversations']}")
print(f"Deflection rate: {data['deflection_rate']:.1f}%")
print(f"Handoffs: {data['conversations_with_handoff']}")
print(f"AI-resolved: {data['conversations_without_handoff']}")

print("\nBy Playbook:")
for pb in data.get("by_playbook", []):
    print(f"  {pb['playbook_name']}: {pb['deflection_rate']:.1f}% deflection "
          f"({pb['total_conversations']} convs)")

Sentiment Deep Dive

import json

with open("metrics_agg.json") as f:
    agg = json.load(f)

total_scored = agg["total_scored_conversations"]
sent = agg["sentiment_distribution"]

print(f"Scored: {total_scored}/{agg['total_conversations']} ({agg['coverage_percentage']:.1f}% coverage)")
print(f"\nSentiment:")
for label in ["positive", "neutral", "negative"]:
    count = sent.get(label, 0)
    pct = (count / total_scored * 100) if total_scored else 0
    print(f"  {label}: {count} ({pct:.1f}%)")

Conversation Signal Analysis

import json

with open("metrics_agg.json") as f:
    agg = json.load(f)

total = agg["total_scored_conversations"]

# Deflection quality — how well bot-resolved conversations actually went
defl = agg.get("deflection_quality_distribution", {})
print("Deflection Quality:")
for label in ["resolved", "partial", "actioned", "no_response"]:
    count = defl.get(label, 0)
    pct = (count / total * 100) if total else 0
    print(f"  {label}: {count} ({pct:.1f}%)")

# Handoff reasons — why conversations were escalated
ho = agg.get("handoff_reason_distribution", {})
print("\nHandoff Reasons:")
for label in ["policy", "user_request", "frustration", "bot_limitation"]:
    count = ho.get(label, 0)
    pct = (count / total * 100) if total else 0
    print(f"  {label}: {count} ({pct:.1f}%)")

# Recontact risk — likelihood of customer returning
risk = agg.get("recontact_risk_distribution", {})
print("\nRecontact Risk:")
for label in ["low", "medium", "high"]:
    count = risk.get(label, 0)
    pct = (count / total * 100) if total else 0
    print(f"  {label}: {count} ({pct:.1f}%)")

# Sentiment shift — did the bot make things better or worse?
shift = agg.get("sentiment_shift_distribution", {})
print("\nSentiment Shift:")
for label in ["improved", "stable", "degraded"]:
    count = shift.get(label, 0)
    pct = (count / total * 100) if total else 0
    print(f"  {label}: {count} ({pct:.1f}%)")

API Tool Usage Analysis

import json

with open("api_tool_usage.json") as f:
    data = json.load(f)

print(f"Total calls: {data['total_calls']}")
print(f"Success: {data['successful_calls']} | Failed: {data['failed_calls']}")
if data['avg_duration_ms']:
    print(f"Avg duration: {data['avg_duration_ms']:.0f}ms")

success_rate = (data['successful_calls'] / data['total_calls'] * 100) if data['total_calls'] else 0
print(f"Success rate: {success_rate:.1f}%")

print("\nDaily trend:")
for pt in data.get("time_series", []):
    print(f"  {pt['date']}: {pt['count']} calls ({pt['success_count']} ok)")

Toolkit Action Breakdown

import json

with open("toolkit_usage.json") as f:
    data = json.load(f)

print(f"Total calls: {data['total_calls']}")
print(f"Success: {data['successful_calls']} | Failed: {data['failed_calls']}")

print("\nBy Action:")
for action in data.get("by_action", []):
    rate = (action['success_count'] / action['count'] * 100) if action['count'] else 0
    print(f"  {action['action_name']}: {action['count']} calls ({rate:.0f}% success)")

print("\nRecent failures:")
for item in data.get("recent", []):
    if not item['success']:
        print(f"  [{item['created_at']}] {item['action_name']}: {item.get('error_message', 'unknown')}")

Skill Usage Analysis

import json

with open("skill_usage.json") as f:
    data = json.load(f)

print(f"Total skill loads: {data['total_calls']}")
print(f"Success: {data['successful_calls']} | Failed: {data['failed_calls']}")

success_rate = (data['successful_calls'] / data['total_calls'] * 100) if data['total_calls'] else 0
print(f"Success rate: {success_rate:.1f}%")

print("\nRecent loads:")
for item in data.get("recent", []):
    status = "ok" if item['success'] else f"FAIL: {item.get('error_message', 'unknown')}"
    print(f"  [{item['created_at']}] {item['skill_name']}: {status}")

KB Citation & Top Items Analysis

import json

# Step 1: List all KBs to get names
with open("kbs.json") as f:
    kbs = json.load(f)
kb_names = {kb["id"]: kb["title"] for kb in kbs}

# Step 2: Get per-item traffic for a specific KB
with open("kb_item_traffic.json") as f:
    data = json.load(f)

print(f"Top {data['total_items_cited']} cited items:")
for item in data["items"]:
    print(f"  {item['item_id']}: {item['count']} citations")

# Step 3: Resolve item names by fetching item metadata
# For each item_id, call GET /knowledgebases/{kb_id}/items/{item_id}
# to get item_type, title, and url

Common query: "Top 10 most cited Intercom articles"

# 1. Find the Intercom KB id
python3 scripts/fetch.py "/projects/$STUDIO_PROJECT_ID/knowledgebases" -o kbs.json
# Look for kb_type=intercom in the output

# 2. Get top items by citation count
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/analytics/kbs/INTERCOM_KB_ID/items" \
  --params limit=10 \
  -o top_intercom_items.json

# 3. Resolve item titles
python3 scripts/fetch.py "/knowledgebases/INTERCOM_KB_ID" -o intercom_kb.json
import json

with open("top_intercom_items.json") as f:
    traffic = json.load(f)

with open("intercom_kb.json") as f:
    kb = json.load(f)

# Build item_id -> title lookup from intercom_items
item_titles = {item["id"]: item["title"] for item in kb.get("intercom_items", [])}

print("Top 10 most cited Intercom articles:")
for i, entry in enumerate(traffic["items"][:10], 1):
    title = item_titles.get(entry["item_id"], entry["item_id"])
    print(f"  {i}. {title} — {entry['count']} citations")

Sparkline Overview (All Resources at a Glance)

import json

with open("api_tool_sparklines.json") as f:
    sparklines = json.load(f)

print("API Tool activity (last 14 days):")
for tool_id, item in sorted(sparklines.items(), key=lambda x: x[1]['total'], reverse=True):
    trend = " ".join(str(pt['count']) for pt in item['series'][-7:])
    print(f"  {tool_id}: {item['total']} total | last 7d: [{trend}]")

with open("toolkit_sparklines.json") as f:
    sparklines = json.load(f)

print("\nToolkit activity (last 14 days):")
for slug, item in sorted(sparklines.items(), key=lambda x: x[1]['total'], reverse=True):
    trend = " ".join(str(pt['count']) for pt in item['series'][-7:])
    print(f"  {slug}: {item['total']} total | last 7d: [{trend}]")

with open("skill_sparklines.json") as f:
    sparklines = json.load(f)

print("\nSkill activity (last 14 days):")
for name, item in sorted(sparklines.items(), key=lambda x: x[1]['total'], reverse=True):
    trend = " ".join(str(pt['count']) for pt in item['series'][-7:])
    print(f"  {name}: {item['total']} total | last 7d: [{trend}]")

Conversation Metadata Analysis (inline fields)

import json

# All metadata comes inline — no separate enrichment calls needed
with open("all_conversations.json") as f:
    data = json.load(f)

convs = data["conversations"]
print(f"Total: {len(convs)} conversations\n")

# Sentiment breakdown (from inline sentiment_label)
sentiments = {}
for c in convs:
    label = c.get("sentiment_label") or "unscored"
    sentiments[label] = sentiments.get(label, 0) + 1
print("Sentiment:")
for label, count in sorted(sentiments.items()):
    print(f"  {label}: {count}")

# Skills usage (from inline skills field)
skill_counts = {}
for c in convs:
    for skill in c.get("skills") or []:
        skill_counts[skill] = skill_counts.get(skill, 0) + 1
print("\nSkills loaded:")
for skill, count in sorted(skill_counts.items(), key=lambda x: -x[1]):
    print(f"  {skill}: {count} conversations")

# Handoff conversations with negative sentiment
bad_handoffs = [c for c in convs if c.get("has_handoff") and c.get("sentiment_label") == "negative"]
print(f"\nNegative handoffs: {len(bad_handoffs)}")
for c in bad_handoffs[:5]:
    print(f"  [{c['conversation_id']}] {c.get('summary', 'no summary')[:80]}")

# Deflection quality breakdown (non-handoff only)
defl_counts = {}
for c in convs:
    dq = c.get("deflection_quality")
    if dq:
        defl_counts[dq] = defl_counts.get(dq, 0) + 1
print("\nDeflection Quality:")
for label, count in sorted(defl_counts.items()):
    print(f"  {label}: {count}")

# Handoff reasons (handoff only)
ho_counts = {}
for c in convs:
    hr = c.get("handoff_reason")
    if hr:
        ho_counts[hr] = ho_counts.get(hr, 0) + 1
print("\nHandoff Reasons:")
for label, count in sorted(ho_counts.items()):
    print(f"  {label}: {count}")

# High recontact risk conversations
high_risk = [c for c in convs if c.get("recontact_risk") == "high"]
print(f"\nHigh recontact risk: {len(high_risk)}")
for c in high_risk[:5]:
    print(f"  [{c['conversation_id']}] {c.get('user_intent', 'no intent')}: {c.get('recontact_risk_reason', '')[:80]}")

Reference

Query Dimensions

Every conversation query supports these filter dimensions. All filters are server-side — no client-side post-filtering needed.

DimensionParameterTypeLogicExample
Date rangestart_date, end_dateISO 8601 stringRange on last_message_atstart_date=2025-01-01T00:00:00Z
Assistant / Playbook (version)playbook_idUUIDExact match on specific versionplaybook_id=abc-123
Assistant / Playbook (all versions)playbook_base_idUUIDAll versions of an assistantplaybook_base_id=def-456
Inbox / Channelinbox_idUUIDExact match (Website, WhatsApp, etc.)inbox_id=inbox-789
Handoffhas_handoffbooltrue = escalated, false = AI-resolvedhas_handoff=true
Winbackhas_winbackbooltrue = winback sent, false = not senthas_winback=true
Tagstagscomma-separatedAND logic — must have ALL tagstags=billing,refund
Sentimentsentimentcomma-separatedOR logic — any of the valuessentiment=negative,neutral
Resourcesresourcescomma-separatedOR logic — any of the valuesresources=irrelevant,partial
Sentiment Shiftsentiment_shiftcomma-separatedOR logicsentiment_shift=degraded
Deflection Qualitydeflection_qualitycomma-separatedOR logic (non-handoff only)deflection_quality=actioned,no_response
Handoff Reasonhandoff_reasoncomma-separatedOR logic (handoff only)handoff_reason=frustration,bot_limitation
Recontact Riskrecontact_riskcomma-separatedOR logicrecontact_risk=high
Message countmin_messages, max_messagesintRange filtermin_messages=5&max_messages=20
Skillskill_namestringConversations that loaded this skillskill_name=refund-process
SearchsearchstringSubstring match on conversation IDsearch=12345
Exact IDsconversation_idslist (POST body)Exact match on a list of IDsUsed by batch endpoint

Sorting

ParameterValuesDefault
sort_bylast_message_at, first_message_at, message_countlast_message_at
sort_orderdesc, ascdesc

Date Ranges & Timezones

Always scope queries with start_date and end_date in ISO 8601 format.

Timezone handling:

  • UTC is the default. If no timezone offset is provided, the timestamp is treated as UTC.
  • Timezone-aware timestamps are supported. You can pass any valid ISO 8601 offset.
  • The export_conversations.py script accepts short form dates and appends T00:00:00Z (UTC).
FormatExampleTimezone
Full UTC2025-01-01T00:00:00ZUTC
With offset2025-01-01T00:00:00-03:00ART (Argentina)
With offset2025-01-01T00:00:00-05:00EST
Short form (scripts)2025-01-01Converted to 2025-01-01T00:00:00Z (UTC)

Important: Date filters apply to last_message_at (last activity in the conversation), not the creation time. This ensures the filter matches what's displayed in the UI.

Metric Labels

TypeValuesMeaning
Sentimentnegative, neutral, positiveCustomer emotional state (LLM-scored)
Resourcesirrelevant, partial, relevantHow well KBs/tools served the conversation
Sentiment Shiftimproved, stable, degradedHow sentiment changed during conversation
Deflection Qualityresolved, partial, actioned, no_responseResolution quality for non-handoff conversations
Handoff Reasonpolicy, user_request, frustration, bot_limitationWhy conversation was escalated (handoff only)
Recontact Risklow, medium, highLikelihood of user returning with same issue

Conditional signals:

  • deflection_quality is only present when has_handoff=false (bot-resolved conversations)
  • handoff_reason is only present when has_handoff=true (escalated conversations)
  • resources is only present when tool calls were used in the conversation
  • All other signals (sentiment, sentiment_shift, recontact_risk, user_intent, summary) are always present when scored

Free text signals:

  • user_intent — short phrase describing what the user wanted (e.g., "cancel subscription", "pricing for enterprise plan")
  • summary — 2-3 sentence summary of the full conversation flow including tools/KBs used

Deflection Rate

deflection_rate = conversations_without_handoff / total_conversations x 100

Higher = better (more conversations resolved by AI without human escalation).

Combining Dimensions

All filters can be combined. Examples:

# Negative sentiment conversations that used the refund skill in January
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params start_date=2025-01-01T00:00:00Z end_date=2025-02-01T00:00:00Z \
    sentiment=negative skill_name=refund-process limit=100 \
  -o negative_refund.json

# Handoff conversations with billing tag, sorted by message count
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params has_handoff=true tags=billing sort_by=message_count sort_order=desc \
  -o billing_handoffs.json

# Long conversations (10+ messages) with irrelevant resources
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params min_messages=10 resources=irrelevant limit=50 \
  -o long_irrelevant.json

# Conversations where bot created a follow-up action (ticket, email, etc.)
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params deflection_quality=actioned limit=100 \
  -o actioned.json

# Handoffs caused by frustration
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params handoff_reason=frustration limit=100 \
  -o frustration_handoffs.json

# High recontact risk conversations
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params recontact_risk=high limit=100 \
  -o high_risk.json

# Conversations where sentiment degraded
python3 scripts/fetch.py \
  "/projects/$STUDIO_PROJECT_ID/conversations" \
  --params sentiment_shift=degraded limit=100 \
  -o degraded.json

平台分布

Codex

38.74%
按下载量换算64

Claude

29.58%
按下载量换算49

Cursor

19.25%
按下载量换算32

Gemini CLI

9.23%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills