Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Dvdst Session Analysis?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/itama8-dvdst-session-analysis)
---
name: dvdst-session-analysis
description: Use DVDST when looking back at Pi, Claude Code, Codex, or Antigravity sessions, for any purpose.
metadata:
compatibility: Requires Node 22+ and a dvdst checkout with dependencies installed; reads Pi, Claude Code, Codex, and saved or imported Antigravity sessions locally.
---
# dvdst session analysis
dvdst turns session files into rows: one JSON object per line, the same shape
for sessions across supported agents. Start with focused rows before reading
raw transcripts. Inspect raw source only when a claim needs verification or an
unsupported format cannot answer the question. `jq` is optional for filtering.
Run `dvdst`. If it is not on the path, run `node <dvdst checkout>/bin/dvdst.mjs`
with the same arguments. It works from any directory and loads dependencies
from its checkout. If dependencies are missing, run `npm ci --include=dev`
inside that checkout with Node 22+. No build, model credentials, host extension,
or ingest step is required for analysis. For full setup and recipes, read
`docs/agents.md` in the DVDST checkout.
## 1. Pick the stream
Use `dvdst capabilities --group exploration` to discover built-in operations,
then `dvdst capabilities search` (or another command) for typed inputs, defaults,
source support, conditional effects, and output schemas where declared. This
lookup never loads project extractors. A null legacy output schema means its
fields are not declared; consult that command's docs instead of guessing.
| command | one row per | use it for |
| --- | --- | --- |
| `dvdst overview` | session | time, tokens, cost, tool totals, first prompt |
| `dvdst turns` | canonical assistant message | tokens, context size, cost, model, generation time |
| `dvdst calls` | tool call with its result | what ran, duration, exit code, result size, truncation, files read and changed, repeats |
| `dvdst context` | system prompt section | what the session started with, and its size |
| `dvdst messages` | canonical message | browse prompts/replies with bounded text and tool links |
| `dvdst files --contract exploration` | explicit file target or inferred shell effect | attempted paths with evidence basis/outcome |
| `dvdst commands --contract exploration` | normalized shell attempt | bounded command prefix, classification and recorded outcome |
| `dvdst skills --contract exploration` | invocation or attribution membership | expanded/loaded/failed/unconfirmed skills; associations, not adherence |
| `dvdst search` | matching message/command/result | find earlier requests, corrections, decisions, or failures |
Inspect `dvdst schema calls` or its capability descriptor before composing a
filter. Both share the field contract. Do not guess field names.
## 2. Pick the sessions
```bash
dvdst overview latest # newest session of this directory's project
dvdst calls 01a1180d # a session id or id prefix, from any agent
dvdst calls /path/to/session.jsonl # a file
dvdst overview --last 50 # the newest 50
dvdst overview --project omakase-v2 --since 2026-10-01
dvdst overview --project omakase-v2 --source claude
dvdst overview --project omakase-v2 --source antigravity
dvdst overview --project omakase-v2 --source all
dvdst calls latest --source codex --errors
```
With no session, the commands read `$PI_SESSION_FILE`, which is the current
session inside Pi. `latest`, `--last`, and `--since` select Pi sessions unless
you pass `--source claude`, `--source codex`, `--source antigravity`, or `--source all`. `DVDST_SOURCE`
sets that default. Verify `overview.path`, `session`, and `firstPrompt` before
using a discovered transcript: `latest` can refer to another concurrent agent,
and discovery falls back to every project when the current cwd has none. It
then prints `dvdst: no ... sessions recorded for the working directory ...` on
stderr: treat that as a wrong-scope warning and add `--project` or a path.
Prefer an exact path for a particular session. `--project <name>` constrains
project discovery; `--root <dir>` selects a flat transcript directory.
`--source` also works for `files`, `commands`, and `skills` with
`--contract exploration`. Legacy inspection and `handoff` take a transcript
file. Export saved Antigravity history for those commands. Stored inspection requires `--store`/`--session` (optional
`--snapshot`) and rejects transcript selectors/discovery flags. The
standalone `sessions` filename discovery command remains Pi-only.
`--source antigravity` discovers saved CLI and local T3 Code ACP histories as
well as captures under `~/.gemini/antigravity-cli/dvdst/`. Use
`dvdst overview --source antigravity --project <name>`, then query the ID
or copy the exact `antigravity-native:…` locator from `overview.path`.
Prefer the locator if profiles or captures share an ID. Inspect
`overview.coverage` for evidence limits. Use `antigravity-import` to
export saved history or to convert a recorded stream.
## 3. Ask the question
For conversation questions, search first, then expand the exact hit:
```bash
dvdst search /path/to/session.jsonl --query 'keep local Open' --role user --page
dvdst message --ref '<messageRef copied from the hit>' --before 2 --after 2
dvdst messages /path/to/session.jsonl --role user --limit 10
dvdst search /path/to/session.jsonl --query 'parser failed' --in results --limit 5
```
`messages` and `search` accept analysis session selection, `--fields`,
`--offset`, JSONL/JSON/TSV, and default to 20 rows with 240-character text slices.
`--text-limit` accepts 1–4096; use `--full` for complete text in one run rather
than one `message --ref` call per long reply. Rows carry `kind` (`human`,
`injected`, `skill-expansion`, `notification`, `agent`, `tool`, `unknown`);
search hits carry `messageKind`. Use `--kind human` when counting what the user
said: AGENTS.md blocks, system reminders, skill expansions and notifications
are separated. `human` is the prompt path without a harness marker, not proof
of authorship; `unknown` is not `human`.
Assistant messages holding only thinking or tool calls are rows with
`text.totalChars: 0`; add `--nonempty` to `messages` to skip them. `seq` keeps
addressing the full conversation, so expect gaps.
Search is literal; add `--ignore-case` as needed. `--in` selects messages,
commands, results, or all. Explicit roles filter every target.
Know the shape you asked for: JSONL rows by default, a bare JSON array with
`--format json`, and with `--page` one envelope object
`{schemaVersion, rows, matched, offset, returned, nextOffset, complete, selectedSources, readSources, failedSources}`.
Native inventory errors appear in `discoveryIssues` when a page is available.
Partial queries still exit nonzero. Row offsets are not snapshot cursors; an
`--offset` past the matching rows returns no data and a stderr notice.
`message` returns one object
`{schemaVersion, source, session, path, fingerprint, anchorSeq, messages, beforeRef, afterRef}`;
the anchor is the `messages` row whose `seq` equals `anchorSeq` (there is no
top-level `text`). It holds the anchor and two neighbors per side by default (all roles,
including tools), with 2000 characters per message. Continue the anchor with
`--text-offset`, or use `beforeRef`/`afterRef` for more neighbors. `--limit` on
this reader bounds characters per message. Tool links lead to `call`;
`message --ref` also accepts call refs to show requesting context. Message
refs require unchanged raw file bytes or an unchanged native analysis snapshot. Use `schema messages`, `schema search`,
and `schema message` for fields.
Start with `overview` to find the sessions that matter, then open `calls` or
`turns` for those. Every row carries `session`, so rows from many sessions can
go through one filter.
```bash
# the most expensive sessions
dvdst overview --last 50 | jq -s 'sort_by(-.cost)[:5][] | {session, cost, costBasis, turns, calls, firstPrompt}'
# what failed in one session
dvdst calls latest --errors | jq -c '{seq, tool, exitCode, durationMs, command, path}'
# where the time went
dvdst calls latest | jq -s 'sort_by(-.durationMs)[:10][] | {seq, tool, durationMs, command, path}'
# files read past the agent's output limit, across sessions
dvdst calls --last 50 | jq -r 'select(.truncated) | .reads[]' | sort | uniq -c | sort -rn | head
# context growth across one session
dvdst turns latest | jq -c '{turn, contextTokens, outputTokens, calls}'
# what kind of bash work a project does: group by program, not by your own regex
dvdst calls --last 50 --tool bash | jq -r '.verbs[]' | sort | uniq -c | sort -rn | head -20
# the same failing command run again and again
dvdst calls --last 50 --errors | jq -c 'select(.commandAttempt >= 3) | {session, seq, commandAttempt, failureRun, command}'
# files read again with nothing changed in between
dvdst calls --last 50 | jq -r '.rereads[]' | sort | uniq -c | sort -rn | head
```
Use the fields the rows already carry before you write a pattern over
`command`: `verbs` names the programs a bash call runs, `classes` groups them
(`test`, `build`, `typecheck`, `inline-script`, and the project's own),
`rereads` marks repeated reads, and `commandAttempt` and `failureRun` count
repeats and consecutive failures. `overview` totals them per session.
Rows are cached per session; rerun focused queries as needed. `--no-cache`
bypasses caching for one analysis command.
`calls` takes `--tool <name>`, `--errors`, `--class <name>`, `--id <callId>`,
and `--seq <n>`. Built-in streams accept `--fields`, `--limit` (rows), and
`--offset`, applied after filtering across selected segments. Keep source
identity and references when projecting fields. Expand individual calls:
```bash
dvdst calls /path/to/session.jsonl --class test --limit 10 --fields session,seq,line,isError,ref
dvdst call /path/to/session.jsonl --seq 42 --limit 2000
dvdst call --ref '<ref copied from calls>' --limit 2000
dvdst schema call
```
`call` returns JSON with call metadata and separate `command`, `args`
(serialized JSON), and `result` slices. Each slice reports `nextOffset` and
`truncated`. Continue with `--result-offset`, `--args-offset`, or
`--command-offset`. The default limit is 4096 Unicode code points per field;
maximum 65536. Missing results are null. References pin an exact file and raw
snapshot; any append/change requires refreshing `calls`. Row offsets are not
snapshot cursors. `--full` remains available for bulk payload analysis, and
payload field projection requires it. See `docs/evidence-retrieval.md`.
For file, command, or skill questions, use the shared inspection contract:
```bash
dvdst files /path/to/session.jsonl --contract exploration --path src/ --basis explicit-file-tool --page
dvdst commands /path/to/session.jsonl --contract exploration --class test --outcome unfinished --page
dvdst skills /path/to/session.jsonl --contract exploration --load-status unconfirmed --page
dvdst skills /path/to/session.jsonl --contract exploration --view attributions --limit 10 --page
```
Read `capabilities files|commands|skills` and their matching schemas. These
queries share transcript selection, `--fields`, `--limit`, `--offset`, and
JSONL/JSON/TSV with conversation queries. They default to 20 rows; commands
return 240-character prefixes (`--text-limit` 1–4096), expanded with `call --ref`.
Every row preserves segment/fingerprint, raw source line/byte provenance, and
call/message references. Use `refKind` for the reader; `messageRef` shows context.
`--page` reports continuation and failed sources; partial results exit nonzero.
File rows are attempted targets, with `basis: explicit-file-tool|inferred-shell`
and `outcome: succeeded|failed|unfinished`. A successful enclosing shell call
does not prove each inferred effect occurred. Skill candidates retain failed
and unconfirmed loads with no active span; same-turn attribution does not prove
adherence. Unknown tools acquire no invented targets. Bounds apply to returned
rows/text, not parser memory, total JSON bytes, or metadata sizes.
Without the contract flag, existing legacy inspection retains its differing
direct/store shapes and TSV defaults. New controls require exploration mode.
Exploration store mode reads raw snapshots without deriving files; legacy store
skills may write missing records. See `docs/inspection-queries.md`.
For a machine-readable closeout, run `dvdst handoff <session> --format json`.
For stored findings, `dvdst events <session> --store <directory>` prints a
snapshot descriptor; findings are in `<snapshot>/events/deterministic.jsonl`.
Staging is a separate optional index mutation workflow. Consult
`docs/session-staging.md` in the checkout before using it; normal reviewed Git
staging is also supported. Analysis does not require staging.
`dvdst session-stage --agent pi|claude|codex` replays one session's successful
edit/write (or Codex patch) calls into the index from its transcript; start
with `--list` and `--dry-run`. In Pi, the transcript comes from
`PI_SESSION_FILE`. Bash edits are never attributed or staged.
## 4. When no stream answers it
Write an extractor instead of a one-off script. Put a file in
`.dvdst/extractors/` that default-exports `{ derive(session) }`, and it becomes
`dvdst <name>` with the same session selection and formats. `derive` receives
the parsed session: `overview`, `turns`, `calls` with arguments and result
text, `context`, and the raw `records`. Add `summarize(rows)` to rank or count
across sessions. The dvdst checkout documents this in `docs/extractors.md` and
has two complete extractors in `examples/extractors/`.
## 5. Report what the rows support
- `reads` and `mutates` of a bash call are inferred from the command text.
`opaque` lists the reasons a call may change files it does not name. Say so
when a claim rests on them.
- `durationMs` of Pi calls made in one message is an upper bound.
- A Claude Code session has no per-request cost (overview.cost is its own
recorded session total, `costBasis: session`, when present), no request start time, and no system
prompt. Those fields are null. Do not report null as zero.
- Codex turns are recorded assistant items, not guaranteed provider request
counts. Usage is attached once where recorded; Codex records no cost, so cost
and request start times remain null and cross-agent cost comparison cannot
include Codex. Analysis covers the supplied rollout segment. Complex exec
scripts remain opaque; supported literal batches expose their nested tools.
- An incomplete line in a growing transcript may make that file fail. Analysis
can emit rows for other sessions and still exit nonzero; inspect stderr and
do not treat partial output as complete. Retry after the file settles.
- Cite the `session` and `line` of the rows behind a finding, so a reader can
check it against the session file.
- Search on merged Claude text cites the matched block; its message's first
line may be earlier. Codex `channel` (the recorded channel, or the `phase`
`commentary`/`final_answer` in newer rollouts) distinguishes commentary from
final replies; it is null for Pi and Claude Code.
- Tool names differ by agent: Codex keeps `exec`, `write_stdin`, `wait`.
Filter across agents with `calls --family shell|poll|read|edit|write|search|web|other`
(`overview.families` counts them) and keep `tool` for the raw name. Thinking/reasoning blocks and binary content are not
substituted for conversation text. Recorded statements alone do not prove
implementation or acceptance.
- Handoff `validation` distinguishes unfinished tests, exact-argument retries,
and tests dispatched after the last potential mutation settled. Historical
failures stay counted after retry. Parallel edit/test calls do not prove
ordering. `stable` describes validation evidence, not correctness or acceptance.