From sweeper
Orchestrates sweeper CLI to dispatch parallel AI sub-agents for lint fixes, test repairs, migrations, and refactoring with VM isolation and telemetry-driven learning.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sweeper:sweeperThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You orchestrate the **sweeper** CLI to run parallel AI sub-agents against a codebase with optional VM isolation and swappable providers (Claude, Codex, Ollama/local models). While lint fixing is the default, the same loop handles test repairs, dependency migrations, refactoring, and any task where you can run a command, parse issues, and dispatch agents to fix them. Sweeper's JSONL telemetry re...
You orchestrate the sweeper CLI to run parallel AI sub-agents against a codebase with optional VM isolation and swappable providers (Claude, Codex, Ollama/local models). While lint fixing is the default, the same loop handles test repairs, dependency migrations, refactoring, and any task where you can run a command, parse issues, and dispatch agents to fix them. Sweeper's JSONL telemetry records every fix attempt (outcome, strategy, round, tokens), enabling you to learn from past runs and optimize token spend. When the paper CLI is installed, sweeper launches claude sub-agents via paper start claude, so paper's gateway manages auth and captures each session — no sweeper configuration required.
The sweeper binary must be in PATH. Build it if needed:
cd /path/to/sweeper && go build -o sweeper . && export PATH="$PWD:$PATH"
If no sweeper.md exists in the working directory, gather this information:
.)golangci-lint run --out-format=line-number ./...)3)3)Then create a session document:
sweeper.md - Living Session Document# Sweeper Session
**Started:** <ISO timestamp>
**Objective:** Fix all lint issues in `<target>`
**Linter:** `<command>`
**Concurrency:** <n> sub-agents
**Max rounds:** <n>
**VM:** <yes/no>
**Constraints:** <constraints>
## Status
- Round: 0
- Issues found: (pending first run)
- Issues fixed: 0
- Token spend: (pending — run `sweeper observe` after first run)
## What's Been Tried
(Updated after each round)
## Token Budget
(Updated via `sweeper observe` after each run)
Commit on a new branch: sweeper/<goal>-<date>
Use the CLI to orchestrate the full loop. The CLI handles linting, parsing, parallel sub-agent dispatch, retry escalation, and telemetry. Session capture is handled by paper when its CLI is installed (sweeper launches claude via paper start claude).
# Default: golangci-lint with claude (default provider)
sweeper run
# Custom linter
sweeper run -- npm run lint
# Multi-round with escalation
sweeper run --max-rounds 3
# High concurrency in VM isolation
sweeper run --vm -c 5 --max-rounds 3 -- npx eslint --quiet .
# Preview what would be fixed
sweeper run --dry-run
# Use OpenAI Codex CLI instead of Claude
sweeper run --provider codex -- npm run lint
# Use a local Ollama model (no API key needed)
sweeper run --provider ollama --model qwen2.5-coder:7b
# Ollama with custom API base
sweeper run --provider ollama --model codellama --api-base http://gpu-server:11434
Available providers: claude (default, CLI), codex (CLI), ollama (API). CLI providers have built-in file tools. API providers include file content in the prompt and apply returned diffs. VM isolation (--vm) only works with CLI providers.
# Ephemeral VM — boots before sweep, tears down after
sweeper run --vm -- npx eslint --quiet .
# Reuse existing VM
sweeper run --vm-name my-vm -- cargo clippy 2>&1
Use --vm when:
Each sweeper run executes this loop:
standard — straightforward fixretry — different approachexploration — refactor surrounding code--concurrency)prompt_tokens/output_tokens) logged to .sweeper/telemetry/ JSONLSweeper's JSONL telemetry is the backbone for self-learning. Every fix attempt is recorded with its outcome and token usage.
sweeper observe
This shows:
Before starting a sweep, check historical performance:
sweeper observe --target /path/to/project
Use the insights to tune your run:
--max-rounds 1 saves tokens--stale-threshold to skip stagnant files fasterAfter each run, update sweeper.md with token spend from sweeper observe:
## Token Budget
- Run 1: 45,230 prompt + 12,100 completion = 57,330 total
- Run 2: 31,000 prompt + 8,200 completion = 39,200 total (31% reduction)
- Trend: improving — retry prompts getting more targeted
The goal is to fix more issues with fewer tokens over time. Telemetry makes this measurable.
If sweeper.md already exists when you start:
sweeper observe to check recent success patterns--max-rounds and --concurrency based on sweeper observe insightsAfter each sweeper run completes, update the session document:
sweeper observe and record token spendsweeper.mdnpx claudepluginhub pcc-labs/sweeper --plugin sweeperApplies automated refinement loop to audit, optimize, and reduce entropy in codebase artifacts via iterative contraction mapping and fixed-point convergence.
Reviews Claude Code plugins, skills, codebases, and docs in modes like quick scans, git commit tidying, deep skill analysis, holistic cross-plugin checks, and docs consistency.
Runs an orchestrator-pattern build on any codebase: decomposes goals into waves, dispatches parallel subagents, verifies between waves, and commits incrementally. For large tasks, overnight builds, or open-ended improvements.