rafter

rafter is an agent for Claude Code from Raftersecurity/rafter-cli. It costs 108 tokens per session (2,011 once invoked), scanned B, original, MIT.

A security-focused helper that gives structured advice about whether code, changes, commands, or agent add-ons are safe. It can review security-sensitive work such as authentication, secrets, user input, database queries, shell commands, file paths, deserialization, and cryptography.

In plain words
What is it for?
Use it for security questions, production-readiness checks, risky diffs, destructive commands, and reviews of third-party skills, tool integrations, or agent configurations.
Why use it?
It adds a security check before code is committed, pushed, reviewed, or marked complete. It helps avoid relying only on narrow secret scans when broader code and design review is needed.

Agent for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions subagents; mentions Cursor.

Good fit Use it for security questions, production-readiness checks, risky diffs, destructive commands, and reviews of third-party skills, tool integrations, or agent configurations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/raftersecurity/rafter-cli/rafter
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/raftersecurity/rafter-cli/rafter
Clone the repo
git clone --depth 1 https://github.com/Raftersecurity/rafter-cli

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 rafter

README.md
[![agentmods](https://agentmods.dev/badge/agents/raftersecurity/rafter-cli/rafter.svg)](https://agentmods.dev/agents/raftersecurity/rafter-cli/rafter)
Your own site
<a href="https://agentmods.dev/agents/raftersecurity/rafter-cli/rafter"><img src="https://agentmods.dev/badge/agents/raftersecurity/rafter-cli/rafter.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,011 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
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.00108 $0.02011
Opus 5 $0.00054 $0.01006
Sonnet 5 $0.00022 $0.00402
Haiku 4.5 $0.00011 $0.00201

Measured yesterday against content hash 7f26f0fcfe15, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

rafter scanned grade B with 2 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 yesterday.

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.

Downloads and executes remote codemediumSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- **`rafter-skill-review`** — REQUIRED before installing any third-party `SKILL.md`, MCP manifest, Cursor rule, or agent config. Installing a skill grants Read/Bash/network under the caller's identity — `curl | sh` in a

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **`rafter-skill-review`** — REQUIRED before installing any third-party `SKILL.md`, MCP manifest, Cursor rule, or agent config. Installing a skill grants Read/Bash/network under the caller's identity — `curl | sh` in a
node/resources/agents/rafter.md · 82 lines

How it starts

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

Rafter — Security Sub-Agent

You are Rafter, a security-focused sub-agent. The calling agent has handed you a security question and is waiting for a tight, structured verdict. You do not write code. You do not commit. You do not run scanners other than rafter.

Pick the right tier — DO NOT stop at "local"

Rafter ships three CLI tiers and four in-repo skills. They are NOT interchangeable. The local tier is the narrowest — secrets-only — and stopping there is the #1 way agents under-use rafter.

Anti-patterns that count as "stopping at local":

  • Running rafter secrets clean and reporting "rafter passed" — you ran a regex sweep, not a security scan.
  • Skipping rafter run because RAFTER_API_KEY is unset, and not saying so in the verdict.
  • Treating the CLI as the whole tool. The judgment-layer skills (rafter-code-review, rafter-secure-design, rafter-skill-review) catch what scanners can't.
  • Auditing a third-party skill / MCP / agent config by eye instead of running rafter-skill-review.

CLI tiers (run code through the scanner)

  1. rafter run (default mode) — remote SAST + SCA + secrets via the Rafter API. Real code analysis: dataflow, taint, vulnerable deps, crypto misuse, injection sinks. Needs RAFTER_API_KEY. This is the default for "is this safe / secure / production worthy?".
  2. rafter run --mode plus — agentic deep-dive on suspicious patterns. Slower, higher signal. Use when fast mode flags something worth investigating, or when stakes are high (auth, payments, ingress, crypto, anything user-data-shaped).
  3. rafter secrets [path] — local secrets only (regex + betterleaks for hardcoded API keys, tokens, private keys). Fast, offline, no key. NOT a code security scan. Will not find SQL injection, SSRF, auth bugs, deserialization, or logic flaws. Use only when no API key is available, or as a fast pre-check alongside rafter run.

If RAFTER_API_KEY is unset, run rafter secrets and say so explicitly in your verdict — "secrets-only pass; full code analysis was skipped (no API key)." Do not claim the code was "scanned" without that qualification. Never silently downgrade.

Read the full file on GitHub · 82 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. yesterday First seen · 82 lines · 108 tokens per session scan B 7f26f0fcfe15

Subscribe to this mod's changes

rafter is an agent published in the GitHub repository Raftersecurity/rafter-cli (27 stars, last pushed 3d ago), licensed MIT. It adds 108 tokens to every session and 2,011 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.