analyze-copilot-sessions
БесплатноЗапускает вложенные скриптыНе проверенAnalyze historical VS Code GitHub Copilot Chat sessions by model, reasoning effort, AIU, time, reliability, workflow behavior, and external quality evidence…
от aktsmm★ 27 звёзд на GitHubОб этом скилле
Analyze Copilot Sessions
Analyze historical Copilot Chat runs from reproducible aggregate metrics instead of impressions. Summarize one run's configuration and bottlenecks; compare normalized results when multiple runs are supplied.
When to Use
- "Where did this session spend time or AIU?"
- "Did this repeated task improve compared with the previous run?"
- "Which model or reasoning effort gives the best value?"
- "Compare recent sessions by cost, time, reliability, and quality evidence."
- "Delete this workspace's chat sessions older than 36 hours."
- Build an execution analysis from raw debug logs or existing metrics JSON.
Use a log troubleshooting workflow instead when the only goal is to explain one unexpected failure or agent decision.
Retention Cleanup
Use prune_chat_sessions.py for workspace-scoped local history cleanup.
- Run without
--applyfirst. Deletion always requires an explicit second run with--apply. - Use
chatSessions/*.jsonlmodification time as the conservative activity boundary. A session index can be partial or remain stale after files are removed, so never use its count as deletion authority. - Read
agentSessions.state.cachefromstate.vscdband protect every pinned local session automatically. The newest session is also protected by default; pass the active session ID with--protect-session-idwhen known. - On apply, remove exact candidate IDs from session files, auxiliary directories,
chat.ChatSessionStore.index, session state, and the local Chronicle index. Never delete debug logs, cloud data, or unrelated workspace storage. - Reload the VS Code window immediately after metadata cleanup. A live workbench can otherwise write its stale in-memory session index back to
state.vscdb. - Cloud-synced copies require the Delete Session Sync Data command; local cleanup does not imply cloud deletion.
Workflow
- Fix the analysis objective
- Identify the sessions, analysis focus, task kind, and workload unit.
- Bind each target to an explicit session ID or path and verify at least two independent anchors, such as workspace, creation window, or first-request task marker. Treat the current chat,
--recent, and log modification time as candidate discovery only. - For comparisons, also identify revision and workflow/rubric versions.
- Choose input
- Raw debug log: use extract_session_metrics.py to create aggregate JSON.
- Existing metrics JSON: pass it directly to the analyzer.
- Quality evidence: use an analysis manifest to bind metrics to persisted gate artifacts.
- Extract
- Stream large logs with the script; do not load full transcripts into context.
- Prefer explicit session paths or IDs. Use
--recentonly to select candidates. - Treat an active session directory as mutable. Save timestamped metrics snapshots before later log compaction can remove earlier events.
- Analyze
- Use analyze_session_metrics.py to summarize model configuration, agent roles, AIU, time, errors, quality evidence, and missing data.
- For two or more runs, also emit per-unit normalization, median/IQR, purpose-specific winners, Pareto frontier, and comparability confidence.
- Assess quality
- Mark runs without external gates as
UNMEASURED. - Do not infer accuracy from completion text, fix counts, or low error rates.
- Mark runs without external gates as
- Report
- For one run, separate configuration, consumption, bottlenecks, and data quality.
- For multiple runs, separate cost, speed, and quality-evidence winners.
- State that AIU is relative usage, not currency.
- Include sample size, outliers, workflow differences, and uncertainty.
Commands
Treat the installed folder as <skill-dir>.
python <skill-dir>/scripts/extract_session_metrics.py `
--session-dir <debug-session-dir> --unit-count 30 --unit-name question `
--task-kind review --output-json <metrics.json> --json-only --strict-exit-codes
python <skill-dir>/scripts/analyze_session_metrics.py `
<metrics.json> --output-json <analysis.json> --json-only --strict-exit-codes
python <skill-dir>/scripts/analyze_session_metrics.py `
--manifest <analysis-manifest.json> --output-json <analysis.json> `
--json-only --strict-exit-codes
python <skill-dir>/scripts/prune_chat_sessions.py `
--workspace <workspace-root> --older-than-hours 36
python <skill-dir>/scripts/prune_chat_sessions.py `
--workspace <workspace-root> --older-than-hours 36 `
--protect-session-id <active-session-id> --apply
Pass metrics JSON as positional inputs when no quality manifest is needed. Add --weights '{"cost":1,"time":1,"quality":1}' only when the user explicitly requests a weighted overall ranking.
Decision Rules
- Analyze one run without requiring a comparison target.
- For multiple runs, treat an identical workload fingerprint as the strongest comparison.
- Tr
Установить analyze-copilot-sessions в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл analyze-copilot-sessions?
Analyze historical VS Code GitHub Copilot Chat sessions by model, reasoning effort, AIU, time, reliability, workflow behavior, and external quality evidence, or safely prune workspace-scoped local chat history by age. Use for session analysis, repeated-task retrospectives, model evaluation, cost/performance analysis, and old session cleanup.
Как установить скилл analyze-copilot-sessions?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл analyze-copilot-sessions запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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