ultrawork-clean

ultrawork-clean is a command for Claude Code from mnthe/hardworker-marketplace. It costs 17 tokens per session (1,005 once invoked), scanned A, original, MIT.

A command for removing stored Ultrawork session data. Without extra options it deletes only the current session; explicit options can remove completed, old, or all sessions.

In plain words
What is it for?
Use it to reset the current Ultrawork session or batch-delete terminal sessions based on age, completion status, or an explicit request to remove all of them.
Why use it?
It clears session state when you want to start fresh and provides controlled cleanup for accumulated sessions. The broadest cleanup option can delete every session.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ultrawork plugin — 15 skills, 9 commands shipped together

Good fit Use it to reset the current Ultrawork session or batch-delete terminal sessions based on age, completion status, or an explicit request to remove all of them.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add mnthe/hardworker-marketplace
Claude Code
/plugin install ultrawork

Made for: Claude Code.

Or install ultrawork, the plugin that ships this one along with the rest of its 15 skills, 9 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 ultrawork-clean

README.md
[![agentmods](https://agentmods.dev/badge/commands/mnthe/hardworker-marketplace/ultrawork-clean/github.svg)](https://agentmods.dev/commands/mnthe/hardworker-marketplace/ultrawork-clean)
Your own site
<a href="https://agentmods.dev/commands/mnthe/hardworker-marketplace/ultrawork-clean"><img src="https://agentmods.dev/badge/commands/mnthe/hardworker-marketplace/ultrawork-clean/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 ultrawork-clean

Your own site · 80×15
<a href="https://agentmods.dev/commands/mnthe/hardworker-marketplace/ultrawork-clean"><img src="https://agentmods.dev/badge/commands/mnthe/hardworker-marketplace/ultrawork-clean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00017 $0.01005
Opus 5 $0.00009 $0.00502
Sonnet 5 $0.00003 $0.00201
Haiku 4.5 $0.00002 $0.00101

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

Security

Grade A, and why

ultrawork-clean scanned grade A with 0 findings 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 10d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ultrawork/commands/ultrawork-clean.md · 159 lines

How it starts

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

Ultrawork Clean Command

Overview

Clean ultrawork sessions. Two modes:

  1. Single session clean (default): Delete current session for fresh /ultrawork start
  2. Batch cleanup: Delete multiple sessions based on criteria (requires explicit flags)

Step 1: Parse Arguments

Parse command arguments to determine cleanup mode:

Argument Mode Behavior
(no args) Single session Delete ONLY current session (CLAUDE_SESSION_ID)
--older-than N Batch Delete terminal-state sessions older than N days
--completed Batch Delete all terminal-state sessions
--all Batch Delete ALL sessions (dangerous!)

IMPORTANT: Without batch flags (--all, --completed, --older-than), ONLY the current session is deleted.


Step 2: Execute Cleanup

Default Mode (No Arguments) - Single Session Clean

This is the DEFAULT behavior when /ultrawork-clean is run without arguments.

Deletes ONLY the current session (identified by CLAUDE_SESSION_ID) to allow a fresh /ultrawork start.

SCRIPTS="${CLAUDE_PLUGIN_ROOT}/src/scripts"

bun "${SCRIPTS}/ultrawork-clean.js" --session "${CLAUDE_SESSION_ID}"

Output:

{
  "success": true,
  "session_id": "abc-123",
  "goal": "Add user auth",
  "phase": "PLANNING",
  "message": "Session deleted. Run /ultrawork to start fresh."
}

Batch Mode: --older-than N

Delete sessions older than N days in terminal states only (COMPLETE, CANCELLED, FAILED).

SCRIPTS="${CLAUDE_PLUGIN_ROOT}/src/scripts"

bun "${SCRIPTS}/ultrawork-clean.js" --older-than ${N}

Batch Mode: --completed

Delete all sessions in terminal states, regardless of age.

SCRIPTS="${CLAUDE_PLUGIN_ROOT}/src/scripts"

bun "${SCRIPTS}/ultrawork-clean.js" --completed

Batch Mode: --all

Delete ALL sessions, including active ones. Use with extreme caution.

SCRIPTS="${CLAUDE_PLUGIN_ROOT}/src/scripts"

bun "${SCRIPTS}/ultrawork-clean.js" --all

Read the full file on GitHub · 159 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. 10d ago First seen · 159 lines · 17 tokens per session scan A 2f44490db103

Subscribe to this mod's changes

ultrawork-clean is a command published in the GitHub repository mnthe/hardworker-marketplace (4 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 1,005 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.