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.
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.claude/commands/security_review.mdgit clone --depth 1 https://github.com/swarm-ai-research/swarmWrote 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/commands/swarm-ai-research/swarm/security_review)<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/security_review"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/security_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.
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/security_review"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/security_review.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.00000 | $0.00666 |
| Opus 5 | $0.00000 | $0.00333 |
| Sonnet 5 | $0.00000 | $0.00133 |
| Haiku 4.5 | $0.00000 | $0.00067 |
Grade A, and why
security_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 9d 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 — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/security-review
Perform a security-focused code review of the current branch's changes against main.
Usage
/security-review
Behavior
Phase 1: Gather context
- Run
git statusandgit log --oneline main..HEADto understand the branch scope. - Run
git diff main...HEADto get the full diff. - Identify modified files and their languages/frameworks.
- Use file search tools to understand existing security patterns in the codebase (sanitization helpers, auth middleware, validation patterns).
Phase 2: Identify vulnerabilities
Launch a subagent to analyze the diff for security issues. Focus on:
- Input validation: SQL injection, command injection, path traversal, XXE, template injection
- Auth/authz: authentication bypass, privilege escalation, session flaws, JWT issues
- Crypto: hardcoded secrets, weak algorithms, improper key management
- Code execution: unsafe deserialization (pickle, YAML), eval/exec injection, RCE
- Data exposure: PII logging, sensitive data in responses, debug info leakage
- Web: XSS (only if using
dangerouslySetInnerHTMLor similar), CSRF, SSRF (host/protocol control only)
Only flag issues with >70% confidence of actual exploitability. Skip:
- DOS / resource exhaustion
- Secrets on disk (handled by
/preflight --secrets) - Rate limiting concerns
- Theoretical race conditions
- Log spoofing
- Path-only SSRF
- Regex injection/DOS
- Missing hardening (only flag concrete vulns)
- Test-only code
- Environment variables and CLI flags (trusted inputs)
- Client-side JS/TS auth checks (server responsibility)
Phase 3: Validate findings
For each candidate vulnerability, launch a parallel validation subagent that:
- Reads the actual source code at the flagged location
- Traces the data flow from input to sink
- Checks if the input is attacker-controlled vs config/env (trusted)
- Checks if existing sanitization/validation already mitigates the issue
- Assigns a confidence score (1-10):
- 1-3: Likely false positive
- 4-6: Needs investigation
- 7-10: Likely true vulnerability
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.
- 9d ago First seen · 80 lines · 0 tokens per session scan A b50e34f0cfea
security_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 666 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.
Other commands, from other repositories
review-branch
Review the current branch's diff against base by dispatching atomic-reviewer. No orchestration loop, no spec required — pre-flight before /commit pr or /commit merge.
init
Install the formatters this repository needs, with every command visible before it runs.
rev
Invoke Code Reviewer for code quality, security, requirements validation, and best practices review.
audit
Run a structured project audit (security / performance / code-review / deploy-checklist / DB-performance / design-review) with FP recheck, allowlist suppression, and a mandatory Council pass.
watch-and-fix
Watch a PR, fix issues from AI reviews, and auto-merge when ready.
peer-review
Review a jj change for production readiness.