keep-codex-fast
Skill1.6k starsChanged 6 months agoMITView on GitHub
Use when Codex feels slow or bloated, when local sessions/logs/worktrees/config have grown over time, or when a user wants safe maintenance for Codex Desktop/CLI state. Provides a read-only report by default, backs up before applying changes, archives instead of deleting, normalizes Windows extended paths, prunes dead config projects, rotates large logs, and moves stale worktrees.
1 other project uses a version of this.
Trending
More talk lately.thin dataabout the whole repository
Most recently taken up by
- jscraik/Agent-Skillstheir own version, first seen Sep 27, 2026
Who's talking about vibeforge1111/keep-codex-fast
- LowyShin/giip-fde-agent“Codex효율화 스킬”GitHub · May 30, 2026 · 1 reactions
- sudosubin/agents.nix“agent-skills.github.vibeforge1111.keep-codex-fast: init at 0-unstable-2026-05-06”GitHub · Oct 3, 2026
- winoooops/vimeflow“Add tweet to issue: Keep Codex Fast - cleaning local state bloat”GitHub · Sep 30, 2026
- EyrieCommander/codex-skills“Vendor keep-codex-fast skill”GitHub · Jun 4, 2026
- abc468810-sys/OpenClaw-Hao123-Portal“2026-05 GitHub TOP 可用项目收藏清单”GitHub · May 12, 2026
The biggest 5 of 7 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 7
Talked about on GitHub (7 times).
On GitHub · 7
- May 30, 2026Codex효율화 스킬 — LowyShin/giip-fde-agent1 reaction
- Oct 3, 2026agent-skills.github.vibeforge1111.keep-codex-fast: init at 0-unstable-2026-05-06 — sudosubin/agents.nix0 reactions
- Sep 30, 2026Add tweet to issue: Keep Codex Fast - cleaning local state bloat — winoooops/vimeflow0 reactions
- Jun 4, 2026Vendor keep-codex-fast skill — EyrieCommander/codex-skills0 reactions
- May 12, 20262026-05 GitHub TOP 可用项目收藏清单 — abc468810-sys/OpenClaw-Hao123-Portal0 reactions
2 more on GitHub
- May 9, 2026YUA-23: 调研 keep-codex-fast 项目 — lotosbin/agent-harness0 reactions · 1 comment
- May 6, 2026[WIP] Add GitHub Actions-based daily push solution for Feishu — Ttofuuu/github-hot-daily0 reactions
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- jscraik/Agent-Skills★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 18 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill to inspect and safely maintain local Codex state.
- Distinctive: line 20
Write manifests and restore scripts when sessions/worktrees are moved.
- Distinctive: line 21
If Codex is running, default to report-only.
- Very specific: line 22
Never modify or copy credential files unless the user explicitly asks for that.
- Distinctive: line 23
Treat backup folders as private local artifacts because they can contain Codex metadata.
- Very specific: line 24
Do not print raw thread IDs, chat titles, local paths, or process paths unless the user asks for details or runs --details.
- Distinctive: line 25
Before applying changes, tell the user to create handoff docs for active repo chats they may continue.
- Distinctive: line 26
Before archiving any active repo chat the user may want to continue, recommend creating a comprehensive handoff doc plus a reactivation …
- Distinctive: line 27
Do not archive old-but-important active repo chats until the user either confirms a handoff exists or confirms they do not need one.
- Distinctive: line 40
Run the bundled script in report mode:
- Distinctive: line 56
Before applying changes, recommend that the user create handoffs for all active repo chats they may continue.
- Very specific: line 60
If the user wants to apply the recommended maintenance, ask them to close Codex or use --wait-for-codex-exit, then run:
- Distinctive: line 72
Ask whether the user wants a recurring report-only reminder:
- Distinctive: line 75
no reminder if they prefer manual maintenance
- Distinctive: line 94
Keep only the last 7-10 days of non-pinned chats active.
- Distinctive: line 95
Use handoff docs for important old threads.
- Distinctive: line 96
Start fresh threads from handoff docs instead of repeatedly resuming giant chats.
- Distinctive: line 97
Run weekly maintenance if Codex is used daily across many repos/terminals.
- Distinctive: line 99
When in doubt, leave a chat active or ask the user.
- Distinctive: line 100
Treat title/preview repair as metadata repair only.
- Very specific: line 124
Use references/handoff-template.md when the user wants a concrete template.
- Distinctive: line 161
Add a reactivation prompt at the top or bottom:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Keep Codex Fast
Use this skill to inspect and safely maintain local Codex state. The goal is to reduce local drag without surprising the user or losing continuity.
Primary principle: preserve continuity before applying changes. For active repo chats the user may continue, recommend a comprehensive handoff document and reactivation prompt before archiving anything.
Safety Rules
- Inspect before mutating.
- The first run must be report-only. Report mode must not write files, create backups, move folders, or change local Codex state.
- Back up before applying changes. Use
--backup-onlywhen the user wants backups without moving or changing local state. - Archive or move files instead of deleting them. Do not permanently delete user chats, logs, worktrees, memories, skills, plugins, or automations.
- Write manifests and restore scripts when sessions/worktrees are moved.
- If Codex is running, default to report-only. Apply changes only after Codex is closed or when the user explicitly accepts waiting for Codex to exit.
- Never modify or copy credential files unless the user explicitly asks for that. Back up memory/skill/plugin/automation files before touching local state.
- Treat backup folders as private local artifacts because they can contain Codex metadata. Do not ask users to publish or share backups unless they have reviewed them first.
- Do not print raw thread IDs, chat titles, local paths, or process paths unless the user asks for details or runs
--details. - Before applying changes, tell the user to create handoff docs for active repo chats they may continue.
- Before archiving any active repo chat the user may want to continue, recommend creating a comprehensive handoff doc plus a reactivation prompt.
- Do not archive old-but-important active repo chats until the user either confirms a handoff exists or confirms they do not need one.
Mental Model
There are three modes:
- Inspect: report-only, no writes.
- Maintain: normal
--apply; backs up, archives old sessions, moves stale worktrees, rotates logs, prunes dead config, and normalizes paths. It does not trim thread title/preview metadata. - Optional repair:
--apply --repair-thread-metadata-bloat; shortens oversized SQLite display title/preview metadata after backup. The rollout transcript stays intact.
Default Workflow
- Reassure the user: the first run is read-only, privacy-safe, and the skill archives instead of deleting when changes are later applied.
- Run the bundled script in report mode:
python scripts/keep_codex_fast.py- Summarize:
- active session size
- archived session size
- largest active sessions
- thread metadata bloat: active title/preview character totals, max title/preview lengths, and over-limit counts
- stale worktree candidates
- log size
- bad Windows
\\?\path counts - config project prune candidates
- top Node/dev processes
- Before applying changes, recommend that the user create handoffs for all active repo chats they may continue. Explain that handoffs let them archive heavy chats and resume from docs in fresh threads.
- Identify large/old active repo chats that may still matter. For each one the user wants to continue, create or update:
- a repo-local handoff doc
- a reactivation prompt that can start a fresh chat without losing the thread
- If the user wants to apply the recommended maintenance, ask them to close Codex or use
--wait-for-codex-exit, then run:
python scripts/keep_codex_fast.py --apply --archive-older-than-days 10 --worktree-older-than-days 7- Verify after applying:
python scripts/keep_codex_fast.py- Ask whether the user wants a recurring report-only reminder:
- weekly for heavy Codex use across many repos/terminals
- biweekly for lighter use
- no reminder if they prefer manual maintenance
If the user wants automation and the Codex app automation tool is available, create only a recurring report/reminder automation. Do not recommend recurring mutating maintenance, because automation cannot know whether the user created handoffs. The prompt must say not to pass --apply, not to archive/move/prune/rotate/normalize/delete/mutate local state, and to remind the user that manual apply should happen only after handoffs are confirmed and Codex is closed.
What Apply Does
- Backs up important metadata to
~/Documents/Codex/codex-backups/keep-codex-fast-*. - Archives old non-pinned sessions to
~/.codex/archived_sessions/. - Normalizes Windows extended paths like
\\?\C:\...inside local SQLite text fields. - Prunes missing/temp project blocks from
config.tomland writes UTF-8 without BOM. - Moves stale worktrees to
~/.codex/archived_worktrees/. - Rotates
logs_2.sqlite*into~/.codex/archived_logs/only when above the threshold. - Reports heavy Node processes without killing them.
- Reports pathological active thread titles and
first_user_messagepreviews. It only repairs them when the user explicitly opts in with--repair-thread-metadata-bloat.
Report mode does none of those mutations. It only prints counts and pseudonymous candidates. Use --details when raw IDs, titles, or paths are needed for diagnosis.
Recommended Policy
- Keep only the last 7-10 days of non-pinned chats active.
- Use handoff docs for important old threads.
- Start fresh threads from handoff docs instead of repeatedly resuming giant chats.
- Run weekly maintenance if Codex is used daily across many repos/terminals.
- Offer weekly or biweekly report-only reminders after the first successful apply; do not assume the user wants recurring maintenance.
- When in doubt, leave a chat active or ask the user. Never archive a chat that is pinned, current, or explicitly marked as still needed without a handoff.
- Treat title/preview repair as metadata repair only. The full rollout transcript remains in the session JSONL; bounded SQLite fields are for list/navigation display.
Thread Metadata Bloat
Codex Desktop can become slow when threads.title or threads.first_user_message stores a full prompt/history-sized value instead of a display title or preview. This affects the thread list/navigation path before the UI renders anything.
The script reports active thread count, total title/preview characters, maximum title/preview length, active titles over the configured title limit, and active previews over the configured preview limit and over 10k characters.
Normal apply mode reports metadata-bloat candidates but does not repair them. If the user explicitly opts in, after backups and only when Codex is not running, run:
python scripts/keep_codex_fast.py --apply --repair-thread-metadata-bloatThat bounds active threads.title and threads.first_user_message values. Defaults are 120 characters for titles and 240 characters for previews. It also appends repaired titles to session_index.jsonl, matching current upstream name-update storage, so reconciliation/name lookup does not immediately prefer the old full-message fallback.
The targeted repair manifest stores the old full title/preview values so the change can be reversed. Treat thread-metadata-repairs.jsonl, restore-thread-metadata.py, and the whole backup folder as private local artifacts.
This is a local maintenance workaround for metadata bloat. It does not solve app renderer hydration of very large rollout histories; that needs upstream staged/paged thread loading.
Handoff Doc + Reactivation Prompt
For important active repo chats, create a handoff before archiving. Prefer a repo-local path such as docs/codex-handoffs/YYYY-MM-DD-topic.md or a user-approved docs location.
Use references/handoff-template.md when the user wants a concrete template.
A handoff document converts an old chat into durable project memory. It should let a fresh Codex thread continue after reading the repo and the handoff, without needing the original chat history.
Offer this prompt for each active repo chat the user may want to continue:
Create a comprehensive handoff document for this repo/session before I archive Codex history.
Include:
- repo/path and branch
- current goal
- what we already completed
- files touched or investigated
- commands/tests already run
- known errors, warnings, or failing checks
- open decisions
- constraints, user preferences, and do-not-touch areas
- the next 3-7 concrete steps
Also include a reactivation prompt I can paste into a fresh Codex chat so it can continue from this handoff without relying on the old chat context.
Save the handoff in a sensible repo-local place like docs/codex-handoffs/YYYY-MM-DD-topic.md unless this repo already has a better handoff location.The handoff should capture:
- repo/path and branch
- current goal
- what was already done
- key files touched or investigated
- commands/tests already run
- known failures or warnings
- open decisions
- next 3-7 concrete steps
- any constraints, user preferences, or "do not touch" areas
Add a reactivation prompt at the top or bottom:
We are continuing from this handoff. Read this document first, inspect the current repo state, verify what still applies, and continue from the next steps without assuming the old chat context is available.Automation Reminder Prompt
Offer this after the first report/apply/verify cycle:
Use $keep-codex-fast to create a recurring Codex maintenance reminder.
Schedule it weekly if I use Codex heavily, or biweekly if that seems safer.
The reminder should:
- run the keep-codex-fast report first
- never pass --apply or run mutating maintenance automatically
- never archive, move, prune, rotate, normalize, delete, or mutate local Codex state
- remind me to create comprehensive handoff docs and reactivation prompts for active repo chats before any manual apply
- summarize active session size, archived session size, extended path candidates, old session candidates, worktree candidates, log size, and top Node/dev processes
- report heavy Node/dev processes without killing them
- tell me that manual apply should only happen after I confirm handoffs exist or are not needed and Codex is closedAnti-Patterns
Avoid these behaviors:
- deleting sessions, logs, worktrees, memories, plugins, or skills permanently
- applying changes while Codex is actively writing the DB
- archiving important repo chats before creating handoff docs
- treating active history size as "bad" without checking whether the user needs continuity
- treating preview metadata repair as deletion of the actual rollout transcript
- killing Node/dev processes automatically
- rewriting
config.tomlwithout a backup and parse check - writing UTF-8 TOML with a BOM on Windows
- promising speed gains as universal fact; frame improvements as local-state maintenance results
- making users feel like they did something wrong by using Codex heavily
User-Facing Caution
Tell users this does not permanently delete chats, worktrees, or logs. It moves them into archive folders and writes restore helpers. The only removed content is stale metadata, such as project entries pointing to folders that no longer exist, and even that happens after backing up config.toml.
Also tell users that thread title/preview bloat repair is not part of normal apply. Normal use only reports title/preview bloat. Recommend --repair-thread-metadata-bloat only as an optional extra when the report shows large metadata payloads and the user understands that SQLite display metadata will be shortened while the real transcript remains in rollout JSONL.
Also tell users backup folders can contain private local Codex metadata, including old thread titles and first-message previews. They should keep backups local and avoid publishing or sharing them unless they have reviewed what is inside.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

