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.
npx skills add tomoking2004/claude-plugins --skill clean-tracesgit clone --depth 1 https://github.com/tomoking2004/claude-pluginsWrote 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.
[](https://agentmods.dev/skills/tomoking2004/claude-plugins/clean-traces)<a href="https://agentmods.dev/skills/tomoking2004/claude-plugins/clean-traces"><img src="https://agentmods.dev/badge/skills/tomoking2004/claude-plugins/clean-traces/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.
<a href="https://agentmods.dev/skills/tomoking2004/claude-plugins/clean-traces"><img src="https://agentmods.dev/badge/skills/tomoking2004/claude-plugins/clean-traces.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00163 | $0.02919 |
| Opus 5.5 | $0.00065 | $0.01168 |
| Sonnet 5.5 | $0.00033 | $0.00584 |
| Haiku 4.5 | $0.00016 | $0.00292 |
Grade B, and why
clean-traces 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 11d 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` 等の設定. How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
対象:このマシンに Claude Code が残す履歴・痕跡・キャッシュ——過去の会話・入力・編集前スナップショット・スクラッチ・利用統計など,消えても次回以降の起動と身元・設定・導入済みプラグイン・自動メモリに影響しないもの.
対象外(消さない):身元と設定と導入済みプラグインと自動メモリ——履歴ではなく,消せば再ログインや再導入・再設定を強いるか,積み上げた記憶を失うもの.何がそれに当たるかは下の「維持の対象」が列挙する.
手順
- 列挙する:下の「削除の対象」を実際に走査し,各項目の実在を確かめ,ファイル数・容量を数える——存在しない項目は黙って飛ばす.同時に「維持の対象」も実在を確かめ,触れないものとして脇に置く.
- 明示して承認を得る:何を・どれだけ消し,何を残すかを表で示してから問う——削除は取り消せない(手順3のバックアップは
~/.claude.jsonのみを守る).ユーザーが範囲を指定していればそれに従う.承認なしに手順4へ進まない. ~/.claude.jsonを退避する:このファイルは残すものの中で唯一,身元・設定と履歴が同居し,手順5で一部キーだけを削る——編集前の全文を%TEMP%\claude-cleanup-backup\(POSIX では$TMPDIR/claude-cleanup-backup)へ複製してから触る.他の削除対象はバックアップしない(履歴そのものを消すのが目的).- ファイル・ディレクトリを消す:「削除の対象」を下の「削除の正典」に従って消す——ディレクトリの残し方も,生きているセッションの避け方もそこが定める.
~/.claude.jsonから履歴キーだけを削る:「削除の正典」の除去方式で,利用統計・キャッシュ系のキーだけを落とし,身元・設定キーは残す.- 裏取りして報告する:削除後に,下の「維持の対象」が無傷であることを実際に読んで確かめ,手順3で退避した複製を消す(本体の全内容を持つので,残せば履歴を消したことにならない).解放した容量と残したものを簡潔に伝える.
削除の対象
~/.claude/ 配下(~ は Windows では %USERPROFILE%):
projects/— 全会話のトランスクリプト(.jsonl・tool-results・subagents ログ).ただし各プロジェクトのmemory/は残す(維持の対象).file-history/— 編集前ファイルのスナップショット(Undo 用).history.jsonl— 入力したプロンプトの履歴.shell-snapshots/— シェル環境のスナップショット.session-env/— セッション毎の環境ディレクトリ.backups/—~/.claude.jsonの自動バックアップ.cache/— changelog・issue 等のキャッシュ.telemetry/— 送信待ち/失敗したテレメトリイベント.ide/— IDE のロック.ただし生きているものは残す(正典参照).paste-cache/— 大きな貼り付けの中身.uploads/— Remote Control の添付.plans/— プランモードの計画ファイル.debug/— セッション毎のデバッグログ.stats-cache.json・usage-data/—/usageの集計と/insightsの分析.image-cache/・todos/・statsig/・logs/— 旧版の残り.
~/ 直下と一時領域:
~/.claude.json.tmp.*— 書き込み失敗の残骸.空のこともあるが,~/.claude.jsonの全内容をそのまま含むことがある(oauthAccountもprojects.*も)——本体からキーを削っても,これを残せば履歴は消えていない.- スクラッチ領域
%TEMP%\claude\(POSIX では$TMPDIR/claude-<uid>,macOS では/tmp/claude-<uid>) — レンダリング・ブラウザプロファイル等の作業ファイル.生きているセッションのディレクトリとbundled-skillsは残す(正典参照).
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.
- 11d ago First seen · 78 lines · 163 tokens per session scan B bff76cc7dc1a
clean-traces is a skill published in the GitHub repository tomoking2004/claude-plugins (3 stars, last pushed 2d ago), licensed MIT. It adds 163 tokens to every session and 2,919 once invoked, about $0.0007 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-11-21.
clean-traces compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| clean-tracestomoking2004/claude-plugins | Skill | 3 | 2d ago | MIT | B | 163 | Claude Code |
| notion-artifact-captureAtlasOmnia/hermes-custom-pack | Skill | 88 | 16d ago | MIT | A | 82 | Claude Code, Codex |
| hold-my-handmelodic-software/claude-code-plugins | Skill | 34 | today | MIT | A | 95 | Claude Code |
| prerequisitesmelodic-software/claude-code-plugins | Skill | 34 | today | MIT | A | 47 | Claude Code |
| ad-nachbausebaskauf/skaile-community-library | Skill | 9 | 6d ago | MIT | A | 125 | Claude Code |
| ad-schnittsebaskauf/skaile-community-library | Skill | 9 | 6d ago | MIT | A | 104 | Claude Code |
| ad-analysesebaskauf/skaile-community-library | Skill | 9 | 6d ago | MIT | A | 100 | Claude Code |