Agent skill · software engineering · aradotso
codex-session-patcher
Clean AI refusal responses from Codex CLI, Claude Code, and OpenCode session files, and inject CTF/pentest prompts to reduce refusals.
Why this skill is useful
Adds a Python tool that automates session cleaning and CTF prompt injection, fundamentally enhancing AI interaction with coding tools.
What it needs
Requires npm, python installed locally. Requires openai account access. About 6k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.
What this skill does
Codex Session Patcher Skill by ara.so — Daily 2026 Skills collection. A lightweight Python tool to detect and clean AI refusal responses from Codex CLI, Claude Code, and OpenCode session files, plus CTF/pentest prompt injection to reduce future refusals. --- What It Does 1. Session Cleaning — Scans session files for refusal responses and replaces them with cooperative content so you can resume the session. 2. CTF Prompt Injection — Injects security-testing context into tool configs/profiles to reduce refusal probability at the source. 3. Web UI — Unified dashboard for multi-platform session management, diff preview, and real-time logs. Platform Support Platform Session Format Session Cleaning CTF Injection ---------- --------------- ----------------- --------------- Codex CLI JSONL ✅ ✅ Profile + Global Claude Code JSONL ✅ ✅ Workspace OpenCode SQLite ✅ ✅ Workspace --- Installation --- CLI Usage --- Web UI Usage Open http://localhost:8080 — supports Chinese/English UI toggle. --- Configuration Shared config file: ~/.codex-patcher/config.json Key config fields: Field Description Default ------- ------------- --------- mockresponse Fallback replacement text when AI rewrite is disabled Cooperative reply aienabled Use LLM to generate context-aware replacement responses false aiendpoint OpenAI-compatible API base URL — aikey API key (use env var, not hardcoded) — aimodel Model name (any OpenAI-compatible model) — customkeywords Additional refusal detection phrases {} ctfprompts Per-platform injected system prompts Built-in templates Set API key via environment variable: Then in config: --- CTF/Pentest Workflows Codex CLI Claude Code OpenCode --- Python API — Core Library Usage AI-Assisted Rewriting Custom Refusal Detection Backup and Restore CTF Installer API --- Project Structure --- Common Patterns Batch Clean All Sessions with AI Rewrite Use OpenRouter Instead of OpenAI Use Local Ollama Preview Before Applying (Safe Workflow) --- Troubleshooting Session not found OpenCo …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aradotso/codex-session-patcher