cleanup

cleanup is a skill for Claude Code from HigorAlves/orc. It costs 41 tokens per session (1,378 once invoked), scanned C, original, MIT.

A cleanup tool for finished or abandoned coding sessions. It removes session records, temporary Git worktrees (separate working directories), and, when safe, local branches after showing what it plans to remove.

In plain words
What is it for?
Use it to clean one session, all completed or abandoned sessions, or an unused environment's volumes after reviewing a dry-run preview.
Why use it?
It clears leftover workspace files and branches without silently deleting them. Safety checks pause when a worktree is dirty, a branch is unmerged, or another problem is found.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: $skill-name invocation.

Good fit Use it to clean one session, all completed or abandoned sessions, or an unused environment's volumes after reviewing a dry-run preview.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/higoralves/orc/cleanup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HigorAlves/orc --skill cleanup
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/higoralves/orc/cleanup/github.svg)](https://agentmods.dev/skills/higoralves/orc/cleanup)
Your own site
<a href="https://agentmods.dev/skills/higoralves/orc/cleanup"><img src="https://agentmods.dev/badge/skills/higoralves/orc/cleanup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/higoralves/orc/cleanup"><img src="https://agentmods.dev/badge/skills/higoralves/orc/cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,378 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01378
Opus 5.5 $0.00016 $0.00551
Sonnet 5.5 $0.00008 $0.00276
Haiku 4.5 $0.00004 $0.00138

Measured 25d ago against content hash fd796d5b32ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

cleanup scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Bash(rm -rf .orc:*)
codex/orc/content/skills/cleanup/SKILL.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

$orc-cleanup

Close the loop on finished orc work: remove the workspace state, the worktree and, when safe, the local feature branch.

Arguments

  • --auto[=guided|full] — autopilot level for this run; overrides interaction_policy. Ladder and hard-outward exemption: orc-gates §6.
  • <session-id-or-branch> — optional. Clean exactly one session, by sessionId (orc-state sessions, schema orc-state-protocol) or branch name, sanitized or raw.
  • --all-completed — clean every session whose status is completed or abandoned. Every safety check still applies per session.
  • --dry-run — print what would happen; change nothing. Recommended for the first run.
  • --per-repo — workspace mode: clean each linked repo as its PR merges. Use only when abandoning some repos (rare).
  • --down-volumes — also remove a torn-down environment's named volumes. Default keeps them: the next boot reuses DB data.

NOTE: at guided or full, the standard plan (state dir, clean worktree, merged branch) auto-applies after printing. Anomalies still gate at every level: partial workspace merges, unmerged branches, a dirty worktree.

Preconditions

🛑 Destructive run

P6 removes state directories, worktrees and local branches. The P5 preview gate is mandatory; --dry-run never applies.

  • Running from inside a candidate worktree stops the run in P1: cd to the main repo first.
  • In workspace mode, an open linked PR refuses the run unless --per-repo or the session is abandoned.
  • Typical moments: a shipped PR merged; $orc-status shows stale completed sessions; an abandoned feature (mark the session abandoned first).

Phases

Modules live beside this file under references/ (ADR 0008 pilot). Entering a phase, Read exactly its module, per the orc-phases protocol.

Phase Module Skipped when
0 Detect context resident, below never
1 Guard: not inside a candidate orc-cleanup/P1 never
2 Read the registry orc-cleanup/P2 never
3 Build the candidate list orc-cleanup/P3 never
4 Inspect each candidate orc-cleanup/P4 never
5 Preview the plan, then confirm orc-cleanup/P5 never; --dry-run stops here
6 Apply with safety gates orc-cleanup/P6 --dry-run, Cancel
7 Report orc-cleanup/P7 --dry-run

Read the full file on GitHub · 103 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago Changed fd796d5b32ba
  2. 1mo ago First seen · 103 lines · 41 tokens per session scan C aaebb9c746ee

Subscribe to this mod's changes

cleanup is a skill published in the GitHub repository HigorAlves/orc (7 stars, last pushed 3d ago), licensed MIT. It adds 41 tokens to every session and 1,378 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-21.

Related

cleanup compared with skills from other repositories

cleanup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cleanupHigorAlves/orcSkill73d agoMITC41Claude Code
fable-shipdebabsah/fable-methodSkill04mo agoMITA46Claude Code
changelogwesammustafa/Claude-Code-Everything-You-Need-to-KnowSkill3.7k2d agononeA28Claude Code
land-and-deployFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A41Claude Code
review-prFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A45Claude Code
release-notes-generatorFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A59Claude Code
release-notesFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A13Claude Code