codex-session-cleanup

codex-session-cleanup is a skill for Codex from BjornMelin/dev-skills. It costs 45 tokens per session (1,217 once invoked), scanned A, original, no licence file.

A guide for finding and managing Codex session, history, state, and memory files.

In plain words
What is it for?
Use it to scan, sort, quarantine, restore, or permanently remove Codex artifacts in a repository, selected directories, Codex storage, or all sessions.
Why use it?
It helps identify unwanted session data and handle it safely without deleting the wrong files.

Skill for Codex

Written for Codex: agents/openai.yaml present.

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/bjornmelin/dev-skills/codex-session-cleanup
Any agent
npx skills add BjornMelin/dev-skills --skill codex-session-cleanup
Clone the repo
git clone --depth 1 https://github.com/BjornMelin/dev-skills

Made for: 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 codex-session-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/bjornmelin/dev-skills/codex-session-cleanup.svg)](https://agentmods.dev/skills/bjornmelin/dev-skills/codex-session-cleanup)
Your own site
<a href="https://agentmods.dev/skills/bjornmelin/dev-skills/codex-session-cleanup"><img src="https://agentmods.dev/badge/skills/bjornmelin/dev-skills/codex-session-cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,217 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.1 $0.00045 $0.01217
Opus 5 $0.00023 $0.00609
Sonnet 5 $0.00009 $0.00243
Haiku 4.5 $0.00005 $0.00122

Measured 6d ago against content hash 288ff10da9b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

codex-session-cleanup scanned grade A with 0 findings 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 6d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/codex_session_cleanup.py, tests/test_codex_session_cleanup.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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

archive/skills/codex-session-cleanup/SKILL.md · 129 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Files

What ships with it

8 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. 6d ago First seen · 129 lines · 45 tokens per session scan A 288ff10da9b9

Subscribe to this mod's changes

codex-session-cleanup is a skill published in the GitHub repository BjornMelin/dev-skills (7 stars, last pushed today), with no licence file. It adds 45 tokens to every session and 1,217 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. 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

ai-persistence/server

Server chat state with withPersistence from @tanstack/ai-persistence. Authoritative transcript, run lifecycle, durable interrupts/approvals, chatParamsFromRequest, reconstructChat, snapshotStreaming. Use when the server owns history, multi-device, or durable tool approvals. NOT client localStorage (see…

TanStack/ai · 83 tokens

tanstack-ai-memory-honcho

Use when wiring honcho() from @tanstack/ai-memory/honcho — a hosted memory adapter where recall is a dialectic answer over the user's representation (no discrete fragments). Requires the optional @honcho-ai/sdk peer.

TanStack/ai · 55 tokens

tanstack-ai-memory-in-memory

Use when wiring inMemory() from @tanstack/ai-memory/in-memory — explains setup, options (embedder, extract, topK/minScore), when to pick it (dev/tests/single-process demos), and what NOT to use it for (multi-process or persistent).

TanStack/ai · 63 tokens

cocohealth

Context utilization monitor — background monitor that samples context window utilization via PostToolUse hook, surfaces advisory at 60% and critical warning with recovery decision matrix at 70%.

Snowflake-Labs/cocoplus · 38 tokens

weknora-shared

Use when driving a WeKnora RAG server through the weknora CLI as an agent — authenticating, managing knowledge bases / documents / sessions / agents, running search or chat, or interpreting the CLI's JSON envelopes and exit codes. Read this before any other weknora- skill.

Tencent/WeKnora · 68 tokens

02-project-memory

Build the project's memory of its architecture, conventions, and decisions, and wire it into your AI tools. Use when the user wants to set up or refresh project memory, or rewire it into a tool. Not for editing one existing memory file.

ai-driven-dev/framework · 54 tokens