home / skills / openclaw / skills / prompt-log

prompt-log skill

This skill extracts and exports markdown transcripts from AI coding session logs, enabling easy review of prompt history and discussions.

npx playbooks add skill openclaw/skills --skill prompt-log

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.1 KB
---
name: prompt-log
description: Extract conversation transcripts from AI coding session logs (Clawdbot, Claude Code, Codex). Use when asked to export prompt history, session logs, or transcripts from .jsonl session files.
---

# Prompt Log

## Quick start

Run the bundled script on a session file:

```bash
scripts/extract.sh <session-file>
```

## Inputs

- **Session file**: A `.jsonl` session log from Clawdbot, Claude Code, or Codex.
- **Optional filters**: `--after` and `--before` ISO timestamps.
- **Optional output**: `--output` path for the markdown transcript.

## Outputs

- Writes a markdown transcript. Defaults to `.prompt-log/YYYY-MM-DD-HHMMSS.md` in the current project.

## Examples

```bash
scripts/extract.sh ~/.codex/sessions/2026/01/12/abcdef.jsonl
scripts/extract.sh ~/.claude/projects/my-proj/xyz.jsonl --after "2026-01-12T10:00:00" --before "2026-01-12T12:00:00"
scripts/extract.sh ~/.clawdbot/agents/main/sessions/123.jsonl --output my-transcript.md
```

## Dependencies

- Requires `jq` in PATH.
- Uses `gdate` if available on macOS; otherwise falls back to `date`.

Overview

This skill extracts conversation transcripts from AI coding session logs (Clawdbot, Claude Code, Codex). It converts .jsonl session files into clean, human-readable markdown transcripts with optional time filtering and custom output paths. The tool is lightweight, script-driven, and designed for archiving or exporting prompt history quickly.

How this skill works

The included extraction script parses .jsonl session logs and walks message records to produce a chronological markdown transcript. It supports optional ISO timestamp filters (--after and --before) to restrict the range and an --output flag to set the destination file. The script uses jq for JSON processing and prefers gdate on macOS when available, falling back to date otherwise.

When to use it

  • You need a readable transcript of a coding session for review or audit.
  • Exporting prompt history for archival backup or migration.
  • Filtering a long session down to a specific time window.
  • Preparing conversation excerpts for documentation or bug reports.
  • Converting multiple agent logs into a standard markdown format.

Best practices

  • Install jq and ensure gdate or date is available before running the script.
  • Run the script inside your project root to use the default .prompt-log output directory.
  • Use --after and --before ISO timestamps to extract only relevant sections.
  • Specify --output when you want a predictable filename or to avoid overwriting.
  • Verify timestamps in your session file timezone to get correct slice boundaries.

Example use cases

  • Extracting a single Codex session to markdown for sharing with teammates.
  • Archiving daily Clawdbot conversations into a .prompt-log folder for compliance.
  • Filtering a long Claude Code debugging session to the exact two-hour window when a regression appeared.
  • Converting agent transcripts before importing them into a knowledge base or documentation site.
  • Generating readable transcripts for retrospective analysis after an AI-assisted code review.

FAQ

What file types are supported?

The skill accepts .jsonl session logs produced by Clawdbot, Claude Code, and Codex.

Do I need extra tools?

Yes. jq must be in your PATH. On macOS the script will use gdate if installed, otherwise it uses date.

How do I limit extraction to a specific time range?

Use the --after and --before flags with ISO 8601 timestamps to slice the session by time.