Skip to content

Skill Cleaner

Audits Codex/OpenClaw skills for prompt budget, duplicates, and unused entries

Stars
7,433
Licence
MIT
Files
4 files

What it does

Skills are instruction folders that tell an AI coding agent how to handle a task. This skill teaches the agent to run a Node analyzer script that inventories the skills loaded into Codex, estimates how much of the prompt budget they consume, finds duplicate or near-identical skills across folders, and flags skills with little recent usage in session logs. The agent then reports suggestions and, only if asked, can shorten descriptions, delete duplicates, or disable skills in grouped commits.

Great for

  • Developers who run many custom Codex or OpenClaw skills and want to reduce prompt bloat
  • Maintainers cleaning up duplicate skill copies across repos, plugin caches, and personal folders

Skip it if

  • Users who do not use Codex or OpenClaw, since the script reads Codex-specific config, history and session files
  • Anyone wanting unattended deletion: the output policy says to suggest first, but deleting duplicates or ignored folders can remove the only copy of a skill if the kept copy is not verified

Try asking

  • “Run the skill cleaner with --months 3 and summarise which skills are using the most prompt budget”
  • “Find duplicate skills across my Codex, plugin cache and repo folders and suggest which copies to delete”
  • “Check which skills have not been mentioned in my recent Codex sessions without reading full logs”
  • “Shorten long skill descriptions to save prompt budget while keeping trigger words”
Step-by-step guide: how to use Skill CleanerInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 4 original files, the MIT licence and an attribution note.

    skill-cleaner.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip skill-cleaner.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip skill-cleaner.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Start with --no-logs for a fast inventory, then add --months 3 once you want usage evidence
  • Use --no-live if Codex is not installed, accepting that the filesystem fallback is less accurate about what is actually loaded
  • Review the suggested deletions yourself and confirm the kept copy exists before letting the agent remove anything

What's inside

  • agents/openai.yaml
  • scripts/skill-cleaner.test.ts
  • scripts/skill-cleaner.ts
  • SKILL.md

Redistributed unmodified from steipete/agent-scripts under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.