ai-security-auditor

ai-security-auditor is an agent for Claude Code from akirtok/preflight-security-audit. It costs 142 tokens per session (420 once invoked), scanned A, original, MIT.

An AI and large-language-model security check for products that use AI features. It reviews how prompts, model responses, secrets, personal data, and tool permissions are handled.

In plain words
What is it for?
Use it to inspect AI SDKs, prompts, model endpoints, output handling, agent tools, exposed API keys, and missing limits on cost or execution time. It reports evidence with file locations and suggested fixes.
Why use it?
It helps find ways attackers could manipulate the model, expose sensitive information, or make connected tools take unsafe actions before release.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the preflight-security-audit plugin — 1 skill, 1 command, 6 agents shipped together

Good fit Use it to inspect AI SDKs, prompts, model endpoints, output handling, agent tools, exposed API keys, and missing limits on cost or execution time. It reports evidence with file locations and suggested fixes.

Compare 6 agents from other repositories ↓
Install

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.

Claude Code
/plugin marketplace add akirtok/preflight-security-audit
Claude Code
/plugin install preflight-security-audit

Made for: Claude Code.

Or install preflight-security-audit, the plugin that ships this one along with the rest of its 1 skill, 1 command, 6 agents.

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-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/akirtok/preflight-security-audit/ai-security-auditor.svg)](https://agentmods.dev/agents/akirtok/preflight-security-audit/ai-security-auditor)
Your own site
<a href="https://agentmods.dev/agents/akirtok/preflight-security-audit/ai-security-auditor"><img src="https://agentmods.dev/badge/agents/akirtok/preflight-security-audit/ai-security-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 142 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 420 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.00142 $0.00420
Opus 5 $0.00071 $0.00210
Sonnet 5 $0.00028 $0.00084
Haiku 4.5 $0.00014 $0.00042

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

Security

Grade A, and why

ai-security-auditor 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 8d 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.

plugins/preflight-security-audit/agents/ai-security-auditor.md · 40 lines

What it actually says

You audit Track 3 — AI/LLM Security of the Preflight Security Audit.

Read ${CLAUDE_PLUGIN_ROOT}/skills/preflight-security-audit/references/03-ai-llm-security.md and run passes 32–36 against the scope path.

First confirm the AI surface exists (AI SDK/client, prompt templates, endpoints forwarding user text to a model). If a pass's surface genuinely doesn't exist, mark it "not applicable" rather than dropping it silently.

Focus on: user input concatenated into prompts; indirect injection via ingested external content; model output flowing into HTML/SQL/shell/files/redirects without treatment; secrets/PII reachable via the model; tools/agents with irreversible capability and no confirmation; model API keys exposed client-side; missing cost/timeout ceilings.

Rules: prove each finding with a file:line, the path, and a fix. Read-only.

Return findings as: [severity] Track 3 · <category> — file:line — <what> — <path> — <fix> Grouped Critical→Low, with a one-line count summary.

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. 8d ago First seen · 40 lines · 142 tokens per session scan A d656b78c1417

Subscribe to this mod's changes

ai-security-auditor is an agent published in the GitHub repository akirtok/preflight-security-audit (4 stars, last pushed 1mo ago), licensed MIT. It adds 142 tokens to every session and 420 once invoked, about $0.0007 per session on Opus 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-31.