Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add Borda/AI-Rig/plugin install researchWrote 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.
[](https://agentmods.dev/skills/borda/ai-rig/sweep)<a href="https://agentmods.dev/skills/borda/ai-rig/sweep"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/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.
<a href="https://agentmods.dev/skills/borda/ai-rig/sweep"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/sweep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.08954 |
| Opus 5.5 | $0.00020 | $0.03582 |
| Sonnet 5.5 | $0.00010 | $0.01791 |
| Haiku 4.5 | $0.00005 | $0.00895 |
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 14d 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.
How it starts
The opening of the file, as written. The whole thing — 381 lines — stays where its author put it; the contents beside it link to each section on GitHub.
End-to-end research pipeline: auto-plan → judge gate with J4 per-command execution approval → run. Single command from goal to result. Accepts goal string, passes all run/colab/team flags.
NOT for: interactive planning (use /research:plan); methodology review only (use /research:judge); running already-approved plan (use /research:run).
- Key boundaries: end of S2 — program.md written and confirmed; end of S3 — judge+refinement verdict settled.
- Preserve at S2: program-path (output of plan), GOAL string, OUT path (TMPDIR key), active sweep token printed at entry.
- Mid-loop refresh: after each S3 fix-apply the contract is rewritten with refine-iter/no-fixes-iter/last-verdict (placed after fixes so the "fixes applied" claim is true) — a mid-loop compaction resumes at the current iteration instead of restarting REFINE_ITER=0.
- Preserve at S3: judge verdict, JUDGE_REPORT path, program-path, GOAL.
- Clear at sweep entry (stale prior run) and every terminal exit, including stops before S5.
Before Agent Resolution, clear stale sweep state:
PLUGIN_ROOT=$(python "${CLAUDE_PLUGIN_ROOT}/bin/resolve_plugin_root.py" --plugin-name research) || exit $?; export PLUGIN_ROOT
export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}"
rm -f .temp/state/skill-contract.md "${TMPDIR:-/tmp}/sweep-out-path-${CSID}" "${TMPDIR:-/tmp}/sweep-run-args-${CSID}" # sweep entry cleanup — stale state must not mark a new invocation as inlined # timeout: 5000
SWEEP_TOKEN=$(python "$PLUGIN_ROOT/bin/make_run_dir.py" sweep .experiments) || exit 1 # timeout: 5000
printf '%s\n' "$SWEEP_TOKEN" > "${TMPDIR:-/tmp}/sweep-active-token-${CSID}"
echo "SWEEP_TOKEN=$SWEEP_TOKEN"
Before every terminal exit (completion, abort, blocked, unresolved stop, load/validation/tool failure, or a stop inside an inlined skill), execute the S5 exit cleanup block below before printing the final reply. This applies to every stop instruction in S1–S5 and the loaded plan, judge and run steps. Pausing for an answer or compaction is not a terminal exit: keep the active sweep state until it resumes or terminates.
Before executing any loaded judge or run block or writing a sweep compaction contract, substitute this invocation's printed SWEEP_TOKEN for <active-sweep-token>. Every sweep contract's preserve field must include sweep-token=<active-sweep-token> with that literal value substituted, so a resumed sweep retains its invocation identity. Never derive that trusted substitution from a pre-existing sentinel; standalone judge/run leave the placeholder unset. The sentinel is only the equality check against the active invocation's token.
Agent Resolution
Agent resolution: load and follow the protocol below. Contains: foundry check + fallback table. Foundry not installed → substitute each foundry:X with general-purpose per table.
# loads: compaction-contract.md
PLUGIN_ROOT=$(python "${CLAUDE_PLUGIN_ROOT}/bin/resolve_plugin_root.py" --plugin-name research) || exit $?; export PLUGIN_ROOT
export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}"
python "$PLUGIN_ROOT/bin/resolve_shared.py" --persist research-shared --emit agent-resolution.md || exit 1 # timeout: 5000 — cold resolve; every later site (including the judge/run steps this skill runs inline) reads the research-shared sentinel
Sweep delegates to plan (S2), judge (S3), run (S5) — see each skill's Agent Resolution for fallback handling.
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.
- 14d ago Changed · +12 lines 833cb4d831d7
- 18d ago Changed · +37 lines · +4 tokens per session 791a78c5164f
- 1mo ago Changed · +36 lines 46366e0200be
- 1mo ago Changed 55ebf00201bc
- 1mo ago Changed 702bad95bede
- 1mo ago Changed · +5 lines e5d06931d935
- 2mo ago Changed · +11 lines 30467b9d849c
- 2mo ago Changed · -4 lines af256862c0e1
- 2mo ago Changed 2fc460bea152
- 2mo ago First seen · 284 lines · 45 tokens per session scan A eb3486892b21
sweep is a skill published in the GitHub repository Borda/AI-Rig (31 stars, last pushed yesterday), licensed Apache-2.0. It adds 49 tokens to every session and 8,954 once invoked, about $0.0002 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-08-30.
sweep compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sweepBorda/AI-Rig | Skill | 31 | yesterday | Apache-2.0 | A | 49 | Claude Code |
| genomic-intelligenceK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 151 | Claude Code, Codex |
| torch-geometricK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 71 | Claude Code, Codex |
| bulk-rnaseqK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 111 | Claude Code, Codex |
| aeonK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 74 | Claude Code |
| bidsK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 84 | Claude Code, Codex |
| genimlK-Dense-AI/scientific-agent-skills | Skill | 59k | yesterday | MIT | A | 42 | Claude Code |