A deterministic command-line utility designed to clean oversized Codex session logs by replacing heavy base64 image payloads with small placeholders while retaining full conversation history.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install codex-session-image-scrubber
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install codex-session-image-scrubber using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
The Codex Session Image Scrubber is a technical utility designed to restore performance to bloated AI coding sessions. When developers interact with local AI agents, paste screenshots, or work with heavy visual assets, the local session logs (stored as JSONL files) can quickly balloon in size. This leads to lagging interfaces, slow parsing times, and increased load on the coding agent. By using this utility, developers can safely purge these oversized base64 strings and image payloads.
Integrating tools like this from Openclaw Skills ensures that local developer environments remain lightweight, responsive, and easy to parse, without sacrificing the conversational context, tool call history, or text markers that local AI agents rely on to maintain state.
rg) to locate matching phrases inside ~/.codex/sessions or the session index file.~/.codex/session_backups).To leverage this optimization process within Openclaw Skills, invoke the Node.js script directly from your terminal.
Run the scrubber in dry-run mode using a specific Thread ID to preview size reductions:
node ~/.codex/skills/codex-session-image-scrubber/scripts/scrub-codex-session-images.mjs --thread-id <thread-id>
Apply the scrub process and update the active session logs using the --write flag:
node ~/.codex/skills/codex-session-image-scrubber/scripts/scrub-codex-session-images.mjs --thread-id <thread-id> --write
You can also target files directly outside the default sessions index:
node ~/.codex/skills/codex-session-image-scrubber/scripts/scrub-codex-session-images.mjs --file /path/to/rollout.jsonl --write
The script operates based on the following configurations and paths:
| Option | Description | Default Path / Value |
|---|---|---|
--thread-id <id> |
The specific Codex thread to locate and scrub | N/A |
--file <path> |
Direct file path to a target JSONL session | N/A |
--write |
Executes the overwrite process | Dry-run only (Default) |
--backup-dir <path> |
Backup path for target files prior to cleanup | ~/.codex/session_backups |
--sessions-dir <path> |
Location of target active session directories | ~/.codex/sessions |
--min-bytes <n> |
Minimum size threshold for targeted image blocks | 100000 (100 KB) |
To ensure target payloads have been purged successfully, run:
rg -n "data:image|iVBORw0KGgo|/9j/4AAQ|UklGR" <sanitized-file-path>
An exit code of 1 indicates no matching binary payloads remain, confirming the file is fully optimized.
--min-bytes dynamically to focus on exceptionally large screenshots while preserving smaller inline assets.<image> and </image> intact, preserving structural readability for AI models.Loading
An AI-powered sales coaching agent that brings Brian Tracy's iconic sales methodology directly to your development and communication workflows.

An automated discovery and acquisition utility for finding datasets, public data lakes, and open-data portals across multiple global repositories.

An automated diagnostic and repair tool designed to maintain high availability for the OpenClaw gateway using systemd auto-restarts.

A browser automation skill that enables AI agents to send, receive, and monitor SMS/RCS messages directly through Google Messages for Web.

A comprehensive design system skill for AI coding agents to generate pixel-perfect, Timeplus Console-aligned web interfaces using standard design tokens, CSS, Tailwind, and React.

An interactive knowledge skill based on Daniel Yergin's epic history of oil, detailing how petroleum shaped wars, global economies, and modern geopolitics.








































