AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Codex Cleaner

skill-daniel-p-green-codex-cleaner-codex-cleaner · by daniel-p-green

This skill should be used when the user asks to clean up Codex logs, audit Codex storage, find large Codex sessions, reduce ~/.codex disk usage, archive old Codex chats, or mentions runaway Codex chat logs/storage.

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add skill-daniel-p-green-codex-cleaner-codex-cleaner

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-daniel-p-green-codex-cleaner-codex-cleaner)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Codex Cleaner? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Codex Cleaner

Audit and clean local Codex storage safely. Focus on ~/.codex session files, logs, caches, generated artifacts, and temporary files without reading chat contents during audit.

Workflow

  1. Start with an audit unless the user already provided recent audit output.
  2. Inspect storage by metadata only:

``bash python3 scripts/codex_cleaner.py audit ``

  1. Explain the largest storage areas in plain language and separate report-only database files from cleanup candidates.
  2. Propose the smallest useful cleanup command before running cleanup.
  3. Run cleanup first as a dry run:

``bash python3 scripts/codex_cleaner.py clean --target sessions --older-than 60 ``

  1. Require explicit user approval before adding --execute.

Safety Rules

  • Treat ~/.codex as the only v1 storage root unless the user passes a different root for testing.
  • Use audit output to identify likely wins; do not inspect, summarize, or quote chat/log contents.
  • Keep sqlite, WAL, and SHM files report-only. Do not delete, vacuum, checkpoint, or mutate live databases.
  • Keep cleanup dry-run by default. Add --execute only after the user confirms the exact command.
  • Prefer archiving old sessions over deleting them directly.
  • Skip symlinks and surface permission errors as warnings instead of forcing access.

Script Commands

Audit

Run:

python3 scripts/codex_cleaner.py audit

Use --root for fixtures or non-default local testing. Use --top to change how many large files and top-level entries are shown.

Audit reports:

  • Total storage under the root.
  • Top-level file and directory sizes.
  • Session usage grouped by YYYY-MM.
  • Largest session .jsonl files.
  • Log, sqlite, WAL, and SHM files as report-only items.
  • Special storage areas such as sessions, generated images, cache, tmp, .tmp, and archived sessions.

Clean

Run dry-run cleanup:

python3 scripts/codex_cleaner.py clean --target sessions --older-than 60

Run confirmed cleanup:

python3 scripts/codex_cleaner.py clean --target sessions --older-than 60 --execute

Supported targets:

  • sessions: archive old session files to ~/.codex-cleaner/archives/ before deleting originals.
  • generated-images: delete old top-level generated image entries.
  • tmp: delete old top-level entries under tmp and .tmp.

Use --archive-root only for fixture tests or when the user explicitly wants archives somewhere else.

Response Pattern

When reporting results, include:

  • The root audited or cleaned.
  • Total size and the top few storage areas.
  • Cleanup candidates and estimated recoverable size.
  • Whether the run was dry-run or executed.
  • Any warnings or skipped paths.

Keep recommendations conservative. If the largest files are live databases or recent sessions, say they are report-only or should be kept unless the user has a specific retention policy.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.