analyze-sessions
БесплатноЗапускает вложенные скриптыНе проверенAnalyzes your local Copilot CLI sessions for dotnet/maui to drive iterative improvements to the PR-review agent (and other agents, skills, and instruction…
от dotnet★ 23 319 звёзд на GitHubОб этом скилле
Analyze Sessions
Mines your local Copilot CLI session logs to find where agents waste effort or fail, then turns those findings into concrete repo edits + regression evals. It automates — for the whole fleet of your local sessions — a manual select → extract → judge → improve loop and the guard-eval mechanism shipped in PR #36002.
Trigger phrases: "analyze my recent maui sessions for agent improvements", "what's making my Copilot runs expensive / fail", "find recurring failure modes in my sessions", "turn my session failures into guard evals".
Do NOT use for: reviewing a single PR (use pr-review), running tests,
investigating CI failures (use azdo-build-investigator), or any informational
question — answer those directly.
Privacy contract (non-negotiable): This skill is local-only. It reads
~/.copilot/...and writes a redacted report into your session workspace. It NEVER opens a gist, NEVER POSTs a transcript, and NEVER ships session data to a third-party endpoint. The LLM-judge step runs inside your own Copilot session (your auth, your quota). Any cross-machine sharing is explicit, manual, opt-in — see Privacy & safety.
Architecture — one engine, two front doors
A deterministic PowerShell shared core does the heavy, reproducible work (select → extract → score → digest + redact). The judgment work (tag → cluster → propose → emit-eval) is done by you, the agent, reading the core's redacted output — no third-party endpoint is involved.
┌──────────────────────────────────────────────┐
local front door │ scripts/Get-SessionAnalysis.ps1 (NO LLM) │
-Repository/-Last│ select → extract → score → digest → redact │
-SessionId ─────►│ • dotnet-replay --summary --json (primary)│
│ • thin raw events.jsonl scan (supplemental)│
CI front door │ emits: session-analysis.md + .json contract│
-EventsDir ────►│ │
-EventsPath └───────────────────┬──────────────────────────┘
│ redacted digests + ranking
▼
┌──────────────────────────────────────────────┐
agent, in your │ judge → cluster → propose → emit-eval │
own session ─────►│ (rubric tagging, learn-from-pr taxonomy, │
│ vally guard-eval per recurring mode) │
└──────────────────────────────────────────────┘
The same core powers the existing CI-session pipeline: point it at downloaded
AzDO events.jsonl artifacts with -EventsDir / -EventsPath and it skips the
local DB select entirely. See references/design-rationale.md.
Inputs
| Input | Required | Default | Notes |
|---|---|---|---|
| Repository | No | dotnet/maui |
Filters session-store.db |
| Last N | No | 10 |
Most recently-updated sessions |
| Session id(s) | No | — | One or more GUIDs (-SessionId; comma-delimit multiple ids for pwsh -File) |
| Since | No | — | ISO date; updated_at >= Since |
| Top K | No | 5 |
How many worst sessions get full digests |
| Events path/dir | No | — | CI front door (-EventsPath / -EventsDir) |
| Allow dnx download | No | false |
Explicitly permit the pinned dnx fallback to download dotnet-replay |
Outputs
- Ranked report (
session-analysis.md) — sessions ordered worst-first by a transparent cost/pain score, plus a redacted digest per worst session (intent flow, tool histogram, and bounded redacted failure details with event turn IDs (or a stable assistant-turn fallback). - JSON contract (
session-analysis.json) — machine-readable per-session metrics + ranking (also emitted to stdout with-Json). - Failure-mode analysis — your rubric tags + clusters with frequency.
- Proposals — concrete edits to
.github/instructions/*,.github/skills/*, and agent files (learn-from-pr taxonomy). - Guard evals — one
vallyeval per recurring failure mode. An eval that guards this skill's judge → cluster → propose workflow belongs under.github/skills/analyze-sessions/tests/eval.<short-mode>.vally.yaml, so the failure becomes a regression test. Do not invent a generic.github/evals/location.
The loop — 6 phases
Phase 1 — Select & extract & score (deterministic core)
Run the shared core. It selects sessions, normalizes them via dotnet-replay,
scores them, and writes the redacted report + JSON.
# Most-recent local maui sessions (writes report into your session workspace):
pwsh -NoProfile -File .github/skills/analyze-sessions/scripts/Get-SessionAnalysis.ps1 \
-Last 15 -Top 5 -OutputDir "$ARTIFACTS_DIR" -Json
# Specific sessions:
pwsh -NoProfile -File .github/skills/analyze-sessions/scripts/Get-SessionAnalysis.ps1 \
-SessionId <guid-a>,<guid-b> -Top 2 -OutputDir "$ARTIFACTS_DIR"
`
Установить analyze-sessions в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл analyze-sessions?
Analyzes your local Copilot CLI sessions for dotnet/maui to drive iterative improvements to the PR-review agent (and other agents, skills, and instruction files). Runs a select → extract → score → judge → cluster → propose → emit-eval loop: a deterministic core ranks your worst / most-expensive sessions, then the agent rubric-tags recurring failure modes, proposes concrete repo edits, and emits a vally guard-eval per failure mode so each one becomes a regression test. Triggers on: "analyze my recent maui sessions", "what's making my agent runs expensive", "find failure modes in my Copilot sessions", "turn my session failures into guard evals". LOCAL-ONLY — never uploads, shares, or posts transcripts. Do NOT use for: reviewing a single PR (use pr-review), running tests, or analyzing a GitHub issue.
Как установить скилл analyze-sessions?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл analyze-sessions запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic