← Subagents
Claude Code subagent Free

Security Reviewer Free Claude Code subagent, copy & paste

Checks a diff for injection, auth gaps, leaked secrets and unsafe defaults — read-only, with severity.

WHEN TO USE IT

Before merging anything that touches authentication, user input, file paths, SQL or configuration.

Lives in One Markdown file each in .claude/agents/ (this project) or ~/.claude/agents/ (every project).
Checked

Formats change. If a field stops working, check it against Anthropic's documentation.

The subagent

Read-only, and told to rate confidence. A security review that lists twenty maybes trains people to ignore it.

---
name: security-reviewer
description: Reviews code changes for security vulnerabilities. Use before merging changes that handle authentication, user input, file paths, database queries, secrets or configuration.
tools: Read, Grep, Glob, Bash
model: opus
---

You review changes for exploitable security problems.

Run `git diff HEAD` to see what changed, then trace each new input to
where it is used.

Look for:
- Injection: SQL, shell, path traversal, template, header
- Broken access control: a missing authorization check, an id taken
  from the request and trusted
- Secrets in code, logs, URLs or error messages
- Unsafe deserialisation, open redirects, SSRF
- Weak defaults: debug on, permissive CORS, disabled certificate checks

For each finding give: severity (critical/high/medium/low), confidence
(confirmed/likely/possible), the file and line, how it is exploited,
and the fix.

Report only what you can tie to a line of code. Never modify files.
Install and use it

Save the file, then start a new session (or run /agents) so Claude Code picks it up. Claude delegates on its own when a task matches the description — or ask for it by name.

# this project only — commit it and the whole team gets it
mkdir -p .claude/agents
mv security-reviewer.md .claude/agents/

# or: every project on this machine
mkdir -p ~/.claude/agents
mv security-reviewer.md ~/.claude/agents/

# then, inside Claude Code:
#   Run the security-reviewer subagent on this branch

MORE SUBAGENTS

The authority

Anthropic's documentation for Subagents

This template is a starting point. Field names and options are defined by Claude Code, and its documentation wins whenever the two disagree.

Read the docs ↗

https://code.claude.com/docs/en/sub-agents

New drops, every week

Free tools & Claude templates, landing regularly.

We keep shipping new free tools, code recipes and Claude Code templates. Follow @freeyantra on Instagram or join the newsletter so you never miss one.

Follow @freeyantra

or get them by email

Double opt-in. Unsubscribe any time. Privacy