sweep
Skill82 starsChanged 30 days agoApache-2.0View on GitHub
Deploy parallel agents to scan the SwarmLLM codebase for dead code, duplication, inconsistencies and stale references, then fix the obvious ones
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 10 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
- iamneilroberts/claude-skills★ 26same name
- jisuzzzz/haechi★ 17same name
- leek/agent-skills★ 5same 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.
The file
Files
Codebase Sweep
Four parallel sonnet feature-dev:code-reviewer agents, one category each. They only READ, so no worktree
isolation (every subagent already starts with a fresh context; a worktree only isolates files).
Prior findings — by grep, never pasted
.claude/sweep-log.jsonl holds every finding ever made (~470 KB, 1.5k lines). Never paste it into a prompt — that is
~110K tokens per agent. Tell each agent: before reporting a finding, search .claude/sweep-log.jsonl for the
file or symbol with the Grep tool; drop it if a fixed or wontfix entry covers it. (The reviewer agents
have Grep, Glob and Read, but no Bash.)
Rotation
YOU compute each agent's file list and paste it into its prompt — the agents cannot run find. Offset =
(line count of the sweep log ÷ 10) mod file count; agents 1 and 3 take find src/ -name '*.rs' | sort from
that offset, agents 2 and 4 find frontend/js/ -name '*.js' | sort, wrapping around.
Docs drift — run it yourself first (seconds, no agent)
python3 examples/docs_drift.py --memory checks mechanically what agents read past: every backticked name a
doc cites still exists, a module::path::item is defined under that path, each DIAGNOSTICS DIAG row's level
and fields match its tracing call, every file.md § "Heading" resolves. It is a report — read each line
(proposals and other projects' names are legitimately absent), fix the real ones, log the rest wontfix.
Agent 4 then spends its budget on prose and numbers, not names.
Agents (launch all four in one message, model: sonnet, effort: high)
- Dead code + stale references — pub items with no external caller, unreachable arms, comments naming
removed code,
#[allow(dead_code)]hiding a real warning. - Duplication — near-identical blocks (>5 lines), one transformation done in several places, duplicate fetches or DOM patterns in the frontend.
- Consistency — an error type chosen at a call site, unbounded collections, unvalidated API input, magic
numbers, unstructured
tracingcalls. - Frontend + i18n + docs — English bypassing
I18n.t(), dead CSS/JS, doc comments ordocs/text that no longer match the code.
Each finding: file, line, what is wrong, confidence ≥ 80%. Not test-only code, not an item listed in
docs/ARCHITECTURE.md § "Deferred Items", and "0 new issues" is a valid result — never manufacture one.
After the agents return
- Deduplicate, then verify every finding yourself before acting — see "Verify before deleting" below.
- Fix what is obvious and low-risk immediately, committing as you go. For the rest, research (diagnosis rule 0) and decide — you manage this project; raise with the user only what needs their hands.
- Append one line per addressed finding to
.claude/sweep-log.jsonl:{"file":"…","line":N,"kind":"…","summary":"…","status":"fixed|wontfix|deferred","date":"YYYY-MM-DD"}
Verify before deleting
Sweep agents report dead code / orphaned keys with confidence ≥80%, but their grep may miss call sites in adjacent directories (R120 caught Agent 4 missing 6 enc.* callers in init.js, core/utils.js, chat.js). Before deleting anything an agent flagged:
grep -rn "thing_name" frontend/js/ frontend/index.html frontend/css/ # full frontend
grep -rn "thing_name\b" src/ tests/ crates/ # word-boundary; catches re-exportsCheap to verify; expensive to mis-restore. If callers exist, log as wontfix in .claude/sweep-log.jsonl to prevent re-report.
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.

