Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

analyze-chat-export

БесплатноБез исполняемых скриптовНе проверен

Export and analyze VS Code Copilot chat logs for retrospective metrics. Extracts model usage, tool invocations, approval patterns, and timing data.

diegosouzapwот diegosouzapw★ 68 звёзд на GitHub

Об этом скилле

Analyze Chat Export

Purpose

Extract structured metrics from VS Code Copilot chat exports to support retrospective analysis. Provides data on model usage, tool invocations, manual approvals, and session timing.

Hard Rules

Must

  • Use the extract-metrics.sh script for analysis (consolidates all queries).
  • Redact sensitive information before committing chat logs.
  • Save analysis results alongside the chat export in the feature folder.

Must Not

  • Commit unredacted chat logs containing passwords, tokens, API keys, secrets, or PII.
  • Load the entire JSON file into memory (use streaming jq queries).

Pre-requisites

  • jq command-line JSON processor installed.
  • Chat export file (.json) already saved via workbench.action.chat.export command.

Known Limitations

Custom agent names are NOT recorded in the export.

The chat export only contains the VS Code infrastructure agent (github.copilot.editsAgent), not the custom agent definition file (e.g., developer.agent.md, @Developer).

Impact:

  • Cannot analyze metrics per custom agent
  • Cannot determine which agent definitions performed best
  • Cross-feature analysis loses agent context

Note: A single feature chat typically includes work from multiple agents, so per-agent analysis would require VS Code to record this information in the export format.

Quick Start

Recommended: Use the extraction script

# Generate analysis files (both markdown and JSON)
.github/skills/analyze-chat-export/extract-metrics.sh docs/features/<feature-name>/chat.json docs/features/<feature-name>/chat-metrics

This creates:

  • chat-metrics.md - Human-readable report for review
  • chat-metrics.json - Raw data for cross-feature analysis (commit this file)

Export Structure Reference

See these reference documents:

Quick Reference: Top-Level Keys

{
  "initialLocation": "panel",
  "requests": [...],
  "responderAvatarIconUri": { "id": "copilot" },
  "responderUsername": "Copilot"
}

Quick Reference: Request Fields

Field Description
modelId Model used (e.g., copilot/gpt-5.1-codex-max)
timestamp Unix timestamp in milliseconds
timeSpentWaiting Time waiting for user confirmation (ms)
message.text User's input text
response[] Array of response elements (text, thinking, tool invocations)
result.timings.totalElapsed Total response time (ms)
result.timings.firstProgress Time to first content (ms)
modelState.value Response state (0=Pending, 1=Complete, 2=Cancelled, 3=Failed, 4=NeedsInput)
vote User feedback (0=down, 1=up)
editedFileEvents[] Files edited with accept/reject status

Quick Reference: Confirmation Types (isConfirmed.type)

Type Meaning
0 Pending or cancelled
1 Auto-approved
3 Profile-scoped auto-approve
4 Manually approved

Quick Reference: Response State (modelState.value)

Value Meaning
0 Pending - still generating
1 Complete - success
2 Cancelled - user cancelled
3 Failed - error occurred
4 NeedsInput - waiting for confirmation

Actions

1. Export Chat (Prerequisite)

Ask the Maintainer to:

  1. Focus the chat panel.
  2. Run command: workbench.action.chat.export
  3. Save to: docs/features/<feature-name>/chat.json

2. Run Extraction Script (Recommended)

# Generate analysis report (creates both .md and .json files)
.github/skills/analyze-chat-export/extract-metrics.sh docs/features/<feature-name>/chat.json docs/features/<feature-name>/chat-metrics

This creates two files:

  • chat-metrics.md - Human-readable markdown report
  • chat-metrics.json - Raw metrics data for cross-feature analysis (commit this file)

The script outputs a markdown report with:

  • Session overview (duration, requests, time breakdown)
  • Model usage statistics
  • Tool usage breakdown (top 15)
  • Automation effectiveness (auto vs manual approvals)
  • Model success rates
  • Response times by model
  • Error summary
  • User feedback votes

3. Individual jq Queries (Advanced)

For custom analysis or debugging, use individual jq queries.

Session Metrics

CHAT_FILE="docs/features/<feature-name>/chat.json"

# Total requests/turns
jq '.requests | length' "$CHAT_FILE"

# Session duration in minutes
jq '((.requests | last.timestamp) - (.requests | first.timestamp)) / 1000 / 60 | floor' "$CHAT_FILE"

# First and last timestamps (for start/end times)
jq '.requests | first.timestamp, last.timestamp' "$CHAT_FILE"

# Time breakdown (all in seconds)
jq '
{
  session_duration_sec: (((.requests | last.timestamp) - (.requests | first.timestamp)) / 1000 | floor),
  user_wait_time_sec: (([.req
Полный SKILL.md на GitHub

Установить analyze-chat-export в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.json

FAQ

Что делает скилл analyze-chat-export?

Export and analyze VS Code Copilot chat logs for retrospective metrics. Extracts model usage, tool invocations, approval patterns, and timing data.

Как установить скилл analyze-chat-export?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл analyze-chat-export запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить analyze-chat-export с