sweep
Skill5 starsChanged 10 days agoMITView on GitHub
Find, prove, and fix one unnoticed problem per cycle, one PR each.
21 other projects use a version of this.
Adopted by
Most recently taken up by
- ronniepinnell/caspertheir own version, first seen Nov 8, 2026
- AsiaOstrich/EngramGraphtheir own version, first seen Nov 8, 2026
- jisuzzzz/haechitheir own version, first seen Nov 8, 2026
- venhdev/skillstheir own version, first seen Nov 1, 2026
- AsiaOstrich/universal-dev-standardstheir own version, first seen Nov 1, 2026
- YSAA1/harness-workflowtheir own version, first seen Oct 30, 2026
Used with
Projects with it also use incident, adr and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JkudjoSkillincident
Production incident response — structured triage, hypothesis tree, safe remediation, incident record
Also in 3 projects that use this
asterkinSkilladr
Create Architecture Decision Records (ADRs) following project standards. Guides template usage, process, and best practices for documenting architecturally significant decisions.
Also in 4 projects that use this
anombyte93Skilldiscover
Phase 1 of the prd-taskmaster pipeline: brainstorm-driven discovery. Delegates to superpowers:brainstorming in Interactive Mode (one adaptive question at a time), or self-brainstorms in Autonomous Mode when no user is present. Intercepts before the brainstorming chain hands off to writing-plans — this skill owns the exit. Extracts constraints, calibrates scale (Solo / Team / Enterprise), and advances the pipeline to GENERATE.
Also in 3 projects that use this
GitHubSkillrefactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Also in 5 projects that use this
MicrosoftSkilldiagnose
Use to systematically diagnose why scenarios fail — identifies root causes by analyzing agent traces, codebase, and behavioral patterns
Also in 4 projects that use this
nicolasestremSkillbrainstorm
Structured idea generation and solution exploration with systematic analysis.
Also in 4 projects that use this
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- fallow-rs/fallow★ 5.3ksame name
- simota/agent-skills★ 96same name
- optave/ops-codegraph-tool★ 94same name
- AsiaOstrich/universal-dev-standards★ 84same name
- enapt/SwarmLLM★ 82same name
- iamneilroberts/claude-skills★ 26same name
- jisuzzzz/haechi★ 17same name
- AsiaOstrich/EngramGraph★ 4same name
- YSAA1/harness-workflow★ 3same name
- drewdrewthis/claude-skills★ 2same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository57 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architecture-satisfactionSkill
- autopilotSkill
- browser-testSkill
- chatter-scoutSkill
- closeoutSkill
- codebase-designSkill
- code-reviewSkill
- code-smells-auditSkill
- commitSkill
- dependency-auditSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- fix-ci-failuresSkill
- fix-github-issuesSkill
- fix-nightwatch-issuesSkill
- fix-posthog-issuesSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- harness-toolsSkill
- housekeeperSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- laravel-herd-worktreesSkill
- panelSkill
- prototypeSkill
- prSkill
- prune-testsSkill
- releaseSkill
- repository-cleanupSkill
- researchSkill
- resolve-review-commentsSkill
- resolving-merge-conflictsSkill
- retroSkill
- run-afterSkill
- scratch-cleanupSkill
- scratch-statusSkill
- setupSkill
- tddSkill
- teachSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- triage-github-prSkill
- triageSkill
- ui-designSkill
- upgrade-planSkill
- verifySkill
- wait-whatSkill
- wayfinderSkill
- which-skillSkill
- wizardSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Widen before you give up: When the top candidates are all covered, go down the priority list and into code that no recent PR touched.
- Very specific: line 27
Focus areas: every other token. A quoted phrase is one area: /sweep "session notes" perf.
- Very specific: line 44
Read AGENTS.md / CLAUDE.md, the rule files they point to, and .agents/domain.md when it exists.
- Distinctive: line 56
Keep discovery cheap: inventories first, then drill into strong evidence.
- Distinctive: line 70
Before you edit, establish all of these, or drop the candidate:
- Distinctive: line 88
Fix: Look for an existing abstraction first, and reuse or extend it.
- Distinctive: line 90
Checks: Run the checks the repo requires, in its order, on the changed paths only.
- Distinctive: line 96
Follow references/submit.md: review the diff, rerun the ledger for PRs opened during the cycle, commit, push, open the PR, label it, and …
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sweep
Each cycle finds the highest-value issue you can prove, fixes its root cause, verifies the fix, and opens one PR against the default branch. One cycle, one issue, one PR.
Invoking this skill authorizes, per cycle: a branch and worktree, commits, pushing that branch, and opening and labeling its PR. It does not authorize merging, deploying, any production write, pushing to the default or a deploy branch, or deleting a pushed branch.
Every run finds something new
The skill runs again and again on the same repo. Its PRs from earlier runs stay open for days.
- Earlier work removes candidates. It never ends the run. An open PR, a kept
sweep/*branch, a leftover worktree, or a dirty main checkout is not a reason to stop or to reuse anything. Drop the candidates that earlier work covers, and keep looking. - Widen before you give up. When the top candidates are all covered, go down the priority list and into code that no recent PR touched. Look again at production signals over a longer time range.
- Never invent. Pressure to find something new never lowers the evidence bar in Prove one issue. Do not reword a covered issue, split one fix into two PRs, or promote a style preference or a hypothetical risk. A run that searched widely and found nothing provable ends with no PR and a report of what it examined. That is a correct result.
Arguments
Parse these before any discovery. On invalid input, stop and report it.
- Count: one whole number from 1 to 10. Without a count, run 1 cycle. A second number,
0, a negative number, or a decimal is invalid. Treat a count above 10 as 10, and say so. - Focus areas: every other token. A quoted phrase is one area:
/sweep "session notes" perf. With no areas, every category qualifies.
| Focus area | Category |
bug, bugs, production | broken production behavior, user-facing errors, wrong logic or data handling |
ci, tests, coverage | CI, test, or static-analysis failures; important untested behavior |
ux, ui, accessibility | interface and accessibility problems |
security, reliability | security or reliability problems |
performance, perf | measured performance problems |
observability, errors | error-handling and observability gaps |
refactor, architecture, dry, tech-debt | maintainability, layering, duplicated logic |
polish | best-practice violations, code smells, minor polish |
Any other area is a product area (billing, scheduling). Confirm by search that it names real code (a directory, model, or domain term), otherwise stop and report it. Categories combine as a union, product areas as a union, and a category plus a product area as an intersection (perf billing means a performance problem in billing). Focus restricts what qualifies. It never relaxes the evidence bar.
1. Load context and known work
- Read
AGENTS.md/CLAUDE.md, the rule files they point to, and.agents/domain.mdwhen it exists. A repo's list of usually-false review claims also rejects candidates. git fetch origin. Resolve the default branch. Every PR targetsorigin/<default>.- Save the ledger of known work to a scratch file.
<scratch>is the session scratchpad where the harness has one, otherwise$TMPDIR:
It holds every open PR, every PR merged in the last 30 days (bash <sweep-skill-dir>/scripts/known-work.sh > <scratch>/known-work.json--days Nto widen), every PR closed unmerged in the last year, the takensweep*branch names, and earlier sweep findings files. It is large, so query it. Do not read it whole:jq -r --arg p <path> '.prs[] | select(.files | index($p)) | "#\(.number) \(.state) \(.title)"' <scratch>/known-work.json - Look at production signals, read-only, through whatever connectors exist (Nightwatch, PostHog, Sentry, cloud logs and metrics). Use queries, logs, metrics, and describe/list calls only. Never exec into a container, open a database session, or run anything that can write. Check the app, environment, time range, and deployed revision. A missing source does not block an issue you can prove locally. Report the access limits.
Keep discovery cheap: inventories first, then drill into strong evidence. Do not run the whole suite or every telemetry record without a reason. Baselined static-analysis errors are not failures; one qualifies only when it reflects a real defect.
2. Prove one issue
Priority among in-focus candidates: (1) broken production behavior, (2) CI or static-analysis failures, (3) wrong logic or data, (4) significant UX, (5) security or reliability, (6) measured performance, (7) error handling or observability, (8) high-value refactors, (9) code smells, (10) polish. Weigh impact, evidence strength, and fix scope.
Check every candidate against the ledger before you spend effort on it. Query each file the fix would touch, then read the title and body (gh pr view <n>) of each hit. A candidate is covered when a ledger PR addresses the same root cause or makes the same fix:
- Open, any author: covered. Do not compete with in-flight work.
- Merged: covered if current
mainalready has the fix. If the problem still reproduces onmain, the earlier fix was incomplete. Say so in the PR. - Closed unmerged: covered. Someone declined it. Do not propose it again.
A ledger PR that touches the same file for a different reason does not cover it. A findings file from an earlier sweep is an open lead. You may take it if it still reproduces, and name its path in the PR.
Before you edit, establish all of these, or drop the candidate:
- The concrete failure, the surface it affects, and the impact.
- Evidence that it exists on current
origin/<default>: a reproducer, a failing test, a log line, or a measured baseline. Reading code and imagining a failure is not evidence. - The root cause, including the framework, vendor, config, and schema facts behind it.
- A bounded fix and a check that will show it worked.
Drop a candidate that is disproven, covered, speculative, or out of scope, then take the next one. For hard bugs and regressions, use the diagnosing-bugs loop.
3. Isolate, fix, verify
- Branch and worktree. Name the branch
sweep/<topic>(one or two words). It must not be intaken_branches, andgit ls-remote --heads origin sweep/<topic>must print nothing (it sees branches pushed since the fetch). If either hits, choose a different word or add-2; a name collision never stops the cycle. Always use a worktree from the fetched base, even when the checkout is clean, so the main checkout stays untouched:
From here on, start every command for this cycle withgit worktree add -b sweep/<topic> .claude/worktrees/sweep-<topic> origin/<default>cd <worktree path> &&(or usegit -C <worktree path>). Some harness shells do not keep the working directory between calls, and a barecomposer installorartisan make:*then lands in the main checkout. In a Laravel repo, make it runnable withlaravel-herd-worktrees' Bootstrap a bare worktree section before you run anything in it. A scratch database gets a name no checkout config uses,<app db>_sweep_<topic>, and you register it when you create it:bash <this-skill-dir>/../laravel-herd-worktrees/scripts/scratch-db.sh register <pgsql|mysql|sqlite> <database> <worktree path>(see its Scratch database registry). Record each resource the cycle creates (worktree, database, browser session, background process) for Finish the run. - Fix. Look for an existing abstraction first, and reuse or extend it. Make the smallest change that fully fixes the root cause. Keep every edit tied to the one issue.
- Prove it. For a bug, write the regression test first, through the real entry point (HTTP, Livewire, Filament, job, command, observer). It must fail before the fix and pass after; follow the
tddloop. For performance, compare measured query counts or timings. For UX and presentation, show it on the worktree's running site withverify, never a test (thetddskill's What needs a test section). For refactors and coverage, protect the behavior with tests. Never change production to reproduce. - Checks. Run the checks the repo requires, in its order, on the changed paths only. Report failures that existed before this change apart from regressions it caused.
Findings outside this issue (including severe ones out of focus): write each to the main checkout as .scratch/sweep/findings/<YYYY-MM-DD>-<topic>.md, with the frontmatter from .agents/issue-tracker.md when it exists (title, status: open, triage: needs-triage). Do not fix them, commit them, or open issues for them. /triage takes them from there.
4. Submit
Follow references/submit.md: review the diff, rerun the ledger for PRs opened during the cycle, commit, push, open the PR, label it, and wait for checks.
5. Finish the run
Run cycles one after another. Each cycle starts again at step 1, from a fresh fetch and a fresh ledger. That ledger includes the PRs earlier cycles opened, so no cycle repeats or builds on another. If a cycle fails after changing code, keep its worktree and stop the run.
At the end, stop the background processes and browser sessions the run started. Then clean up per references/submit.md#clean-up. Report one entry per cycle: the PR link and labels, the improvement, the verification and check results, and the findings files written. For a cycle with no PR, say what it examined and why nothing qualified. For a failed cycle, say which step failed and what was kept. Start each entry with ✅ PR opened, ⚠️ no PR, or ❌ failed.
The count bounds the run. To run more, invoke /sweep again or put it under /loop.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

