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★ 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.shscript 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
jqcommand-line JSON processor installed.- Chat export file (
.json) already saved viaworkbench.action.chat.exportcommand.
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 reviewchat-metrics.json- Raw data for cross-feature analysis (commit this file)
Export Structure Reference
See these reference documents:
- Chat Export Structure - Empirical analysis of exported data
- Chat Export Format Specification - VS Code source-based type definitions
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:
- Focus the chat panel.
- Run command:
workbench.action.chat.export - 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 reportchat-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
Установить analyze-chat-export в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
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