prune-update

prune-update is a command for Claude Code from openshift-eng/ai-helpers. It costs 23 tokens per session (2,154 once invoked), scanned C, original, Apache-2.0.

A command for processing save and drop requests written in comments on a pruning pull request. A pull request is a proposed set of changes for review; pruning removes unwanted files or components.

In plain words
What is it for?
Use it to process /save and /drop directives, update .pruneprotect and the manifest, create a commit, and update the pull request body.
Why use it?
It applies those decisions consistently by restoring or removing files, protecting saved paths, updating versions, and recording the result on the pull request.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions .claude-plugin; positional $N argument.

Part of the marketplace-ops plugin — 2 commands shipped together

Good fit Use it to process /save and /drop directives, update .pruneprotect and the manifest, create a commit, and update the pull request body.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/openshift-eng/ai-helpers/prune-update
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 marketplace-ops, the plugin that ships this one along with the rest of its 2 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 prune-update

README.md
[![agentmods](https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/prune-update/github.svg)](https://agentmods.dev/commands/openshift-eng/ai-helpers/prune-update)
Your own site
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/prune-update"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/prune-update/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 prune-update

Your own site · 80×15
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/prune-update"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/prune-update.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,154 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.00023 $0.02154
Opus 5.5 $0.00009 $0.00862
Sonnet 5.5 $0.00005 $0.00431
Haiku 4.5 $0.00002 $0.00215

Measured 1mo ago against content hash 7b937f3e1ea9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

prune-update 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 1mo 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.

git rm -rf {path}
plugins/marketplace-ops/commands/prune-update.md · 245 lines

How it starts

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

Name

marketplace-ops:prune-update

Synopsis

/marketplace-ops:prune-update [PR number or URL]

Description

Reads comments on a pruning PR to find /save <path> and /drop <path> directives.

For each saved item:

  1. Restores the files from the base branch.
  2. Adds the path to .pruneprotect permanently, with a comment noting who requested it and when.
  3. Pushes a new commit to the PR branch (never force-pushes).
  4. Updates the PR body to mark saved items.

For each dropped item:

  1. If the item was previously /saved: removes its files again, removes it from .pruneprotect.
  2. If the item is a new addition (not in the original manifest): removes its files and adds a new row to the manifest.
  3. For surviving plugins that lose commands or skills, bumps the patch version in plugin.json.
  4. Pushes a new commit to the PR branch (never force-pushes).
  5. Updates the PR body to reflect the drop.

Arguments

  • $1: (Optional) PR number or URL. If omitted, searches for the most recent open pruning PR by the current user.

Implementation

Step 1: Find the Pruning PR

If a PR number or URL was provided, use it directly. Otherwise, find the most recent open pruning PR:

gh pr list --author="@me" --state=open --search="prune stale marketplace" --json number,title,url,headRefName --limit 5

Select the first result. If no pruning PR is found, report this to the user and stop.

Step 2: Read PR Comments for /save and /drop Directives

Fetch all comments on the PR (both issue comments and review comments), including the author's association to the repository:

# Issue comments
gh api repos/{owner}/{repo}/issues/{pr_number}/comments \
  --jq '.[] | {id: .id, created_at: .created_at, author: .user.login, association: .author_association, body: .body}'

# Review comments
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments \
  --jq '.[] | {id: .id, created_at: .created_at, author: .user.login, association: .author_association, body: .body}'

Read the full file on GitHub · 245 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. 1mo ago First seen · 245 lines · 23 tokens per session scan C 7b937f3e1ea9

Subscribe to this mod's changes

prune-update is a command published in the GitHub repository openshift-eng/ai-helpers (121 stars, last pushed today), licensed Apache-2.0. It adds 23 tokens to every session and 2,154 once invoked, about $0.0001 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-09-05.