A GitHub-ready Codex Skill for exporting local Codex Desktop conversations into clean Markdown or JSON.
- Lists local Codex conversations from
~/.codex/state_5.sqlite - Exports transcript content from
~/.codex/sessions/**/rollout-*.jsonl - Supports Markdown and JSON output
- Optionally includes tool calls and tool outputs
- Filters noisy internal records by default
- Creates a
manifest.jsonduring batch export - Ships both as a Codex Skill and an installable Python CLI
- Works well for backups, audits, publishing, or migrating useful threads
Clone or copy this folder into your Codex skills directory:
./scripts/install_skill.shThen invoke it in Codex with $codex-chat-export.
. .venv/bin/activate 2>/dev/null || true
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install .
codex-chat-export listOr with pipx:
pipx install .codex-chat-export list
codex-chat-export list --contains 导出 --limit 10
codex-chat-export export --latest --format markdown
codex-chat-export export --contains 复盘 --format json --output exports/
codex-chat-export export --updated-after 2026-03-01T00:00:00+00:00 --output exports/
codex-chat-export export --id <thread-id> --include-tools --output thread.md- Single export writes one
.mdor.jsonfile - Batch export writes one file per thread plus
manifest.json - Default export strips leading
<environment_context>blocks from user messages
See examples/sample-thread.md for the Markdown shape.
python3 -m unittest discover -s tests -vPush a tag like v0.1.0 and GitHub Actions will attach codex-chat-export-skill.zip to the release.