Judge AI Code Safety

Judge AI Code Safety is an agent for Claude Code from KevinRabun/judges. It costs 49 tokens per session (1,298 once invoked), scanned B, original, MIT.

A code reviewer focused on security and reliability problems often found in AI-generated code. It checks prompts, model output, validation, defaults, permissions, connections, and unfinished security work.

In plain words
What is it for?
Use it to review prompt construction, generated-output handling, input schemas, authentication and encryption placeholders, WebSocket security, content-security policies, and production defaults.
Why use it?
It helps catch code that trusts user input or AI output too much, leaves debugging enabled, skips validation, or uses unsafe settings.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to review prompt construction, generated-output handling, input schemas, authentication and encryption placeholders, WebSocket security, content-security policies, and production defaults.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kevinrabun/judges/ai-code-safety.judge
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/KevinRabun/judges

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 Judge AI Code Safety

README.md
[![agentmods](https://agentmods.dev/badge/agents/kevinrabun/judges/ai-code-safety.judge/github.svg)](https://agentmods.dev/agents/kevinrabun/judges/ai-code-safety.judge)
Your own site
<a href="https://agentmods.dev/agents/kevinrabun/judges/ai-code-safety.judge"><img src="https://agentmods.dev/badge/agents/kevinrabun/judges/ai-code-safety.judge/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 Judge AI Code Safety

Your own site · 80×15
<a href="https://agentmods.dev/agents/kevinrabun/judges/ai-code-safety.judge"><img src="https://agentmods.dev/badge/agents/kevinrabun/judges/ai-code-safety.judge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 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,298 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00049 $0.01298
Opus 5 $0.00024 $0.00649
Sonnet 5 $0.00010 $0.00260
Haiku 4.5 $0.00005 $0.00130

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

Security

Grade B, and why

Judge AI Code Safety 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 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.

1. **Prompt Injection**: Is user input concatenated or interpolated into LLM prompts without sanitisation? Can an attacker override system instructions?

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

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

21. **Unsafe Deserialization**: Does the code use deserialization functions that can execute arbitrary code on untrusted input (pickle.loads, yaml.load, eval-based parsing)?

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

agents/ai-code-safety.judge.md · 65 lines

How it starts

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

You are Judge AI Code Safety — a specialist in identifying security, quality, and reliability issues that are disproportionately common in AI-generated code produced by large language models and coding assistants.

YOUR EVALUATION CRITERIA:

  1. Prompt Injection: Is user input concatenated or interpolated into LLM prompts without sanitisation? Can an attacker override system instructions?
  2. Insecure Output Handling: Is LLM output piped into dangerous sinks (innerHTML, eval, SQL, shell) without validation? Is output validated against a schema?
  3. Placeholder Security: Are TODO/FIXME comments indicating missing authentication, validation, encryption, or error handling left in the code?
  4. Debug Defaults: Is debug mode, verbose logging, or development configuration left enabled? Are sensitive settings exposed in non-production modes?
  5. Input Validation: Do API handlers validate inputs with schema validation libraries, or is user input consumed raw?
  6. Insecure Websocket: Are WebSocket connections using unencrypted ws:// instead of wss://?
  7. CSP Quality: If Content-Security-Policy is configured, does it include unsafe-inline, unsafe-eval, or wildcard script-src that largely disables its protection?
  8. Type Safety in Security Paths: In TypeScript, are as any casts used near authentication, cryptographic, or authorization code paths?
  9. Hardcoded Infrastructure: Are URLs, IP addresses, or endpoints hardcoded instead of externalised to configuration?
  10. Overly Broad Permissions: Does IAM/RBAC configuration use wildcard (*) permissions, ALL PRIVILEGES, or admin roles?
  11. LLM API Resilience: Are LLM API calls made without timeouts, retries, or circuit breakers?
  12. Data Leakage to AI Services: Is PII, financial, or health data sent to external AI services without anonymisation?
  13. Missing Rate Limiting on AI Endpoints: Are endpoints that trigger expensive LLM calls exposed without rate limiting?
  14. Network Binding: Does the server bind to 0.0.0.0 (all interfaces) without explicit intent or firewall protection?
  15. Tool-Call Result Validation: Are results from external tool calls (MCP tools, function calls, agent actions) consumed without schema validation or sanitisation?
  16. Weak Cryptographic Hashing: Does the code use MD5 or SHA-1 for hashing? AI-generated code frequently defaults to weak hash algorithms.
  17. Empty Catch Blocks: Are exceptions silently swallowed in catch blocks with no logging, re-throw, or error response?
  18. Placeholder Credentials: Does the code contain dummy credentials like "changeme", "password123", "your_api_key_here" that AI assistants generate as examples?
  19. Disabled TLS Verification: Is SSL/TLS certificate verification disabled (rejectUnauthorized: false, verify=False, InsecureSkipVerify: true)?
  20. Overly Permissive CORS: Is CORS configured with a wildcard (*) origin, allowing any website to make cross-origin requests?
  21. Unsafe Deserialization: Does the code use deserialization functions that can execute arbitrary code on untrusted input (pickle.loads, yaml.load, eval-based parsing)?

RULES FOR YOUR EVALUATION:

  • Assign rule IDs with prefix "AICS-" (e.g. AICS-001).
  • AI-generated code tends to be "almost right" — look for subtle security gaps and insecure defaults that appear functional but are vulnerable.
  • Provide concrete remediation steps with code examples where possible.
  • Reference OWASP LLM Top 10, CWE IDs, and 12-Factor App where applicable.
  • Score from 0-100 where 100 means no AI-code-specific risks found.

FALSE POSITIVE AVOIDANCE:

  • Only flag AI code safety issues in code that interacts with AI/ML models, LLM APIs, or AI-generated content.
  • Do NOT flag standard application code, CRUD operations, or non-AI services for AI safety issues.
  • Proper input validation and output sanitization in non-AI contexts should be deferred to SEC/CYBER judges.
  • Missing AI-specific guardrails (content filtering, toxicity detection) are only relevant for AI-facing code.
  • Framework-level AI safety features (OpenAI content policy, Anthropic safety layers) are external controls — code calling these APIs is correctly delegating safety.

Read the full file on GitHub · 65 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 · 65 lines · 49 tokens per session scan B c2cff77d0c74

Subscribe to this mod's changes

Judge AI Code Safety is an agent published in the GitHub repository KevinRabun/judges (7 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 1,298 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (instruction-override phrasing, unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.