clean

clean is a skill for Claude Code from tomoking2004/claude-plugins. It costs 154 tokens per session (2,567 once invoked), scanned B, original, MIT.

A cleanup workflow for removing Claude Code's local history, temporary traces, and caches while preserving login details, settings, and installed plugins.

In plain words
What is it for?
Use it when you explicitly want to erase Claude Code history or local traces from a machine. It checks file counts and sizes, backs up `~/.claude.json`, removes approved data, and verifies preserved settings.
Why use it?
It helps remove stored conversations, prompts, snapshots, and other local records without forcing you to sign in or configure Claude Code again. It lists what will be removed and asks for approval before deletion.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Part of the ops plugin — 3 skills shipped together

Good fit Use it when you explicitly want to erase Claude Code history or local traces from a machine. It checks file counts and sizes, backs up ~/.claude.json, removes approved data, and verifies preserved settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tomoking2004/claude-plugins/clean
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.

Any agent
npx skills add tomoking2004/claude-plugins --skill clean
Clone the repo
git clone --depth 1 https://github.com/tomoking2004/claude-plugins

Made for: Claude Code.

Or install ops, the plugin that ships this one along with the rest of its 3 skills.

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 clean

README.md
[![agentmods](https://agentmods.dev/badge/skills/tomoking2004/claude-plugins/clean/github.svg)](https://agentmods.dev/skills/tomoking2004/claude-plugins/clean)
Your own site
<a href="https://agentmods.dev/skills/tomoking2004/claude-plugins/clean"><img src="https://agentmods.dev/badge/skills/tomoking2004/claude-plugins/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 clean

Your own site · 80×15
<a href="https://agentmods.dev/skills/tomoking2004/claude-plugins/clean"><img src="https://agentmods.dev/badge/skills/tomoking2004/claude-plugins/clean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 154 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,567 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00154 $0.02567
Opus 5.5 $0.00062 $0.01027
Sonnet 5.5 $0.00031 $0.00513
Haiku 4.5 $0.00015 $0.00257

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

Security

Grade B, and why

clean scanned grade B 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- `~/.claude/settings.json` — モデル・テーマ・`enabledPlugins`・`extraKnownMarketplaces` 等の設定.
plugins/ops/skills/clean/SKILL.md · 71 lines

How it starts

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

対象:このマシンに Claude Code が残す履歴・痕跡・キャッシュ——過去の会話・入力・編集前スナップショット・スクラッチ・利用統計など,消えても次回以降の起動と身元・設定・導入済みプラグインに影響しないもの.

対象外(絶対に消さない):身元と設定——履歴ではなく,消せば再ログインや再導入・再設定を強いるもの.何がそれに当たるかは下の「維持の対象」が列挙する.

手順

  1. 列挙する:下の「削除の対象」を実際に走査し,各項目の実在・ファイル数・容量を数える——存在しない項目は黙って飛ばす.同時に「維持の対象」も実在を確かめ,触れないものとして脇に置く.
  2. 明示して承認を得る:何を・どれだけ消し,何を残すかを表で示してから問う——削除は取り消せない(手順3のバックアップは ~/.claude.json のみを守る).ユーザーが範囲を指定していればそれに従い,承認なしに手順4へ進まない.
  3. ~/.claude.json を退避する:このファイルは身元・設定と履歴が同居する唯一のファイルで,手順5で一部キーだけを削る——編集前の全文を %TEMP%\claude-cleanup-backup\(POSIX では $TMPDIR/claude-cleanup-backup)へ複製してから触る.他の削除対象はバックアップしない(履歴そのものを消すのが目的).
  4. ファイル・ディレクトリを消す:「削除の対象」を下の「削除の正典」に従って消す——器の残し方も,生きているセッションの避け方もそこが定める.
  5. ~/.claude.json から履歴キーだけを削る:「削除の正典」の除去方式で,利用統計・キャッシュ系のキーだけを落とし,身元・設定キーは残す.
  6. 裏取りして報告する:削除後に,下の「維持の対象」が無傷であることを実際に読んで確かめ,解放した容量と残したものを簡潔に伝える.

削除の対象

~/.claude/ 配下(~ は Windows では %USERPROFILE%):

  • projects/ — 全会話のトランスクリプト(.jsonl・tool-results・subagents ログ).最大の痕跡.
  • file-history/ — 編集前ファイルのスナップショット(Undo 用).
  • history.jsonl — 入力したプロンプトの履歴.
  • shell-snapshots/ — シェル環境のスナップショット.
  • session-env/ — セッション毎の環境ディレクトリ.
  • backups/ — ~/.claude.json の自動バックアップ.
  • cache/ — changelog・issue 等のキャッシュ.
  • telemetry/ — 送信待ち/失敗したテレメトリイベント.
  • sessions/・ide/ — セッション状態と IDE ロック.ただし生きているものは残す(正典参照).

~/ 直下と一時領域:

  • ~/.claude.json.tmp.* — 書き込み失敗の残骸.空のこともあるが,~/.claude.json の全内容をそのまま含むことがある(oauthAccount も projects.* も)——本体からキーを削っても,これを残せば履歴は消えていない.
  • スクラッチ領域 %TEMP%\claude\(POSIX では $TMPDIR/claude) — レンダリング・ブラウザプロファイル等の作業ファイル.現在のセッションのディレクトリと bundled-skills は残す(正典参照).

~/.claude.json 内のキー(利用統計・キャッシュ・参照履歴):tipsHistory・tipLifetimeShownCounts・skillUsage・pluginUsage・announcementImpressions・seenNotifications・promptQueueUseCount・numStartups・lastPlanModeUse・closedIssuesLastChecked・changelogLastFetched・cachedGrowthBookFeatures(+At)・cachedExperimentData・cachedExperimentFeatures・clientDataCacheSlots・各種 *Cache・passesEligibilityCache・groveConfigCache・feedbackSurveyState・githubRepoPaths.

Read the full file on GitHub · 71 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 · 71 lines · 154 tokens per session scan B f1a1b10d52ff

Subscribe to this mod's changes

clean is a skill published in the GitHub repository tomoking2004/claude-plugins (3 stars, last pushed 2mo ago), licensed MIT. It adds 154 tokens to every session and 2,567 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

notion-artifact-capture

Use when a user says “save to Notion” for research, reports, drafts, references, or generated artifacts and wants a reusable default destination. Bootstraps a generic Notion AI Output Library under a user-created shared parent page, saves typed metadata and optional Markdown, verifies every write through the live API…

AtlasOmnia/hermes-custom-pack · 82 tokens

hold-my-hand

Standing posture for multi-step work: only the current phase (exact steps, expected output, common failure, who acts, advancing reply), later ones as a 'Phase 1 of 8' count. Use when: 'hold my hand', 'walk me through this', 'one step at a time', 'one phase at a time', 'don't show me the next step yet', 'guide me…

melodic-software/claude-code-plugins · 130 tokens

prerequisites

Read-only report of external tools the enabled plugin fleet declares, and which of them are missing. Use when a hook says a formatter or CLI is missing, or when asking whether this machine has what the enabled plugins need. Never installs.

melodic-software/claude-code-plugins · 47 tokens

reflect

Self-assessment of AI session quality. Scores 5 dimensions from session data and harness memory. Not an agent performance review — it's human self-reflection on how well they used AI assistance. Use when the user says "reflect", "how did I do", "session review", or at the end of a long session.

epicsagas/plugins · 67 tokens

skill-teilen

Reicht einen Skill, ein Plugin oder eine Vorlage (CLAUDE.md, settings.json, Prompt) in die SKAILE Community Skill-Library ein. Nutzen wenn der User sagt "teile meinen Skill", "teile meine CLAUDE.md", "teile meine Vorlage", "lade meinen Skill in die Community hoch", "reiche meinen Skill ein", "skill teilen" oder "in…

sebaskauf/skaile-community-library · 97 tokens

show-and-share

Schreibt einen fertigen Show-&-Share-Post für die SKAILE Community. Nutzen wenn der User sagt "schreib mir einen Show & Share Post", "stelle meinen Skill vor", "Post für meinen Skill/meine Vorlage", "schreib einen Post zu dem was ich gebaut habe", oder direkt nachdem ein Skill mit skill-teilen eingereicht wurde.

sebaskauf/skaile-community-library · 74 tokens