Agent skill

Keep Codex Fast

by vibeforge1111 in vibeforge1111/keep-codex-fast

A skill your agent uses 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.

MITAuto-check passedDevelopment

Install Keep Codex Fast

skills CLI
$ npx skills add vibeforge1111/keep-codex-fast --skill keep-codex-fast -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vibeforge1111/keep-codex-fast keep-codex-fast --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
keep-codex-fast
GitHub stars
1.6k
Token cost
~3.1k tokens
SKILL.md length
1,381 words
Files
11 (incl. scripts, references, assets)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses 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.

  • Works in 8 steps: Reassure the user: the first run is… → Run the bundled script in report mode → Summarize → …
  • Codex feels slow
  • SKILL.md covers Safety Rules, Mental Model, Default Workflow and What Apply Does, plus 6 more sections
  • Runs Python scripts from its folder; calls python

What it does

Keep Codex Fast is an agent skill from vibeforge1111/keep-codex-fast. 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.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 17 other files, including scripts, reference files and assets (for example `.github/workflows/ci.yml`, `README.md` and `agents/openai.yaml`).

It sits in Development, covering Git worktrees. The repository describes itself as: A backup-first Codex skill for keeping local Codex state fast, clean, and recoverable. The licence is MIT.

When your agent uses it

  • Codex feels slow
  • Local sessions/logs/worktrees/config have grown over time
  • A user wants safe maintenance for Codex Desktop/CLI state

Example prompts

  • “/keep-codex-fast”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Reassure the user: the first run is read-only, privacy-safe, and the skill archives instead of deleting when changes are later applied.
  2. Run the bundled script in report mode
  3. Summarize
  4. Before applying changes, recommend that the user create handoffs for all active repo chats they may continue. Explain that handoffs let…
  5. Identify large/old active repo chats that may still matter. For each one the user wants to continue, create or update
  6. If the user wants to apply the recommended maintenance, ask them to close Codex or use --wait-for-codex-exit, then run
  7. Verify after applying
  8. Ask whether the user wants a recurring report-only reminder

What it can do on your machine

Read from SKILL.md and the folder at commit e74c449. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Keep Codex Fast loads about 3.1k tokens when it runs, and up to ~3.5k if it reads all its reference files. Until then it costs about 100 tokens; SKILL.md has 1,381 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from vibeforge1111/keep-codex-fast at commit e74c449, republished under its MIT licence (© vibeforge1111). 1,381 words, ~3,095 tokens.

Download SKILL.mdSave it as .claude/skills/keep-codex-fast/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
keep-codex-fast
description
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.
metadata.short-description
Safe Codex local-state maintenance

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-only when 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

  1. Reassure the user: the first run is read-only, privacy-safe, and the skill archives instead of deleting when changes are later applied.
  2. Run the bundled script in report mode:
bash
python scripts/keep_codex_fast.py
  1. 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
  2. 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.
  3. 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
  4. If the user wants to apply the recommended maintenance, ask them to close Codex or use --wait-for-codex-exit, then run:
bash
python scripts/keep_codex_fast.py --apply --archive-older-than-days 10 --worktree-older-than-days 7
  1. Verify after applying:
bash
python scripts/keep_codex_fast.py
  1. 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.toml and 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_message previews. 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.

  • 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.
Show full SKILL.md (565 more words)Show less

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:

bash
python scripts/keep_codex_fast.py --apply --repair-thread-metadata-bloat

That 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:

text
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:

text
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:

text
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 closed

Anti-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.toml without 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.

© vibeforge1111, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (scripts, references, assets) in the repository root of vibeforge1111/keep-codex-fast.

  • SKILL.md
  • .github/workflows/ci.yml
  • .gitignore
  • LICENSE
  • README.md
  • agents/openai.yaml
  • assets/keep-codex-fast-cover.png
  • assets/keep-codex-fast-flow.svg
  • references/handoff-template.md
  • scripts/keep_codex_fast.py
  • tests/smoke_test.py

Open the folder on GitHubat commit e74c449

Compare with similar skills

Keep Codex Fast next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Keep Codex Fast compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Keep Codex Fast this skillvibeforge1111/keep-codex-fast1.6k—~3.1kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
Finishing A Development Branchfarm-fe/farm5.6k33 repos~1.8kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 33 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Starts a Dozzle dev server on a port derived from the current worktree so you can test by hand in a browser, without disturbing instances started elsewhere.

    15k GitHub stars~747 tokensUpdated today
    DevelopmentAuto-check passed

Categories

Questions about Keep Codex Fast

What does Keep Codex Fast do?

A skill your agent uses 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. Keep Codex Fast is an agent skill from vibeforge1111/keep-codex-fast. 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.

When should I use Keep Codex Fast?

Keep Codex Fast fits situations like: Codex feels slow; local sessions/logs/worktrees/config have grown over time; A user wants safe maintenance for Codex Desktop/CLI state.

How do I install Keep Codex Fast in Claude Code?

Run `npx skills add vibeforge1111/keep-codex-fast --skill keep-codex-fast -a claude-code`. Or copy the skill folder (the vibeforge1111/keep-codex-fast repository) into .claude/skills/keep-codex-fast in your project. Claude Code loads it when a task matches its description.

How do I install Keep Codex Fast in Codex?

Run `npx skills add vibeforge1111/keep-codex-fast --skill keep-codex-fast -a codex`. Or copy the skill folder (the vibeforge1111/keep-codex-fast repository) into .agents/skills/keep-codex-fast in your project. Codex loads it when a task matches its description.

Can I use Keep Codex Fast in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vibeforge1111/keep-codex-fast --skill keep-codex-fast -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/keep-codex-fast, .gemini/skills/keep-codex-fast, .github/skills/keep-codex-fast and .opencode/skills/keep-codex-fast in your project.

What does Keep Codex Fast need to run?

Going by SKILL.md and its folder, Keep Codex Fast needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Keep Codex Fast access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Keep Codex Fast safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Keep Codex Fast use?

Keep Codex Fast is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Keep Codex Fast use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 376 tokens, read only when the agent opens those files.

What are the alternatives to Keep Codex Fast?

Skills that share tags, products or a category with Keep Codex Fast: Finishing a Development Branch (obra/superpowers, 296k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars) and Git Worktree Cleanup (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Keep Codex Fast?

vibeforge1111 (a GitHub user) maintains it in vibeforge1111/keep-codex-fast, which has 1,581 GitHub stars. The repository was last updated on May 6, 2026.

Source: vibeforge1111/keep-codex-fast on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.