sweep

sweep is a skill for Claude Code from thkt/dotclaude. It costs 40 tokens per session (1,733 once invoked), scanned A, original, MIT.

A codebase-wide inspection skill that examines one chosen concern at a time, such as async code, state handling, unused code, defenses, or tests. It fixes clear cases and lists uncertain ones with file and line locations.

In plain words
What is it for?
Use it for focused repository audits, including cleanup, module design checks, and test-quality reviews.
Why use it?
It gives a repeatable way to find broad classes of maintenance problems without mixing unrelated review work.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool; mentions AGENTS.md.

Good fit Use it for focused repository audits, including cleanup, module design checks, and test-quality reviews.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thkt/dotclaude/sweep
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 thkt/dotclaude --skill sweep
Clone the repo
git clone --depth 1 https://github.com/thkt/dotclaude

Made for: Claude Code.

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 sweep

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/thkt/dotclaude/sweep"><img src="https://agentmods.dev/badge/skills/thkt/dotclaude/sweep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,733 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.00040 $0.01733
Opus 5.5 $0.00016 $0.00693
Sonnet 5.5 $0.00008 $0.00347
Haiku 4.5 $0.00004 $0.00173

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

Security

Grade A, and why

sweep 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 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.

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.

.ja/skills/sweep/SKILL.md · 79 lines

How it starts

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

/sweep - コードベースの総点検

1 回の実行で見る観点は 1 つにする。差分を観点ごとに分け、人が読める大きさに保つため。

入力

$ARGUMENTS 扱い
観点の名前 その観点で、repo のルートから点検する
観点の名前とパス その観点で、パスの下だけを点検する
空 AskUserQuestion で観点を1つ選ばせる

観点

観点 探すもの 直し方
async ホットパスで、互いに依存しない await を順に待っている箇所 並行に実行する。順序に意味がある箇所は直さず、一覧に回す
state フラグや真偽値に散らばった、暗黙の状態機械 状態と遷移を明示した型にする。矛盾する遷移は直さず、一覧に回す
modules 浅いモジュール:インターフェースが広く、中身が薄いもの。消しても何も失われないモジュール。呼び出し側が知っている特殊ケース、順序の規則、検証、導出した値。モジュール自身が導ける引数、全呼び出し元が同じ値を渡す引数、誰も読まない引数 Ousterhout の原則(deepen modules and simplify interfaces、pull complexity downwards、define errors out of existence)で直す。消すと複雑さが呼び出し側に戻るモジュールは残し、何も失われないものは統合して消す。1つの概念は、それを持つ1つのモジュールに置き、特殊ケースや検証をその中へ引き込む。引数を削り、呼び方を1通りにする。全呼び出し元を新しい形に移し、古い経路は残さず消す
defense 境界の内側での再検証、不要な try/catch、1回しか使わない helper、起きそうにないケースへの防御 外部の値は、それを持つ境界で1回だけ検証する。内側には型の付いた値を渡す
dead 使われていないコード、不要になった後方互換のコード、コードと矛盾する資料 消すか、資料をコードに合わせる。外部に公開した API と保存済みのデータの形式は直さず、一覧に回す
tests 構造に結合したテスト、モジュールの mock、ロジックを持つテスト、振る舞いを確かめないテスト 公開 API を通して、利用者から見える振る舞いを確かめる形に直す。mock の代わりに実物の依存を使う。消すのは、そのテストが守る関数を別のテストも呼んでいるときだけ

直すかの判断

候補ごとに、起きる頻度と深刻さを 1〜10 で付ける。

条件 扱い
頻度 × 深刻さが5以上で、振る舞いを変えずに直せる 直す
頻度 × 深刻さが5未満 直さず、一覧に回す
直すと振る舞いが変わる。または公開 API や保存済みのデータに触れる 直さず、一覧に回す
防御を足したくなった 足さない。失敗の形、起きる確率、増える複雑さを一覧に書く

手順

  1. git status --porcelain を実行し、結果を記録する。ここで変更のあるファイルは直さず、「見なかったもの」に入れる。人の未 commit の変更を PR に混ぜないため。
  2. .claude/OUTCOME.md を読み、点検の対象が outcome の範囲に入るかを確かめる。無ければ /outcome --no-publish で stub を作る。こうして作った .claude/OUTCOME.md は自分の commit に入れない。
  3. 観点の「探すもの」を、対象の全ファイルから探す。広い範囲は Explore の subagent に分ける。
  4. 候補ごとに「直すかの判断」を当てる。
  5. 直す候補を 1 つずつ直し、そのたびにテストを実行する。テストが落ちたら、その修正を戻して一覧に回す。
  6. すべての候補が「直したもの」か「一覧」のどちらかに入ったら、出力の形で結果をまとめる。
  7. 直したものが 0 件なら、公開せずに出力を返して終える。
  8. 1 件以上なら ${CLAUDE_SKILL_DIR}/../_lib/publish.md を読み、§ 公開の値を渡して draft PR にする。出力と PR の URL を返して終える。

出力

節 中身
直したもの file:line、何を直したか、実行したテストとその結果
一覧 file:line、問題、頻度 × 深刻さ、直さなかった理由
見なかったもの 対象から外したファイルと、その理由

Read the full file on GitHub · 79 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. 11d ago Changed · +14 lines · -17 tokens per session ffa4977848ff
  2. 16d ago First seen · 65 lines · 57 tokens per session scan A d2cf29750ef6

Subscribe to this mod's changes

sweep is a skill published in the GitHub repository thkt/dotclaude (13 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 1,733 once invoked, about $0.0002 per session on Opus 5.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-11-14.

Related

sweep compared with skills from other repositories

sweep next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sweepthkt/dotclaudeSkill13todayMITA40Claude Code
oraclesteipete/oracleSkill4.1k2d agoMITA18Claude Code, Codex
semgrep-rule-creatorwaybarrios/opencode-power-packSkill5627d agoMITA37Claude Code
variant-analysiswaybarrios/opencode-power-packSkill5627d agoMITA45Claude Code
code-review-webrampstackco/claude-skillsSkill1.1k14d agoMITA121Claude Code
dx-auditmblode/agent-skillsSkill228todayMITA54Claude Code, Codex
vuln-reportwaybarrios/opencode-power-packSkill5627d agoMITA44Claude Code