sweep

sweep is a skill for Claude Code, Codex from tslateman/duet. It costs 17 tokens per session (607 once invoked), scanned A, original, MIT.

A post-work review of the files and references left behind after coding-agent changes. It checks the working tree, test data, examples, documentation, and debug artifacts.

In plain words
What is it for?
Use it after agent work to inspect the full change footprint, find damaged samples or test data, remove stale references, and spot leftover debugging material.
Why use it?
Completed work can accidentally modify unrelated files, damage fixtures, or leave documentation pointing to old names and paths.

Skill for Claude CodeCodex

Part of the duet plugin — 25 skills, 6 commands, 1 agent 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 skills/tslateman/duet/sweep
Any agent
npx skills add tslateman/duet --skill sweep
Clone the repo
git clone --depth 1 https://github.com/tslateman/duet

Made for: Claude Code, Codex.

Or install duet, the plugin that ships this one along with the rest of its 25 skills, 6 commands, 1 agent.

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/tslateman/duet/sweep.svg)](https://agentmods.dev/skills/tslateman/duet/sweep)
Your own site
<a href="https://agentmods.dev/skills/tslateman/duet/sweep"><img src="https://agentmods.dev/badge/skills/tslateman/duet/sweep.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 607 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.00017 $0.00607
Opus 5 $0.00009 $0.00303
Sonnet 5 $0.00003 $0.00121
Haiku 4.5 $0.00002 $0.00061

Measured 3d ago against content hash 274409de477f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

skills/sweep/SKILL.md · 87 lines

How it starts

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

Post-Op Sweep

Overview

Audit the working tree after agent work completes. Find what the agents left behind.

1. Blast Radius

Map every file touched, across all repos affected:

git diff --stat
git diff --cached --stat

If other repos were modified (check recent tool output or plan files for cross-repo work), run git diff --stat there too.

Flag anything unexpected, files not mentioned in the plan or task.

2. Fixture and Example Damage

Check whether test fixtures, example files, seed data, or sample configs were modified:

  • Look for changes to files with names like example, fixture, seed, sample, mock, test-data
  • Changes that null out values, remove content, or alter structure are likely test side-effects
  • These should almost always be reverted

3. Stale References

Search for references that became outdated by the work:

  • Plan files referencing work as "pending" or "TODO" that's now done
  • CLAUDE.md / README listing features as planned that are now implemented
  • Comments saying "not yet implemented" for code that now exists
  • Config or docs pointing to old file paths, function names, or APIs that changed

4. Debug Artifacts

Scan for artifacts agents leave behind:

  • console.log, print(), echo "DEBUG" statements
  • Temporary files (*.tmp, *.bak, /tmp/ references)
  • Commented-out code blocks that serve no purpose
  • Test data written to production data directories

5. Scope Bleed

Identify changes outside the task scope:

  • Unrelated formatting changes
  • Dependency updates not requested
  • Refactors beyond what the plan called for
  • Changes in other repos' working trees that predate this session

6. Plan Criteria

If plan files exist for the work just completed, check acceptance criteria:

  • Read each criterion
  • Verify whether it was met (by reading code, not re-running tests)
  • Flag any unmet criteria

Report

Present findings as a short checklist:

  • Clean, no issues found (say so and stop)
  • Fix, items that need correction (damaged fixtures, stale refs, debug artifacts)
  • Note, items worth awareness but not blocking (scope bleed, unrelated changes)

Read the full file on GitHub · 87 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. 3d ago First seen · 87 lines · 17 tokens per session scan A 274409de477f

Subscribe to this mod's changes

sweep is a skill published in the GitHub repository tslateman/duet (1 stars, last pushed 7d ago), licensed MIT. It adds 17 tokens to every session and 607 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.