cleanup

cleanup is a command for coding agents from signalcompose/claude-tools. It costs 24 tokens per session (432 once invoked), scanned A, original, MIT.

A cleanup command for the .x-article/ workspace folder, which stores files used by the X Article workflow.

In plain words
What is it for?
Use it to inspect .x-article/, confirm which files to remove, and move that folder to the trash.
Why use it?
It removes completed or unwanted workflow files while asking for confirmation first and using the system trash when available.

Command

Part of the x-article plugin — 1 skill, 4 commands shipped together

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.

agentmods
npx agentmods add commands/signalcompose/claude-tools/cleanup
Clone the repo
git clone --depth 1 https://github.com/signalcompose/claude-tools

Or install x-article, 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/signalcompose/claude-tools/cleanup.svg)](https://agentmods.dev/commands/signalcompose/claude-tools/cleanup)
Your own site
<a href="https://agentmods.dev/commands/signalcompose/claude-tools/cleanup"><img src="https://agentmods.dev/badge/commands/signalcompose/claude-tools/cleanup.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 432 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.00432
Opus 5 $0.00012 $0.00216
Sonnet 5 $0.00005 $0.00086
Haiku 4.5 $0.00002 $0.00043

Measured 3d ago against content hash 4e9e68d85c15, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cleanup 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 3d 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/x-article/commands/cleanup.md · 50 lines

What it actually says

Step 1: ワークスペースの確認

.x-article/ ディレクトリの内容を一覧表示する。

ls -lh .x-article/ 2>/dev/null || echo ".x-article/ ディレクトリが存在しません"

ディレクトリが存在しない、または空の場合は「クリーンアップ対象のファイルはありません」と報告して終了する。

Step 2: ユーザーへの確認

一覧を表示した後、以下のメッセージでユーザーに確認を求める:

以下のファイルをゴミ箱に移動します:
  (ファイル一覧)

よろしいですか?(yes/no)

ユーザーが「no」または「キャンセル」と答えた場合は処理を中止する。

Step 3: ゴミ箱に移動

ユーザーが確認した場合、trash コマンドの有無を確認してから実行する。 trash が利用できない場合は Finder で開く案内を行い、Claude 自身は削除を実行しない

if command -v trash &>/dev/null; then
  trash .x-article/
else
  echo "trash コマンドが見つかりません。以下のいずれかを実行してください:"
  echo "  1. brew install trash && trash .x-article/"
  echo "  2. Finder で手動削除: open .x-article/"
fi

Step 4: 完了報告

.x-article/ をゴミ箱に移動しました。
次回 /x-article:draft を実行すると自動的に再作成されます。
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. 3d ago First seen · 50 lines · 24 tokens per session scan A 4e9e68d85c15

Subscribe to this mod's changes

cleanup is a command published in the GitHub repository signalcompose/claude-tools (4 stars, last pushed 6d ago), licensed MIT. It adds 24 tokens to every session and 432 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.