cleanup

cleanup is a command for Claude Code from openshift-eng/ai-helpers. It costs 12 tokens per session (997 once invoked), scanned C, original, Apache-2.0.

A cleanup command that finds and removes cached files, cloned repositories, reports, virtual machines, and team data created by Node team plugins. A dry run lists what would be removed without deleting it.

In plain words
What is it for?
Use it to delete plugin artifacts, limit some report cleanup by age, or preview the cleanup with --dry-run.
Why use it?
It frees local disk space and supports data-purge requirements while allowing the removal to be previewed first.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the node-team plugin — 1 skill, 4 commands shipped together

Good fit Use it to delete plugin artifacts, limit some report cleanup by age…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/openshift-eng/ai-helpers/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.

Clone the repo
git clone --depth 1 https://github.com/openshift-eng/ai-helpers

Made for: Claude Code.

Or install node-team, the plugin that ships this one along with the rest of its 1 skill, 4 commands.

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/commands/openshift-eng/ai-helpers/cleanup.svg)](https://agentmods.dev/commands/openshift-eng/ai-helpers/cleanup)
Your own site
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/cleanup"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 997 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.00012 $0.00997
Opus 5 $0.00006 $0.00498
Sonnet 5 $0.00002 $0.00199
Haiku 4.5 $0.00001 $0.00100

Measured yesterday against content hash d136805da900, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 yesterday.

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.

Only remove `.work/node-rpm/` if `vagrant destroy` succeeded (or no Vagrantfile was present). Delete all other locations with `rm -rf`. Report each deletion:
plugins/node-team/commands/cleanup.md · 98 lines

How it starts

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

Name

node-team:cleanup

Synopsis

/node-team:cleanup [--older-than N] [--dry-run]

Description

Removes local artifacts created by Node team plugins: triage reports, cloned repos, dist-git clones, Vagrant VMs, and cached roster data. Use this to reclaim disk space or to satisfy data purge requirements (DATA-05).

Options

Flag Default Description
--older-than N 30 Only remove triage directories older than N days
--dry-run off Show what would be removed without deleting

Implementation

1. Discover artifacts

Scan for these locations relative to the current working directory and home:

Location Contents
.work/node-cve/repos/ Shallow repo clones
.work/node-cve/triage-YYYY-MM-DD/ CVE triage reports and analysis
.work/node-bug/triage-YYYY-MM-DD/ Bug triage reports
.work/node-rpm/ Dist-git clones and Vagrant VM
~/.node-assistant/ Cached team roster JSON files

For each location that exists, compute the size with du -sh.

2. Filter by age

For .work/node-cve/triage-*/ and .work/node-bug/triage-*/ directories, parse the date from the directory name and skip directories newer than --older-than days. The repos/, .work/node-rpm/, and ~/.node-assistant/ directories are always included (no age filter).

3. Show summary

Use $PWD for .work/ paths and $HOME for home directory paths so the user sees resolved locations. Print a table:

Location                                          Size    Age
$PWD/.work/node-cve/repos/                        1.2G    -
$PWD/.work/node-cve/triage-2026-05-01/            45M     59 days
$PWD/.work/node-cve/triage-2026-06-15/            52M     14 days (skipped, < 30 days)
$PWD/.work/node-bug/triage-2026-05-01/            12M     59 days
$PWD/.work/node-rpm/                              380M    -
$HOME/.node-assistant/                            128K    -

Total to remove: 1.64G

Read the full file on GitHub · 98 lines

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. yesterday First seen · 98 lines · 12 tokens per session scan C d136805da900

Subscribe to this mod's changes

cleanup is a command published in the GitHub repository openshift-eng/ai-helpers (116 stars, last pushed 2d ago), licensed Apache-2.0. It adds 12 tokens to every session and 997 once invoked, about $0.0001 per session on Opus 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-09-05.