/session-viewer
Render Codex, Claude Code, OpenClaw, or Pi session JSONL transcripts as a searchable, shareable single-file HTML viewer.
$ npx -y skills add openclaw/agent-skills --skill session-viewer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/session-viewer
Context preview
The summary Claude sees to decide when to auto-load this skill.
Render Codex, Claude Code, OpenClaw, or Pi session JSONL transcripts as a searchable, shareable single-file HTML viewer.
SKILL.md
session-viewer.SKILL.mdname: session-viewer
description: "Render Codex, Claude Code, OpenClaw, or Pi session JSONL transcripts as a searchable, shareable single-file HTML viewer."
Session Viewer
Use when asked to view, export, inspect, or share a Codex, Claude Code, OpenClaw, or Pi session transcript in a browser.
Commands
When the session path is not known and the `agent-transcript` skill is available, use it first to find the likely JSONL session:
.agents/skills/agent-transcript/scripts/agent-transcript find \
--query "$USER_GOAL_OR_TITLE $BRANCH_OR_URL" \
--cwd "$PWD" \
--since-days 14
Pick the highest-confidence `file` result, then render it with `session-viewer`.
From a repo that has this skill:
node skills/session-viewer/scripts/session-viewer.ts <session.jsonl> --out /tmp/session.html --open
Useful modes:
node skills/session-viewer/scripts/session-viewer.ts <session.jsonl> --out session.html
node skills/session-viewer/scripts/session-viewer.ts <session.jsonl> --raw --out session.html
node skills/session-viewer/scripts/session-viewer.ts --blank --out viewer.html --open
In a downstream repo that syncs shared skills under `.agents/skills`, replace `skills/session-viewer` with `.agents/skills/session-viewer`.
Defaults:
- detects `codex`, `claude`, or `pi-openclaw`
- embeds normalized session data into one HTML file
- keeps tool input/output text in the DOM so browser search can find it
- `--raw` embeds the original JSONL and lets the browser parse it
- `--blank` creates a reusable file-picker viewer
Where Sessions Live
Codex:
find "${CODEX_HOME:-$HOME/.codex}/sessions" -name 'rollout-*.jsonl' -type f | sort
ls -t "${CODEX_HOME:-$HOME/.codex}"/sessions/*/*/*/rollout-*.jsonl | headOpenClaw/Pi:
AGENT_ID="<agentId>"
SESSION_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/agents/$AGENT_ID/sessions"
ls -t "$SESSION_DIR"/*.jsonl | head
find "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/agents" -path '*/sessions/*.jsonl' -type f | sortUse `sessions.json` in the same directory to map session keys to session ids.
Claude Code:
find "$HOME/.claude/projects" -name '*.jsonl' -type f | sort
ls -t "$HOME/.claude/projects"/**/*.jsonl | head
Some Claude installs also keep exported JSON/JSONL under project-specific cache folders; prefer the newest JSONL with the target repo path in its parent folder.
Development
Scripts are native Node TypeScript. Keep them erasable:
- ok: types, interfaces, unions, `satisfies`
- avoid: enums, namespaces, decorators, parameter properties
- no tsconfig path aliases; use relative imports
Importer ownership:
- `scripts/importers/codex.ts`: Codex rollout JSONL
- `scripts/importers/claude.ts`: Claude Code JSONL
- `scripts/importers/pi-openclaw.ts`: Pi/OpenClaw session JSONL
Validate:
pnpm exec tsgo -p skills/session-viewer/tsconfig.json
node --test skills/session-viewer/scripts/session-viewer.test.ts
scripts/validate-skills
Read more
name: session-viewer description: "Render Codex, Claude Code, OpenClaw, or Pi session JSONL transcripts as a searchable, shareable single-file HTML viewer."
Session Viewer
Use when asked to view, export, inspect, or share a Codex, Claude Code, OpenClaw, or Pi session transcript in a browser.
Commands
When the session path is not known and the `agent-transcript` skill is available, use it first to find the likely JSONL session:
.agents/skills/agent-transcript/scripts/agent-transcript find \ --query "$USER_GOAL_OR_TITLE $BRANCH_OR_URL" \ --cwd "$PWD" \ --since-days 14
Pick the highest-confidence `file` result, then render it with `session-viewer`.
From a repo that has this skill:
node skills/session-viewer/scripts/session-viewer.ts <session.jsonl> --out /tmp/session.html --open
Useful modes:
node skills/session-viewer/scripts/session-viewer.ts <session.jsonl> --out session.html node skills/session-viewer/scripts/session-viewer.ts <session.jsonl> --raw --out session.html node skills/session-viewer/scripts/session-viewer.ts --blank --out viewer.html --open
In a downstream repo that syncs shared skills under `.agents/skills`, replace `skills/session-viewer` with `.agents/skills/session-viewer`.
Defaults:
- detects `codex`, `claude`, or `pi-openclaw`
- embeds normalized session data into one HTML file
- keeps tool input/output text in the DOM so browser search can find it
- `--raw` embeds the original JSONL and lets the browser parse it
- `--blank` creates a reusable file-picker viewer
Where Sessions Live
Codex:
find "${CODEX_HOME:-$HOME/.codex}/sessions" -name 'rollout-*.jsonl' -type f | sort
ls -t "${CODEX_HOME:-$HOME/.codex}"/sessions/*/*/*/rollout-*.jsonl | headOpenClaw/Pi:
AGENT_ID="<agentId>"
SESSION_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/agents/$AGENT_ID/sessions"
ls -t "$SESSION_DIR"/*.jsonl | head
find "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/agents" -path '*/sessions/*.jsonl' -type f | sortUse `sessions.json` in the same directory to map session keys to session ids.
Claude Code:
find "$HOME/.claude/projects" -name '*.jsonl' -type f | sort ls -t "$HOME/.claude/projects"/**/*.jsonl | head
Some Claude installs also keep exported JSON/JSONL under project-specific cache folders; prefer the newest JSONL with the target repo path in its parent folder.
Development
Scripts are native Node TypeScript. Keep them erasable:
- ok: types, interfaces, unions, `satisfies`
- avoid: enums, namespaces, decorators, parameter properties
- no tsconfig path aliases; use relative imports
Importer ownership:
- `scripts/importers/codex.ts`: Codex rollout JSONL
- `scripts/importers/claude.ts`: Claude Code JSONL
- `scripts/importers/pi-openclaw.ts`: Pi/OpenClaw session JSONL
Validate:
pnpm exec tsgo -p skills/session-viewer/tsconfig.json node --test skills/session-viewer/scripts/session-viewer.test.ts scripts/validate-skills
Shared skills for coding agents that work on OpenClaw projects. This repo is the public canonical source for common workflows such as review closeout and remote validation.
Repo: openclaw/agent-skills
Other skills on openclaw-agent-skills.
- /agent-transcript
GitHub PR/issue agent transcripts: redact, preview, and insert safely.
Open skill - /autoreview
Pre-commit/ship code review: Codex default; optional Claude, Pi, or Kimi.
Open skill - /beam
Publish a redacted local coding session to an authenticated read-only Beam catalog.
Open skill - /behavior-validator
Source-blind user behavior validation against a prewritten contract for apps, CLIs, APIs, and generated artifacts.
Open skill - /crabbox
Crabbox/Testbox remote proof for OpenClaw: trusted-source routing, untrusted isolation, Linux/macOS/Windows/WSL2, live E2E, desktop, diagnostics, cleanup.
Open skill - /handoff
Clipboard-ready handoff prompt for another agent to investigate or continue a task.
Open skill

