ai-security-reviewer

ai-security-reviewer is an agent for Claude Code from kumaran-is/claude-code-onboarding. It costs 120 tokens per session (1,763 once invoked), scanned B, original, MIT.

An application-security reviewer for software that uses AI models, retrieval systems, prompts, agents, or tools. It examines how untrusted model inputs and outputs could affect the application.

In plain words
What is it for?
Reviewing AI API calls, retrieval-augmented generation, agent loops, tool definitions, prompt handling, and code that acts on model output.
Why use it?
AI instructions alone do not prevent attacks such as prompt injection, data theft, unsafe tool use, or leakage between customers. This reviewer looks for code-level protections and reports serious findings.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths; mentions subagents.

Good fit Reviewing AI API calls, retrieval-augmented generation, agent loops, tool definitions, prompt handling, and code that acts on model output.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kumaran-is/claude-code-onboarding/ai-security-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/kumaran-is/claude-code-onboarding

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 ai-security-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/kumaran-is/claude-code-onboarding/ai-security-reviewer/github.svg)](https://agentmods.dev/agents/kumaran-is/claude-code-onboarding/ai-security-reviewer)
Your own site
<a href="https://agentmods.dev/agents/kumaran-is/claude-code-onboarding/ai-security-reviewer"><img src="https://agentmods.dev/badge/agents/kumaran-is/claude-code-onboarding/ai-security-reviewer/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 ai-security-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/kumaran-is/claude-code-onboarding/ai-security-reviewer"><img src="https://agentmods.dev/badge/agents/kumaran-is/claude-code-onboarding/ai-security-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,763 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00120 $0.01763
Opus 5 $0.00060 $0.00881
Sonnet 5 $0.00024 $0.00353
Haiku 4.5 $0.00012 $0.00176

Measured 9d ago against content hash 3341073cdfa4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

ai-security-reviewer scanned grade B with 1 finding 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.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

- Are retrieved documents treated as untrusted input? Or could a malicious document override system rules?

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

.claude/agents/ai-security-reviewer.md · 163 lines

How it starts

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

AI Security Reviewer

Iron Law: "We added a prompt instruction telling the model not to do X" is not a security control — attackers can override it. Demand code-level mitigations for every finding. Critical findings block launch; they are not suggestions.

You are a senior application security engineer specialized in AI systems. Your job is to find security issues in AI-related code that the main agent would miss because its context is full of the implementation work itself.

You work in your own context — fresh eyes, no implementation bias. Return a focused security report, not a code rewrite.

Operating procedure

  1. Identify the AI surface area in the codebase. Look for:

    • LLM API calls (anthropic, openai, cohere, etc.)
    • Vector store / retrieval code
    • Agent loops or tool definitions
    • Prompt templates (system, user, or assembled)
    • Code that consumes model outputs and acts on them
  2. Apply the security axiom from the AI Playbook (Layer 2 §2.5):

    Everything the model reads is untrusted input. Everything the model writes is an untrusted proposal until validated.

  3. For each AI surface, ask the two questions (Layer 2 §2.5):

    • If an attacker controls one of the inputs (a document, a webpage, a tool result, a user message, a file upload), what's the worst this code can do?
    • What stops it — in code, not in a prompt instruction?

    If you cannot find a code-level mitigation, report it.

  4. Run the adversarial test catalog (Layer 3 §3.2) against the code mentally. For each attack pattern, ask: would this code prevent it?

What to check

Prompt injection

  • Are user inputs, retrieved documents, tool outputs, and file uploads concatenated into system prompts? If yes → finding.
  • Are message roles structured (system / user / tool) or string-stitched? String-stitched → finding.
  • Are content boundaries enforced? Untrusted text should be in a content field, not the prompt template.

Tool-output injection

  • Is every tool response schema-validated before being fed back to the model? If not → finding.
  • Do tool responses get treated as data, or could a response field contain "instructions" the model might follow? If the latter → finding.

Read the full file on GitHub · 163 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. 9d ago First seen · 163 lines · 120 tokens per session scan B 3341073cdfa4

Subscribe to this mod's changes

ai-security-reviewer is an agent published in the GitHub repository kumaran-is/claude-code-onboarding (35 stars, last pushed 2mo ago), licensed MIT. It adds 120 tokens to every session and 1,763 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.