Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

data-expert数据专家

Agent Skill

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

总安装

470

周安装

20

GitHub Stars

公开资料未说明

下载量

165
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 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

简介

辅助数据整理、指标计算与异常检测,支持 CSV/Excel 分析。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中处理结构化数据集时。
  • 通过 github 安装,使用 npx 添加指定技能路径。
  • 使用前需确认数据来源字段含义、时间范围及脱敏要求。
  • 注意评估是否会导出文件或批量写入敏感信息。

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

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、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills