swarm: Command for Claude Code

.claude/commands/address_review.md

address_review is a command for Claude Code from swarm-ai-research/swarm. It costs 0 tokens per session (880 once invoked), scanned A, original, MIT.

A command that reads comments on a GitHub pull request, a proposed set of code changes for review. It applies fixes, pushes them to the branch, and replies to each comment thread.

In plain words
What is it for?
Use it to address unresolved pull-request comments, update the changed code, push the fixes, and confirm each discussion has been answered.
Why use it?
It gathers review details and turns scattered comments into a single fix-and-reply workflow. This reduces the manual work of checking files, making changes, and responding.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is swarm-ai-research/swarm's own configuration. It tells Claude Code how to work on swarm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything swarm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to swarm-ai-research/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.claude/commands/address_review.md
Clone the repo
git clone --depth 1 https://github.com/swarm-ai-research/swarm

Made for: Claude Code.

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 address_review

README.md
[![agentmods](https://agentmods.dev/badge/commands/swarm-ai-research/swarm/address_review/github.svg)](https://agentmods.dev/commands/swarm-ai-research/swarm/address_review)
Your own site
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/address_review"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/address_review/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 address_review

Your own site · 80×15
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/address_review"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/address_review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 880 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.00000 $0.00880
Opus 5 $0.00000 $0.00440
Sonnet 5 $0.00000 $0.00176
Haiku 4.5 $0.00000 $0.00088

Measured 10d ago against content hash 42cf05c1448d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

address_review 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 10d 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.

.claude/commands/address_review.md · 105 lines

How it starts

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

/address-review

Fetch review comments on a GitHub PR, apply fixes, push, and reply to each comment thread.

Usage

/address-review [pr-number] [--repo owner/repo]

Examples:

  • /address-review (auto-detect from current branch or most recent open PR by --author=@me)
  • /address-review 11
  • /address-review 11 --repo The-Vibe-Company/companion

Behavior

1) Find the PR

  • If <pr-number> and --repo are provided, use them directly.
  • If only <pr-number> is provided, use the current repo's remote.
  • If neither is provided:
    • Check if the current branch tracks a PR: gh pr view --json number,url
    • If not, search across all repos: gh search prs --author=@me --state=open --limit 10
    • Present matches and let the user pick.

2) Fetch review context

Run in parallel:

  • get_pull_request — title, body, head/base refs, head SHA
  • get_pull_request_reviews — review summaries
  • get_pull_request_comments — inline review comments (the actionable items)
  • get_pull_request_files — changed files list

3) Present comment summary

Display a table of unresolved review comments:

| # | File | Line | Author | Issue |
|---|------|------|--------|-------|
| 1 | src/api/bridge.ts | 90 | copilot | requestIndex memory leak |
| 2 | src/api/bridge.ts | 190 | copilot | ensureController race condition |

If there are no review comments to address, report that and stop.

4) Clone or locate the source

  • Determine the head repo (fork) from the PR's head.repo.clone_url.
  • If the head repo matches the current working directory's remote, work in place.
  • Otherwise, clone to /tmp/<repo-name> and checkout the PR branch.
  • If already cloned from a previous run, git fetch && git checkout <branch> && git pull.

5) Apply fixes

For each review comment:

  • Read the relevant file and surrounding context.
  • Determine the fix. If a comment includes a code suggestion block, prefer adopting it.
  • Apply the edit.
  • Track: { comment_id, file, description_of_fix } for the reply step.

Read the full file on GitHub · 105 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. 10d ago First seen · 105 lines · 0 tokens per session scan A 42cf05c1448d

Subscribe to this mod's changes

address_review is a command published in the GitHub repository swarm-ai-research/swarm (42 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 880 tokens. 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.