Export a chat's or task's session as a markdown transcript from its folder. Use when asked to dump, export, or read a session/task as markdown, or review an agent run offline.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Session Transcript?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/instrument-org-session-transcript)
---
name: session-transcript
description: Export a chat's or task's session as a markdown transcript from its folder. Use when asked to dump, export, or read a session/task as markdown, or review an agent run offline.
---
# Session Transcript
`script:dump-session-transcript` renders a session from a chat's records, in its record folder `.instrument/chats/<id>/` in the workspace (the chat's own session, or one of its tasks'), into a markdown transcript.
The script lives in `packages/workspace`; the filter runs it from anywhere in the monorepo:
```bash
# From a chat's folder: its own conversation, or one of its tasks by session
pnpm --filter @instrument-org/workspace run script:dump-session-transcript <workspace>/.instrument/chats/my-chat
pnpm --filter @instrument-org/workspace run script:dump-session-transcript <workspace>/.instrument/chats/my-chat --session <task session id>
# Write to a file instead of stdout
pnpm --filter @instrument-org/workspace run script:dump-session-transcript <workspace>/.instrument/chats/my-chat --output transcript.md
```
## What it does
- Picks the chat's own session (warns, lists them, and uses the first if the store has more than one root); `--session <id>` picks any session, a task's included.
- Renders the selected session via `getSessionMarkdown`
(`src/lib/session-to-markdown.ts`).
- Includes the latest persisted system and agent-context snapshot. Long-running
sessions may have refreshed this snapshot, so it may differ from context used
by earlier responses.
- Emits YAML front matter with task/session identity, model/provider usage,
token totals, AI-generation and elapsed durations, message/tool counts, and
source details.
- Annotates each assistant response with its model, finish reason, token
breakdown, latency, throughput, and full persisted error metadata.
- Preserves user-turn/model-step boundaries, provider sources, file changes,
other persisted data, empty/aborted steps, and interrupted or invalid tool
diagnostics.
## Notes
- Reads only; never mutates the chat. Output is stdout unless `--output` is set.
- To explore raw session JSON interactively instead, use `script:dump-sessions <workspace-dir>` (prompts for a task, copies JSON to the clipboard).