sweep

sweep is a skill for Claude Code from YSAA1/harness-workflow. It costs 76 tokens per session (1,647 once invoked), scanned A, original, MIT.

A command for checking a whole repository against its task records, produced files, recovery information, and untracked leftovers. It compares written status with what actually exists in the repository and groups findings by type.

In plain words
What is it for?
Use it for an occasional repository-wide audit, not as the normal final step of a task. It can inspect status files, task plans and reports, Git worktrees, references, and untracked files.
Why use it?
It helps find orphaned task files, stale blocked work, inconsistent status records, and untracked leftovers. Unclear cases are presented with evidence for a person to decide rather than being treated as errors automatically.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions AGENTS.md.

Part of the harness-workflow plugin — 17 skills shipped together

Good fit Use it for an occasional repository-wide audit, not as the normal final step of a task. It can inspect status files, task plans and reports, Git worktrees, references, and untracked files.

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

Made for: Claude Code.

Or install harness-workflow, the plugin that ships this one along with the rest of its 17 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 sweep

README.md
[![agentmods](https://agentmods.dev/badge/skills/ysaa1/harness-workflow/sweep/github.svg)](https://agentmods.dev/skills/ysaa1/harness-workflow/sweep)
Your own site
<a href="https://agentmods.dev/skills/ysaa1/harness-workflow/sweep"><img src="https://agentmods.dev/badge/skills/ysaa1/harness-workflow/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/ysaa1/harness-workflow/sweep"><img src="https://agentmods.dev/badge/skills/ysaa1/harness-workflow/sweep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,647 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.00076 $0.01647
Opus 5.5 $0.00030 $0.00659
Sonnet 5.5 $0.00015 $0.00329
Haiku 4.5 $0.00008 $0.00165

Measured 1mo ago against content hash ad55133a164b, 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 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.

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-en/sweep/SKILL.md · 54 lines

How it starts

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

Sweep

Repo-wide reconciliation: bring task artifacts, recovery-surface state, and repository leftovers into a single ledger. Detection relies on the checklist, conviction relies on evidence, and ambiguous items go to human adjudication.

This skill is the on-demand entry for low-frequency global reconciliation; it does not do task close-out (close-out goes to cleanup). It complements the retirement contract (the AGENTS.md write-side discipline): when leak-plugging at the source operates normally, this skill most often ends with zero modifications. The target project has no health-check script gate — the inline reconciliation checklist in this file is the equivalent compensation, relying on no script outside the repository.

Process

  1. Probe the recovery surface (measured, not assumed): inventory the actual file set of .harness/ (commonly the three files, but heterogeneous forms such as decisions/progress also occur). Present → root set = outbound links of all state files + persistent entries (AGENTS.md, root README, docs/README-like files). No .harness/, or the project uses a tracker/existing backend → degrade to scanning only task-artifact orphans and untracked leftovers, explicitly declaring "the .harness state surface is missing" (for tracker/existing the recovery surface is the tracker itself, which is not a case of missing), and do not fabricate state criteria (a third-party project may never have created .harness). When state is unparseable, skip the state-contradiction check and say so; do not draw orphan conclusions.
  2. Reconciliation checklist (the manual version sharing the same criteria as the recovery-surface lint of the harness-workflow method repo; runs in target projects that lack the script):
    • State contradictions: whether state's Status matches the corresponding work_index row; whether the track pointed to by state is registered.
    • Existence: whether the primary artifact of an active/blocked row exists (in the file system or within the trees registered by git worktree list; a hit in either counts as existing).
    • Reachability: for each task artifact (plans/specs/reports), grep -F its basename across all files in the root set; zero mentions = orphan candidate; basename matching guards against bare-filename false positives.
    • untracked (unique to sweep, not checked by the lint): listed via git status --porcelain, already-ignored entries removed via git check-ignore -v, grouped by directory/theme.
  3. Six-bucket classification:
    • ① Task-artifact orphans: convict tracked ones via triple-evidence conviction — zero mentions in the root set + git log --follow origin tracing + same-directory cross-references; spec/plan paired artifacts (shared slug) are adjudicated as a group, preventing deleting a spec while leaving its plan; reports-type items with "zero references + README declared non-authoritative" can be charged directly. Self-registered-deliverable guard: research logs (header carries Track self-registration, terminal state written) and review reports (landed in docs/reviews/, header carries an ownership declaration) are self-registered deliverables — zero references does not convict them directly; after triple-evidence conviction they are downgraded to needs-review for human adjudication, never auto-deleted.
    • ② Zombie blocked rows: not only literally blocked — paused / awaiting-user-confirmation / blocked-by-policy and other equivalent forms are all filed, listing the freeze starting point and duration.
    • ③ Half-flipped rows: any row whose status conflicts with actual progress/timeline qualifies; no online verification needed. Two forms: an active/blocked row superseded by a later task but not flipped (e.g., the GPU/directory the old row occupied has been taken over by a new task); a row already flipped to complete but with the four retirement steps unfinished — the plan/Spec derivative documents it links out to still remain under docs/ (a dead pointer on a complete row is the normal state of an already-retired row; the artifact being a live file does not count either).
    • ④ untracked leftovers: never deleted; only list evidence + an either/or outlet (add a commit or add a .gitignore entry); directories with tracked precedent (e.g., artifacts/) default to commit candidates; directories containing registered worktrees are listed separately as high-risk — git worktree remove must happen before any disposition can be discussed; never directly ignore/delete.
    • ⑤ Archive directories (docs/archive/ and the like): only inventoried and marked; their contents always go to needs-review for human adjudication, never into the deletable bucket.
    • ⑥ Recovery-surface files overstepping their remit: state exceeding its snapshot role, decisions/lessons double bookkeeping → distill into lessons then truncate/merge; genealogy-style entries compressed into a single lineage table; among multiple copies of the same rule, keep only the one in lessons.
  4. Disposition: mechanical items (flipping status, deleting convicted orphans) are fixed automatically; ambiguous items (abandoned vs paused, where unfinished items go) list evidence for user adjudication — no adjudication, no deletion (conservative stop).
  5. Four retirement steps (same as the AGENTS.md write-side discipline, completed within one commit; historical complete-but-not-retired residue found in ③ is likewise made up): flip the row → lessons inheritance (distill first) → delete this track's plan/Spec documents, including unapproved and abandoned ones (precondition = already committed to the main tree and lessons inheritance done; in-degree guard = only delete documents whose sole inbound edge comes from this retiring track; for multi-edge documents flip the pointer instead of deleting; ADRs are never deleted, add superseded-by) → state syncs by flipping Status.
  6. Report: with no drift, end with zero modifications.

Read the full file on GitHub · 54 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 Changed · +4 tokens per session ad55133a164b
  2. 1mo ago First seen · 54 lines · 72 tokens per session scan A ded184c146f1

Subscribe to this mod's changes

sweep is a skill published in the GitHub repository YSAA1/harness-workflow (3 stars, last pushed 16d ago), licensed MIT. It adds 76 tokens to every session and 1,647 once invoked, about $0.0003 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-09-21.

Related

Other skills, from other repositories

comet-github-idea-to-issue

A workflow for turning a local idea, bug observation, or improvement proposal into a focused GitHub Issue draft. GitHub Issues are shared records for bugs, features, questions, and maintenance work.

rpamis/comet · 68 tokens

merge-review

Reviews pending fleet worktree merges before they're accepted. Reads the merge-check queue, detects file-level conflicts between branches, proposes a safe merge order, and surfaces reconciliation plans for overlapping changes.

SethGammon/Citadel · 40 tokens

ijfw-ship

Use when the user says 'ship it', 'ship this', 'release', 'publish', 'launch', 'deploy', 'go live', 'wrap this up', 'time to ship', or invokes '/ijfw-ship'. Domain-aware release — software (test → tag → push → publish), book (final edit → format → KDP / agent / Substack), campaign (review → schedule → launch →…

FerroxLabs/ijfw · 139 tokens

jira

Jira integration — view issues, generate branches, create tickets, transition status. Use when: user mentions Jira ticket key (XX-123), says /jira, wants to create branch from ticket, create a new ticket, or update Jira status. Not for: GitHub issues (use issue-analyze).

sd0xdev/sd0x-harness · 64 tokens

lov-rename-project

A project-renaming workflow that updates a product or repository name across source files, configuration, and documentation. It produces a reviewable plan and preserves compatibility-sensitive names and references where needed.

lovstudio/skills · 45 tokens

lov-gh-tidy

Interactive GitHub repo hygiene skill. Lists all open issues, PRs, stale branches, and orphan labels, shows a summary of each with analysis, then asks the user how to handle each item (close, merge, comment, delete, keep). Executes all chosen actions via gh CLI. Use when the user says "清理 GitHub", "tidy repo", "clean…

lovstudio/skills · 95 tokens