skills/keep-codex-fast-maintenance/SKILL.md
Backup-first skill for inspecting, archiving, and maintaining local Codex state to keep it fast, clean, and recoverable.
npx skillsauth add aradotso/trending-skills keep-codex-fast-maintenanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Skill by ara.so — Daily 2026 Skills collection.
A backup-first maintenance skill for local Codex state. When Codex starts feeling heavy after weeks of chats, terminals, logs, worktrees, and project history, this skill gives you a safe, inspectable workflow to reduce drag without losing context.
Core rule: Make handoffs first. Archive, don't delete. Apply changes only when you are ready.
Ask Codex directly:
Install the keep-codex-fast skill from https://github.com/vibeforge1111/keep-codex-fast
Or clone manually into your Codex skills directory:
git clone https://github.com/vibeforge1111/keep-codex-fast keep-codex-fast
| Layer | Purpose | |---|---| | Chats | Execution context | | Handoff docs | Memory and continuity | | Archives | History, not deletion | | Fresh threads | Speed |
Never delete. Always archive. The script moves state into archive folders and writes backup/restore artifacts before applying any change.
All commands run from the project root. The script is read-only by default.
python scripts/keep_codex_fast.py
Reports: active session size, archived session size, extended path candidates, old session candidates, worktree candidates, log size, top Node/dev processes. Nothing is mutated.
python scripts/keep_codex_fast.py --details
Shows thread IDs, chat titles, file paths, and process paths. Use when you need to identify specific sessions or worktrees before archiving.
python scripts/keep_codex_fast.py --backup-only
Creates backup artifacts of current Codex state without moving or modifying anything. Run this before any apply step as an extra safety net.
⚠️ Backup folders contain private local Codex metadata. Keep them on your machine. Do not publish or share without reviewing contents.
python scripts/keep_codex_fast.py --apply --archive-older-than-days 10 --worktree-older-than-days 7
Archives old non-pinned sessions, moves stale worktrees, rotates large logs_2.sqlite* files, prunes dead/temp project references in config.toml, and normalizes Windows \\?\C:\... path mismatches in SQLite text fields.
python scripts/keep_codex_fast.py --apply --wait-for-codex-exit
Holds until no Codex process is detected, then applies maintenance. Use this when you want to queue a cleanup but need Codex to close first.
Use $keep-codex-fast to inspect my Codex local state and recommend a safe maintenance plan.
Review the report. Note which sessions are large, which worktrees are stale, and which logs are heavy.
For every active repo chat you may want to continue later, run this inside that chat:
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.
A handoff captures: what you were doing, what changed, what files matter, what commands ran, what is still broken or undecided, and what to do next.
After handoffs exist for all chats you care about:
Use $keep-codex-fast to apply safe Codex maintenance.
Before changing anything, confirm that important active repo chats have handoff docs or do not need them.
Then back up first, archive instead of deleting, move stale worktrees, rotate large logs, prune dead config references, and verify the result.
If Codex is currently running, do not mutate local state. Tell me to close Codex first.
| Target | Action |
|---|---|
| Old non-pinned active sessions | Archived, not deleted |
| Stale worktrees | Moved out of hot path |
| Large logs_2.sqlite* files | Rotated |
| Dead/temp project entries in config.toml | Pruned |
| Windows \\?\C:\... path mismatches in SQLite | Normalized |
Set up a weekly or biweekly reminder that reports only — never auto-applies:
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
import subprocess
import json
result = subprocess.run(
["python", "scripts/keep_codex_fast.py", "--details"],
capture_output=True,
text=True
)
print(result.stdout)
import subprocess
import sys
def backup_codex_state():
"""Run before any operation that might affect Codex local state."""
result = subprocess.run(
["python", "scripts/keep_codex_fast.py", "--backup-only"],
capture_output=True,
text=True
)
if result.returncode != 0:
print(f"[warn] Codex backup step reported issues:\n{result.stderr}")
else:
print("[ok] Codex state backed up.")
return result.returncode
if __name__ == "__main__":
sys.exit(backup_codex_state())
import subprocess
import os
archive_days = os.environ.get("CODEX_ARCHIVE_DAYS", "14")
worktree_days = os.environ.get("CODEX_WORKTREE_DAYS", "7")
subprocess.run([
"python", "scripts/keep_codex_fast.py",
"--apply",
"--archive-older-than-days", archive_days,
"--worktree-older-than-days", worktree_days,
"--wait-for-codex-exit",
], check=True)
#!/usr/bin/env python3
"""
maintenance.py — thin wrapper around keep_codex_fast.py for project-local use.
"""
import argparse
import subprocess
import sys
SCRIPT = "scripts/keep_codex_fast.py"
def main():
parser = argparse.ArgumentParser(description="Codex maintenance wrapper")
parser.add_argument("--inspect", action="store_true", help="Report only, no writes")
parser.add_argument("--backup", action="store_true", help="Backup only, no moves")
parser.add_argument("--apply", action="store_true", help="Apply full maintenance")
parser.add_argument("--archive-days", type=int, default=10)
parser.add_argument("--worktree-days", type=int, default=7)
parser.add_argument("--details", action="store_true")
args = parser.parse_args()
cmd = ["python", SCRIPT]
if args.details:
cmd.append("--details")
if args.backup:
cmd.append("--backup-only")
elif args.apply:
cmd += [
"--apply",
"--archive-older-than-days", str(args.archive_days),
"--worktree-older-than-days", str(args.worktree_days),
"--wait-for-codex-exit",
]
# default: inspect only (no extra flags needed)
result = subprocess.run(cmd, text=True)
sys.exit(result.returncode)
if __name__ == "__main__":
main()
Run with --details to see raw thread IDs and process paths:
python scripts/keep_codex_fast.py --details
Check for heavy Node/dev processes listed in the report. The script reports them but does not kill them — review manually.
The apply step archives, not deletes. Check your Codex archive folder — archived sessions accumulate there over time. Periodically review the archive folder and remove old entries you no longer need.
\\?\C:\...) appearing in reportsThis is a known SQLite text field issue on Windows. The --apply step normalizes these automatically. Run:
python scripts/keep_codex_fast.py --apply --archive-older-than-days 10 --worktree-older-than-days 7
Backup folders snapshot Codex local metadata. If you run --backup-only repeatedly, old backups accumulate. Prune old backup snapshots manually — check timestamps in the backup folder and remove those older than your retention window.
--wait-for-codex-exit hangs indefinitelyCodex may still be running in the background. Check for Codex processes:
# macOS/Linux
ps aux | grep -i codex
# Windows PowerShell
Get-Process | Where-Object { $_.Name -like "*codex*" }
Close Codex fully, then re-run the apply step.
The script should not archive pinned sessions. If you see pinned sessions in the candidate list, run inspect-only first (--details) and confirm before applying. Do not pass --apply until you have verified the candidate list.
--apply or --backup-only.--wait-for-codex-exit or close Codex manually before applying to avoid mutating state while Codex holds file locks.--apply.development
```markdown --- name: compose-performance-skills description: Install and use the skydoves/compose-performance-skills agent skill library to diagnose and fix Jetpack Compose performance issues including stability, recomposition, lazy layouts, modifiers, side effects, and build configuration. triggers: - "my composable recomposes too often" - "LazyColumn drops frames during scroll" - "diagnose Compose stability issues" - "fix unnecessary recomposition in Jetpack Compose" - "optimize Com
development
Headless iOS Simulator manager with host-side HID input injection, 60fps streaming, and device farm web UI for iOS 26
development
```markdown --- name: claude-code-game-studios description: Turn Claude Code into a full 49-agent game dev studio with 72 workflow skills, automated hooks, and a real studio hierarchy for Godot, Unity, and Unreal projects. triggers: - "set up claude code game studios" - "use ai agents for game development" - "set up game dev studio with claude" - "add game studio agents to my project" - "how do I use claude code for game dev" - "set up godot unity unreal ai workflow" - "49 agents g
development
```markdown --- name: xq-py-quantum-vm description: Python implementation of the Quip Network's quantum virtual machine (xqvm) triggers: - quantum virtual machine python - xqvm quip network - quantum circuit simulation python - xq-py quantum vm - quip network quantum python - simulate quantum gates python - quantum vm xqvm - xqvm-py quantum circuit --- # xq-py Quantum Virtual Machine > Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection. `xqvm-py` is a Python impl