klimkit-codex-control

klimkit-codex-control is a skill for Claude Code, Codex from klimentij/klimkit. It costs 79 tokens per session (3,074 once invoked), scanned B, original, MIT.

A toolkit for controlling Codex sessions through the command line or desktop app. A session is an ongoing conversation whose messages and history are stored for later use.

In plain words
What is it for?
Use it to spawn or continue sessions, send messages, read conversation history, connect to the Codex app server, or coordinate multiple Codex agents.
Why use it?
It makes it possible to start, resume, connect to, monitor, and coordinate coding-agent sessions from another agent or script. It also helps inspect active sessions and transcripts.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/klimentij/klimkit/klimkit-codex-control
Any agent
npx skills add klimentij/klimkit --skill klimkit-codex-control
Clone the repo
git clone --depth 1 https://github.com/klimentij/klimkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for klimkit-codex-control

README.md
[![agentmods](https://agentmods.dev/badge/skills/klimentij/klimkit/klimkit-codex-control.svg)](https://agentmods.dev/skills/klimentij/klimkit/klimkit-codex-control)
Your own site
<a href="https://agentmods.dev/skills/klimentij/klimkit/klimkit-codex-control"><img src="https://agentmods.dev/badge/skills/klimentij/klimkit/klimkit-codex-control.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,074 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00079 $0.03074
Opus 5 $0.00039 $0.01537
Sonnet 5 $0.00016 $0.00615
Haiku 4.5 $0.00008 $0.00307

Measured 4d ago against content hash c78404a794d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

klimkit-codex-control scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/codex_ws.py, scripts/find_active.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- The new session inherits config defaults (`~/.codex/config.toml`) unless you
skills/klimkit-codex-control/SKILL.md · 260 lines

How it starts

The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Controlling & orchestrating Codex sessions

This skill lets any agent talk to OpenAI Codex (the codex CLI and the Codex desktop app): start sessions, continue existing ones, stream replies, read history, and run fleets of Codex agents. It bundles a working WebSocket client so messages appear live in the desktop, plus reference docs and ground-truth tooling.

Verified against the official Codex docs (developers.openai.com/codex, codex-rs/app-server/README.md) AND against real hands-on use of the codex 0.140 CLI and a live app-server. Commands here are tested, not guessed.

Operational safety

Treat thread ids, rollout excerpts, thread/read output, and find_active.py output as potentially sensitive because they can reveal prompts, replies, cwd paths, and repo names. Redact before pasting into tickets, reports, or chats. Prefer the local unix socket. For TCP WebSocket auth, prefer --token-file; --token is supported for quick local testing but can appear in shell history and process listings.

The one mental model that explains everything

A Codex session (a.k.a. thread) is a conversation. Its message content lives only in a rollout file on disk: ~/.codex/sessions/YYYY/MM/DD/rollout-<timestamp>-<UUID>.jsonl. The <UUID> in that filename IS the session/thread id you pass to every command.

There are two completely different ways to talk to a session, and picking the wrong one is the #1 source of confusion:

A. Headless CLI (codex exec) B. Live app-server (WebSocket)
How spawns a fresh codex process connects to the already-running app-server
Appears live in desktop app? No — desktop stays stale until restart Yes — streams to every connected client
Best for batch jobs, fan-out fleets, CI, cron interactive control, demos, nudging a session a human is watching
Tooling here plain codex commands scripts/codex_ws.py

Why B is needed: the desktop app keeps each conversation in the memory of a long-running app-server process. codex exec writes to the rollout file on disk but never notifies that process, so the desktop doesn't update until it restarts. To make a turn show up live, you must drive the same app-server the desktop is subscribed to. That is exactly what scripts/codex_ws.py does.

Read the full file on GitHub · 260 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 260 lines · 79 tokens per session scan B c78404a794d4

Subscribe to this mod's changes

klimkit-codex-control is a skill published in the GitHub repository klimentij/klimkit (7 stars, last pushed 24d ago), licensed MIT. It adds 79 tokens to every session and 3,074 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

happiness-skill

当用户问「怎么才能更幸福/为什么得到了还不满足/怎么减少焦虑」时调用。 核心理念: 幸福是缺憾感清空的默认状态, 是可训练的技能; 欲望是与自己的契约(得到前不快乐), 同时只留一个重大欲望; 活在当下。 不适用于: 临床抑郁等需要专业治疗的场景(本书方法不能替代医疗)。 Triggers: 幸福/不快乐/欲望/焦虑/知足/活在当下/happiness/desire/anxiety.

kangarooking/cangjie-skill · 136 tokens

agr-cli

Install, share, sync, and create AI agent skills across coding tools (Claude Code, Cursor, Codex, OpenCode, Copilot, Pi) using the agr CLI. Use whenever the user mentions agr, agr.toml, agr.lock, agrx, or asks to: add a skill ("install the pdf skill", "agr add ..."), sync agent resources across tools, share skills…

computerlovetech/agr · 147 tokens

agr-release

Release process for the agr package. Handles version bumping (major/minor/patch/beta), changelog updates, pre-release quality checks, git tagging, and monitoring the GitHub Actions publish pipeline. Use this skill whenever the user wants to cut a release, bump the version, publish to PyPI, or asks about the release…

computerlovetech/agr · 91 tokens

linkedin-post

You take a YouTube video transcript and produce a single LinkedIn post draft.

owainlewis/youtube-tutorials · 0 tokens

kafka-consumer-lag

Analyse Kafka consumer group lag using the Lenses MCP server. Diagnoses lag causes (throughput bottlenecks, rebalancing, partition skew, stalled consumers) and suggests remediation. Use when user says "check consumer lag", "why are consumers slow", "lag report" or asks about consumer group health or offset progress.…

lensesio/agentic-engineering-for-apache-kafka · 84 tokens

mechanical-preprocess

Bash-first mechanical pattern cleanup pipeline — handles em-dash removal, forbidden words, and repetitive structures at scale BEFORE AI agents touch the text. Processes 30+ chapters efficiently.

felipelobomotta-blip/book-genesis-v4 · 41 tokens