Create a traceable handoff under the right Codex Project—without changing the source session.
Codex makes it easy to start a new task, but a new task can land in an unexpected or projectless location. This Skill turns that cleanup into a deliberate handoff: inspect the current topic, recommend a Project, and create a new summarized session there while leaving the original conversation intact.
- Reads the current session context and available Codex Projects.
- Compares the topic with Project names, roots, and recent session evidence.
- Shows only meaningful recommendations (60/100 minimum, up to three choices).
- Uses A/B/C/N selection for a fast decision.
- Treats the selected recommendation as the final confirmation—no second OK.
- Creates a new session under the selected Project using official Codex App tools.
- Carries forward a concise summary of goals, decisions, evidence, risks, and next steps.
- Names the handoff 迁移| for easy tracing.
- Keeps the source session, title, Project, and content unchanged.
These annotated screenshots document a real macOS V2 run, in execution order: diagnose the current placement, create and verify the handoff, then open the new Project-scoped session. Local filesystem paths are redacted in the public copies.
Historical note: this captured V2 run still displayed one extra
OKstep. The current Skill removes that step: a validA/B/Cchoice directly executes the handoff.
01 — Diagnose and choose
02 — Create and verify
03 — Continue from the new session
The Skill intentionally does not rewrite the source session's Project assignment. A new handoff session is easier to audit and recover:
source session ──diagnose──> A/B/C choice ──summary──> new session in target Project
│ │
└────────────── original remains unchanged ─────────┘
This also avoids closing the App or editing private local state files.
- Diagnose — identify the current topic, title, Project, and available targets.
- Recommend — show only candidates with evidence and uncertainty.
- Choose — reply A, B, C, or N.
- Handoff — the selection immediately creates the new Project-scoped session; there is no extra confirmation step.
- Receipt — the original session reports the new title, Project, thread ID, and unchanged-source status.
The Skill uses Codex App capabilities:
- codex_app__list_projects
- codex_app__list_threads
- codex_app__create_thread
- codex_app__set_thread_title
- codex_app__read_thread
It does not edit .codex-global-state.json, SQLite databases, or other private App state. If the official creation capability is unavailable, it stops instead of falling back to an unsupported state mutation.
The installed Skill directory should contain SKILL.md and references/handoff-template.md:
mkdir -p ~/.codex/skills git clone https://github.com/manwithshit/CodexCleanUp.git ~/.codex/skills/CodexCleanUp
If the directory already exists, preserve it or back it up before replacing it.
Trigger the Skill when a session may be in the wrong Project:
整理当前会话
or:
这个会话该放哪个 Project?
Choose the recommended letter. N cancels the handoff.
.
├── SKILL.md
├── references/
│ └── handoff-template.md
├── assets/readme/
│ ├── hero.svg
│ └── screenshots/
│ ├── 01-diagnose-and-choose.jpg
│ ├── 02-handoff-created.jpg
│ └── 03-new-session-receipt.jpg
└── dist/
└── CodexCleanUp.skill
- The Skill is for Codex local Projects; remote targets are used only when the current App tool explicitly supports them.
- ChatGPT cloud Projects are not selected by this Skill.
- It creates one handoff at a time.
- It does not delete, archive, fork, rename, or move the source session.
- Project recommendations are evidence-based, not a guarantee of semantic correctness.
完整中文说明见 README.zh-CN.md。


