security-review (安全审查)

security-review (安全审查) is a skill for Claude Code from cfrs2005/claude-init. It costs 47 tokens per session (3,385 once invoked), scanned A, original, MIT.

A code-review checklist for security-sensitive features such as login, user input, file uploads, API endpoints, payments, and confidential data.

In plain words
What is it for?
Use it when adding authentication, handling uploads or sensitive data, connecting third-party APIs, or building payment and API features.
Why use it?
It helps catch common security mistakes, such as putting passwords in source code or accepting unvalidated input, before they become vulnerabilities.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

Good fit Use it when adding authentication, handling uploads or sensitive data, connecting third-party APIs, or building payment and API features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cfrs2005/claude-init/security-review
About the project

claude-init is an archived project template for initializing Claude Code development environments, with Chinese-localized configuration and workflows. Developers on macOS or Linux use it to set up agents, skills, commands, rules, hooks, and development contexts for Claude Code. Its catalogue entries provide the included commands, agents, hooks, and skills.

cfrs2005/claude-init · 1,360 stars · on GitHub

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.

Any agent
npx skills add cfrs2005/claude-init --skill security-review
Clone the repo
git clone --depth 1 https://github.com/cfrs2005/claude-init

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 security-review (安全审查)

README.md
[![agentmods](https://agentmods.dev/badge/skills/cfrs2005/claude-init/security-review/github.svg)](https://agentmods.dev/skills/cfrs2005/claude-init/security-review)
Your own site
<a href="https://agentmods.dev/skills/cfrs2005/claude-init/security-review"><img src="https://agentmods.dev/badge/skills/cfrs2005/claude-init/security-review/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 security-review (安全审查)

Your own site · 80×15
<a href="https://agentmods.dev/skills/cfrs2005/claude-init/security-review"><img src="https://agentmods.dev/badge/skills/cfrs2005/claude-init/security-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,385 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Output Handling · line 205
    Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.
    Fix: Validate and sanitize all model output before using it in downstream contexts. Use parameterized queries for SQL, shell quoting for commands, and HTML encoding for web output.
How audits are shown
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.00047 $0.03385
Opus 5.5 $0.00019 $0.01354
Sonnet 5.5 $0.00009 $0.00677
Haiku 4.5 $0.00005 $0.00338

Measured 1mo ago against content hash 6c7d35773452, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-review (安全审查) 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 1mo 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.

templates/.claude/skills/security-review/SKILL.md · 495 lines

How it starts

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

安全审查技能

本技能确保所有代码遵循安全最佳实践并识别潜在漏洞。

何时激活

  • 实现身份验证或授权
  • 处理用户输入或文件上传
  • 创建新的 API 端点
  • 使用机密信息或凭据
  • 实现支付功能
  • 存储或传输敏感数据
  • 集成第三方 API

安全清单

1. 机密信息管理

❌ 严禁这样做
const apiKey = "sk-proj-xxxxx"  // 硬编码的机密信息
const dbPassword = "password123" // 在源代码中
✅ 务必这样做
const apiKey = process.env.OPENAI_API_KEY
const dbUrl = process.env.DATABASE_URL

// 验证机密信息是否存在
if (!apiKey) {
  throw new Error('未配置 OPENAI_API_KEY')
}
验证步骤
  • 无硬编码的 API 密钥、令牌或密码
  • 所有机密信息均在环境变量中
  • .env.local 已加入 .gitignore
  • git 历史记录中无机密信息
  • 生产环境机密信息在托管平台 (Vercel, Railway) 中配置

2. 输入验证

始终验证用户输入
import { z } from 'zod'

// 定义验证 schema
const CreateUserSchema = z.object({
  email: z.string().email(),
  name: z.string().min(1).max(100),
  age: z.number().int().min(0).max(150)
})

// 处理前验证
export async function createUser(input: unknown) {
  try {
    const validated = CreateUserSchema.parse(input)
    return await db.users.create(validated)
  } catch (error) {
    if (error instanceof z.ZodError) {
      return { success: false, errors: error.errors }
    }
    throw error
  }
}
文件上传验证
function validateFileUpload(file: File) {
  // 大小检查 (最大 5MB)
  const maxSize = 5 * 1024 * 1024
  if (file.size > maxSize) {
    throw new Error('文件过大 (最大 5MB)')
  }

  // 类型检查
  const allowedTypes = ['image/jpeg', 'image/png', 'image/gif']
  if (!allowedTypes.includes(file.type)) {
    throw new Error('无效的文件类型')
  }

  // 扩展名检查
  const allowedExtensions = ['.jpg', '.jpeg', '.png', '.gif']
  const extension = file.name.toLowerCase().match(/\.[^.]+$/)?.[0]
  if (!extension || !allowedExtensions.includes(extension)) {
    throw new Error('无效的文件扩展名')
  }

  return true
}
验证步骤
  • 所有用户输入均使用 schema 验证
  • 文件上传受限 (大小, 类型, 扩展名)
  • 查询中不直接使用用户输入
  • 白名单验证 (而非黑名单)
  • 错误消息不泄露敏感信息

3. 防止 SQL 注入

❌ 严禁拼接 SQL
// 危险 - SQL 注入漏洞
const query = `SELECT * FROM users WHERE email = '${userEmail}'`
await db.query(query)

Read the full file on GitHub · 495 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. 1mo ago First seen · 495 lines · 47 tokens per session scan A 6c7d35773452

Subscribe to this mod's changes

security-review (安全审查) is a skill published in the GitHub repository cfrs2005/claude-init (1,360 stars, last pushed 7mo ago), licensed MIT. It adds 47 tokens to every session and 3,385 once invoked, about $0.0002 per session on Opus 5.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-30.

Related

Other skills, from other repositories

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

openclaw/clawhub · 17 tokens

omh-code-review

This is an OMH code-review workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 48 tokens

revdiff-plan

Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…

umputun/revdiff · 84 tokens

asplos-writing-style

Use when drafting or revising ASPLOS prose — engineering the first two pages that rapid review actually reads, stating the cross-layer insight as one quotable sentence, structuring per-layer mechanism sections, writing bounded claims, and fitting everything into 11 self-contained pages that include figures and…

brycewang-stanford/Awesome-Journal-Skills · 65 tokens

explore-unknowns

Guide the user through a quadrant walk that maps the unknowns of a task — open by listing the known knowns, then work through known unknowns, unknown knowns, and unknown unknowns one stage at a time, ending with a complete four-quadrant map in the user's hands. Use when a request is ambiguous or underspecified, the…

dzhng/skills · 162 tokens

re0-merge

Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…

LilMGenius/paperthin · 70 tokens