codex-export for Openclaw

A specialized utility for converting Codex CLI and Desktop app session logs into clean, readable Markdown transcripts.

jinghan23
v0.1.0
Mar 18, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install codex-export

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install codex-export using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is codex-export?

The codex-export skill is an essential tool for developers who need to document, archive, or share their interactions with Codex AI agents. It bridges the gap between raw session data and human-readable documentation by parsing local JSONL logs and transforming them into structured Markdown. This skill is part of the broader ecosystem of Openclaw Skills designed to enhance the productivity of AI-driven development workflows.

Whether you are using the Codex Desktop app via VS Code or the standalone CLI, this utility ensures that your conversation history is never locked away in proprietary formats. It automatically handles the heavy lifting of filtering out system noise and formatting environment context, providing a polished transcript ready for review or inclusion in project repositories.

codex-export Use Cases

  • Archiving technical discussions and AI-generated code snippets for long-term project documentation.
  • Sharing step-by-step troubleshooting sessions with teammates or in GitHub issues.
  • Creating clean summaries of AI interactions by stripping away verbose tool outputs using brief mode.
  • Reviewing historical sessions offline without needing to launch the primary Codex interface.

How codex-export Works

  1. The skill accesses the local storage directory at ~/.codex/sessions where interaction logs are stored as JSONL files.
  2. It queries the local SQLite state database to map session IDs to human-readable timestamps and sources.
  3. The user selects a specific session ID or browses recent history using the list command.
  4. The script parses the session file, automatically filtering out system/developer messages and internal environment context blocks.
  5. Depending on the flags provided, the tool formats the dialogue into a Markdown file, optionally excluding tool execution data for a more concise transcript.

codex-export Setup

To integrate this utility into your Openclaw Skills workflow, ensure you have Python 3.x available on your system. Navigate to the script directory and use the following commands:

# List all recent sessions to find the ID you want to export
python3 scripts/export.py --list

# Export a specific session to a Markdown file
python3 scripts/export.py <session-id> output.md

# Export a clean version containing only user and assistant messages
python3 scripts/export.py <session-id> output.md --brief

codex-export Data Schema & Taxonomy

The codex-export tool interacts with several local data structures to produce its output:

Component Path / Detail
Session Logs ~/.codex/sessions/**/*.jsonl
Session Metadata ~/.codex/state_5.sqlite
Supported Sources vscode (Desktop), cli/exec (CLI)
Output Format Standard Markdown (.md)
Data Filtering Removes system messages and blocks

codex-export Advanced Features

  • Multi-source support: Seamlessly handles sessions originating from both the Codex Desktop app and the CLI tool.
  • Brief Mode: A powerful filtering option that removes tool calls and responses, leaving only the primary conversation for easier reading.
  • Session Discovery: Built-in listing functionality that allows users to find and select sessions by ID without manually digging through filesystem directories.
  • Automated Context Stripping: Smart detection and removal of internal AI environment blocks to ensure exported transcripts remain focused on the core discussion.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*