Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Session Analysis

ASecurity

Use when the user wants a judgment-level read on whether a Claude Code session stayed on task — did the agent do what was originally asked, and what did it acknowledge skipping. This is the interpretive (LLM) complement to the deterministic `session-audit` CLI: 1a extracts ask-vs-done for free; this skill adds the `Variance` and `What was NOT done` judgment that a parser can't compute, then persists a combined record for drift analysis. Cost: ~1-3k tokens of the current session, paid only wh...

3 stars
0 votes
0 copies
1 views
Added 9/22/2026
developmentpythonshellbashgitapi

Works with

claude codecliapi

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add glitchwerks/claude-prospector --skill session-analysis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Session Analysis?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Session Analysis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/glitchwerks-session-analysis/badge)](https://www.skillsdirectory.com/skills/glitchwerks-session-analysis)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: session-analysis
description: >
  Use when the user wants a judgment-level read on whether a Claude Code
  session stayed on task — did the agent do what was originally asked, and
  what did it acknowledge skipping. This is the interpretive (LLM) complement
  to the deterministic `session-audit` CLI: 1a extracts ask-vs-done for free;
  this skill adds the `Variance` and `What was NOT done` judgment that a parser
  can't compute, then persists a combined record for drift analysis.

  Cost: ~1-3k tokens of the current session, paid only when invoked. Opt-in by
  design — run it selectively, not on every session. Best run in a Sonnet (or
  stronger) session; the judgment quality depends on it.

  Use `session-audit` (CLI) for the free deterministic ask/actions extract.
  Use `usage-analysis` for token-spend insights. Use `claude-audit` for
  agent/skill config overlap. Use THIS skill for "did this session drift from
  what I asked".

  Trigger phrases: "/session-analysis", "did this session stay on task",
  "analyze session drift", "did the agent do what I asked", "what did this
  session skip", "variance analysis for session", "audit this session for
  drift", "check session <id> for variance".
---

# Session Analysis Skill (1b)

You are producing the **judgment** half of session drift-detection: given a
session's deterministic ask-vs-done extract (from 1a), assess whether the
agent stayed on task and what it acknowledged leaving undone — then persist a
combined record. This is interpretive work; a deterministic parser cannot do
it, which is exactly why it costs LLM tokens and is opt-in.

## Prerequisites

This skill drives the `claude_prospector` CLI. The package must be installed
in the environment Claude Code uses — see the
[README install steps](https://github.com/glitchwerks/claude-prospector#install-as-a-claude-code-plugin).

## Step 1 — Identify the target session

The session-id (or transcript path) is `` if provided.

- If `` is a session-id, use it directly.
- If `` is empty, find the most recent transcript for the current
  project under `~/.claude/projects/<encoded-cwd>/*.jsonl` (newest mtime) and
  **confirm the session-id with the user before spending tokens** — variance
  analysis is opt-in, don't guess silently.

## Step 2 — Load the deterministic extract (free, 1a)

```bash
python -m claude_prospector session-audit --session-id <id> --format json
```

This returns `{original_ask, prior_asks, actions}`. `original_ask` is the
authoritative first ask; `prior_asks` are later distinct asks in the session;
`actions` are the Edit/Write/NotebookEdit file paths. Reason over this — it is
your ground truth for "what was asked" and "what was changed".

For richer context (reasoning, tool failures, what the agent *said* it was
doing), also read the transcript itself at the resolved
`~/.claude/projects/<…>/<id>.jsonl`. Use it to judge intent, not to recompute
the deterministic fields.

## Step 3 — Form the judgment

Assess two fields against `original_ask` (+ `prior_asks` for multi-task
sessions):

- **`variance`** — did the agent stay on the original ask? Note scope creep,
  approach pivots, or drift onto a later ask at the expense of the first.
  Cite specifics (a file in `actions` unrelated to the ask; a pivot point in
  the transcript). If it stayed on task, say so plainly — "no variance" is a
  valid, useful finding.
- **`not_done`** — what did the agent acknowledge skipping or defer? Prefer
  the agent's own admissions in the transcript over your speculation. If
  nothing was skipped, say so.

Optionally assign **`severity`** (integer 0-3): 0 = on task, 1 = minor drift,
2 = notable unrequested scope or skipped ask, 3 = the session largely did not
do what was asked. Omit (null) if you can't justify a number.

Be evidence-bound: every claim cites a file path, a `prior_asks` entry, or a
transcript moment. Do not invent drift to fill the field.

## Step 4 — Persist the combined record

Write the judgment to a temp JSON file (prose is multi-line; don't fight shell
escaping), then call `variance-save`. It re-loads 1a internally and writes the
combined `{1a fields + your judgment}` to `<data>/variance/<id>.json`:

```bash
# judgment.json: {"variance": "...", "not_done": "...", "severity": <int|null>}
python -m claude_prospector variance-save --session-id <id> --judgment-file judgment.json
```

`variance-save` finds the transcript under `~/.claude` and writes output under
the plugin data dir by default — no extra flags needed. It prints the written
path; surface that to the user.

## Step 5 — Report

Give the user a short variance report (NOT a JSON dump):

```
Session <id> — variance: <one-line verdict, severity if assigned>
  Asked:    <original_ask, trimmed>
  Variance: <the judgment, with its citation>
  Skipped:  <not_done, with its citation>
  Saved:    <path printed by variance-save>
```

## When to run (and not)

- **Run it** on a session you suspect drifted, a long multi-task session, or
  one flagged by `prior_asks.length > 0`. Selective use is the whole cost
  argument — 1a+1b beats the abandoned always-on hook only when 1b runs on a
  minority of sessions.
- **Don't** auto-run it on every session — that re-introduces the per-session
  cost this design exists to avoid.

Attribution

glitchwerksglitchwerks
View sourceMore from glitchwerks →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284722 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →