cleanup

cleanup is a command for Claude Code from alphabravo-oss/guild. It costs 7 tokens per session (398 once invoked), scanned C, original, MIT.

A command for resetting Forge interview state by removing its saved state files and, if chosen, its survey data. Forge is the system that stores these interview materials.

In plain words
What is it for?
Use it to remove only state and draft files while keeping survey data, or to remove the entire forge-specs directory.
Why use it?
It clears unfinished or stale interview data before starting again. It checks what exists and asks for confirmation before deleting anything.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the forge plugin — 2 commands, 3 agents shipped together

Good fit Use it to remove only state and draft files while keeping survey data, or to remove the entire forge-specs directory.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alphabravo-oss/guild/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/alphabravo-oss/guild

Made for: Claude Code.

Or install forge, the plugin that ships this one along with the rest of its 2 commands, 3 agents.

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/alphabravo-oss/guild/cleanup/github.svg)](https://agentmods.dev/commands/alphabravo-oss/guild/cleanup)
Your own site
<a href="https://agentmods.dev/commands/alphabravo-oss/guild/cleanup"><img src="https://agentmods.dev/badge/commands/alphabravo-oss/guild/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/commands/alphabravo-oss/guild/cleanup"><img src="https://agentmods.dev/badge/commands/alphabravo-oss/guild/cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 398 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.00007 $0.00398
Opus 5.5 $0.00003 $0.00159
Sonnet 5.5 $0.00001 $0.00080
Haiku 4.5 $0.00001 $0.00040

Measured 3mo ago against content hash 42535a45cced, 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 3mo 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.

rm -rf forge-specs/
plugins/forge/commands/cleanup.md · 70 lines

What it actually says

Forge Cleanup Command

Remove all Forge interview state files to reset the plugin state.

STEP 1: CHECK FOR STATE FILES

First, check what state files exist:

ls -la forge-specs/*/state.md 2>/dev/null || echo "NO_STATE_FILES"

Also check for survey data:

ls -d forge-specs/*/survey/ 2>/dev/null || echo "NO_SURVEY_DATA"

STEP 2: HANDLE RESULTS

If NO state files exist:

Tell the user:

No Forge state files found. Nothing to clean up.

Then STOP.

If state files exist:

List the files that will be deleted, then ask the user for confirmation using AskUserQuestion:

"Found N state files and M survey directories. What should I clean up?"

  • "State files only" — Remove state.md and draft.md (keep survey data for reference)
  • "Everything" — Remove entire forge-specs/ directory
  • "Cancel" — Don't delete anything

Then execute based on their choice:

State files only:

rm -f forge-specs/*/state.md forge-specs/*/draft.md

Everything:

rm -rf forge-specs/

Then confirm to the user:

Forge cleanup complete.

To start a new interview, use:

/forge:plan "your feature name"

IMPORTANT NOTES

  • This command only deletes state and survey files
  • It does NOT delete completed specs (the .md and .json files in forge-specs/)
  • Use this when you want to abandon all in-progress interviews
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. 3mo ago First seen · 70 lines · 7 tokens per session scan C 42535a45cced

Subscribe to this mod's changes

cleanup is a command published in the GitHub repository alphabravo-oss/guild (3 stars, last pushed 12d ago), licensed MIT. It adds 7 tokens to every session and 398 once invoked, about $0.0000 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-08-31.

Related

cleanup compared with commands from other repositories

cleanup next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cleanupalphabravo-oss/guildCommand312d agoMITC7Claude Code
checklistgithub/spec-kitCommand153ktodayMITA13Claude Code
clarifygithub/spec-kitCommand153ktodayMITA27Claude Code
specifygithub/spec-kitCommand153ktodayMITA13Claude Code
analyzegithub/spec-kitCommand153ktodayMITA26Claude Code
convergegithub/spec-kitCommand153ktodayMITA35Claude Code
implementgithub/spec-kitCommand153ktodayMITA14Claude Code