mcpbeat Sign in

Session Viewer Agent Skill

Render Codex, Claude Code, OpenClaw, or Pi session JSONL transcripts as a searchable, shareable single-file HTML viewer.

28k tokens
context cost
the whole folder, loaded on every use
12
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
1033
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/openclaw/agent-skills --skill session-viewer

The instruction itself

4 sections, as written by the author

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 | head

OpenClaw/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 | sort

Use 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

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ×10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Skill Creator
by vercel-labs
vendor ×10

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

12k tokens scripts
Skill Creator
by JayZeeDesign
×9

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.

10k tokens scripts
Template Skill
by JayZeeDesign
×7

Replace with description of the skill and when Claude should use it.

35 tokens
Dispatching Parallel Agents
by ZhanlinCui
×5

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

2k tokens
Skill Development
by anthropics
vendor ×4

This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.

9k tokens
Find Skills
by sanity-io
vendor ×4

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

1k tokens
Writing Skills
by ZhanlinCui
×4

Use when creating new skills, editing existing skills, or verifying skills work before deployment

26k tokens scripts

How to use it

Copy the folder

Take openclaw/session-viewer from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.