crew-cleanup

Delete stale Codex crew files and trim history files in .codex/crew.

8|1|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/JoeCP17/LLM-Dot-files --skill crew-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crew-cleanup
Source: https://github.com/JoeCP17/LLM-Dot-files/tree/main/codex/skills/crew-cleanup
Command: npx skills add https://github.com/JoeCP17/LLM-Dot-files --skill crew-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cleans up old Codex crew state files that accumulate in the local .codex/crew/ directory and can clutter runs, cycles, and seed artifacts.

Core Features & Use Cases

  • Dry-run cleanup planning: Shows exactly which files and directories would be deleted before making changes.
  • Safe optional deletion: Requires --apply to actually delete targets after the user sees the dry-run output or explicitly requests it.
  • Targeted retention policy: Removes older seed-*.md (excluding the seed-latest.md target), stale runs/<run-id>/ and cycles/<cycle-id>/, and prunes history files by line count (keeping the newest 200 lines).
  • Use case: When you’ve run multiple Codex crew sessions over weeks, use this skill to restore a clean workspace without accidentally deleting the most recent seed state.

Quick Start

Run crew-cleanup in dry-run mode to preview what will be deleted from .codex/crew/ before applying changes.

Frequently Asked Questions about crew-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up stale Codex crew state files in my local workspace?

You can clean up old Codex crew state by deleting stale seed, run, and cycle files within the .codex/crew directory. The process targets artifacts older than 30 days and trims history files to the newest 200 lines.

What is the safest way to remove old Codex crew artifacts without losing recent state?

The safest way to remove old artifacts is using a dry-run mode to preview deletions before applying changes. This method excludes the seed-latest target by default, ensuring your most recent crew state remains intact while clearing older clutter.

How do I trim oversized history files in the .codex/crew directory?

To trim oversized history files, apply a line-count retention policy that keeps only the newest 200 lines. This pruning happens alongside the removal of stale run and cycle directories when you execute a crew cleanup.

Does the crew-cleanup process require a specific command to actually delete files?

Yes, the crew cleanup process requires an explicit apply flag to delete files. It runs in dry-run mode by default to show which files would be removed, requiring you to manually confirm before any actual deletions occur.

Can I preview which seed and run files will be deleted before modifying my workspace?

Yes, you can preview which seed and run files will be deleted by running the cleanup in dry-run mode. This shows exactly which old artifacts will be removed, excluding the seed-latest target, before you commit to any changes.