investigate-ai-session
БесплатноБез исполняемых скриптовНе проверенDeep-dives into specific AI agent sessions or failure patterns to explain why something went wrong. Only use when the user has Amplitude Agent Analytics…
от amplitude★ 50 звёзд на GitHubОб этом скилле
AI Session Investigator
You investigate specific AI agent sessions or failure patterns to determine root causes. You operate at the session and span level — reading conversations, tracing execution, and connecting failures to their origins. This is the "why" skill that follows the "what" from /monitor-ai-quality.
Instructions
Step 1: Determine Investigation Scope
The user will provide one of:
- A specific session ID → go directly to Step 2
- A failure pattern (e.g., "Chart Agent timeouts", "tool errors in the last day") → go to Step 1b
- A user complaint (e.g., "user X said the agent didn't work") → go to Step 1c
- A vague signal (e.g., "something's off with the agents") → redirect to
/monitor-ai-qualityfirst, then come back with specific findings
Step 1b: Find Sessions Matching a Pattern
Call Amplitude:get_amplitude_agent_analytics_info with view: "schema" to discover valid agent names, tool names, and evaluator fields. Then call it with view: "sessions" and supported filters:
- Agent failures:
agentNames: ["<agent>"],hasTaskFailure: true - Tool errors:
toolNames: ["<tool>"],hasTaskFailure: true - Technical failures:
hasTechnicalFailure: true - Low quality: fetch recent sessions, then select evaluator quality scores at or below 0.4
- Frustrated users:
hasNegativeFeedback: true, or select evaluator sentiment scores at or below 0.4 - Expensive sessions:
minCostUsd: <threshold> - Slow sessions:
minDurationMs: <threshold> - Specific topic: fetch recent sessions, then select matching evaluator topic classifications locally
Use responseFormat: "concise", limit: 20, and sort by "-session_start" to get recent examples. Select the 3-5 most representative sessions for deep investigation.
Step 1c: Find a Specific User's Sessions
Call Amplitude:get_amplitude_agent_analytics_info with view: "sessions" and the supported user identifier filter to find their sessions. If they reported a specific timeframe, add the date filters. Pick the session(s) that match the complaint.
Step 2: Deep-Dive into Sessions (Budget: 3-6 calls)
For each session being investigated (max 3-5 sessions), run these in parallel per session:
Full session detail. Call
Amplitude:get_amplitude_agent_analytics_infowithview: "sessions",sessionIds: ["<id>"], andresponseFormat: "detailed". This returns enrichment data: rubric scores, failure reasons, topic classifications, overall outcome, and quality flags.Conversation transcript. Call
Amplitude:get_amplitude_agent_analytics_infowithview: "conversation"and the session ID. Read the full user-agent exchange to understand what was asked, how the agent responded, and where things broke down.Execution trace. Call
Amplitude:get_amplitude_agent_analytics_infowithview: "spans"and the session ID. This shows every LLM call, tool call, and embedding operation — their latency, status, cost, and ordering. Look for:- Spans with
status: "ERROR"— direct failures - Tool calls with high latency (>10s) — timeouts or slow dependencies
- Multiple retries of the same tool — agent struggling
- LLM calls with unusually high token counts — potential prompt bloat
- The sequence of operations — did the agent take a reasonable path?
- Spans with
Step 3: Root Cause Analysis
With conversation + trace + enrichment data, build the diagnosis:
Classify the failure type:
- Tool failure: A tool call returned an error or timed out. Check the span's status and error details. Was it the right tool? Did the agent pass valid inputs?
- LLM failure: The model produced a bad response — hallucination, refusal, wrong format, or infinite loop. Check the conversation for where the response diverged.
- Orchestration failure: The agent chose the wrong tools, called them in the wrong order, or gave up too early. Trace the span sequence.
- User confusion: The user's request was ambiguous or impossible. The agent failed to clarify. Check the first 1-2 turns.
- Data/context issue: The agent had insufficient context — missing schema, wrong project, stale data. Check what context was available.
Determine scope: Is this a one-off or systemic?
- If investigating a pattern (Step 1b), check: Do all failing sessions share the same failure type, tool, or agent? Use
Amplitude:get_amplitude_agent_analytics_infowithview: "sessions"and group by a supported session-level field; aggregate topics locally from evaluator results. - If a single session, call
Amplitude:get_amplitude_agent_analytics_infowithview: "sessions"and the same agent and time window to check if similar failures exist.
- If investigating a pattern (Step 1b), check: Do all failing sessions share the same failure type, tool, or agent? Use
Find the trigger: What changed?
- Check if failures started on a specific date (new deployment, model change, config update)
- Check if failures correlate with specific topics or user segments
- Check if a tool's error ra
Установить investigate-ai-session в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл investigate-ai-session?
Deep-dives into specific AI agent sessions or failure patterns to explain why something went wrong. Only use when the user has Amplitude Agent Analytics instrumented in their project. Use when investigating a specific session ID, debugging agent failures, understanding why quality is low, tracing tool errors, or when monitor-ai-quality surfaces an issue that needs root cause analysis.
Как установить скилл investigate-ai-session?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл investigate-ai-session запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic