post-edit-security-review

post-edit-security-review is a skill for Claude Code from antgroup/adversarial-ai-coding-plugin. It costs 161 tokens per session (2,960 once invoked), scanned A, original, Apache-2.0.

A required security review performed after all coding changes are finished and before the work is delivered.

In plain words
What is it for?
Use it after adding features, fixing bugs, or refactoring to review issues such as injection, unauthorized access, server-side request forgery, unsafe file paths, command execution, and unsafe code execution.
Why use it?
It checks newly changed code for common security weaknesses while they can still be fixed before release.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: names the NotebookEdit tool.

Part of the adversarial-ai-coding plugin — 5 skills, 2 hooks shipped together

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.

agentmods
npx agentmods add skills/antgroup/adversarial-ai-coding-plugin/post-edit-security-review
Any agent
npx skills add antgroup/adversarial-ai-coding-plugin --skill post-edit-security-review
Clone the repo
git clone --depth 1 https://github.com/antgroup/adversarial-ai-coding-plugin

Made for: Claude Code.

Or install adversarial-ai-coding, the plugin that ships this one along with the rest of its 5 skills, 2 hooks.

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 post-edit-security-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/antgroup/adversarial-ai-coding-plugin/post-edit-security-review.svg)](https://agentmods.dev/skills/antgroup/adversarial-ai-coding-plugin/post-edit-security-review)
Your own site
<a href="https://agentmods.dev/skills/antgroup/adversarial-ai-coding-plugin/post-edit-security-review"><img src="https://agentmods.dev/badge/skills/antgroup/adversarial-ai-coding-plugin/post-edit-security-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,960 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00161 $0.02960
Opus 5 $0.00081 $0.01480
Sonnet 5 $0.00032 $0.00592
Haiku 4.5 $0.00016 $0.00296

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

Security

Grade A, and why

post-edit-security-review scanned grade A 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 5d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| OS 命令注入 | child_process.exec 等是否包含用户输入 | `../prevent-js-security-bugs/references/prevent-os-command-execution.md` |
plugin/skills/post-edit-security-review/SKILL.md · 178 lines

How it starts

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

代码修改后安全审查规范

技能目标

在代码变更完成后立即进行安全扫描,发现并修复已引入的安全漏洞,确保交付的代码不含已知安全风险。

代码修改完成后是拦截安全漏洞的关键时机——在代码合并或上线前发现并修复漏洞,远比上线后应急响应的代价低。


工作流程

按以下四步执行代码安全审查。每一步均必须执行,不可跳过。


第一步:识别本次变更的代码范围

明确本次修改涉及的所有文件和代码片段:

  • 列出所有被新增或修改的文件路径
  • 标注每个文件中变更的核心逻辑(新增函数、修改逻辑、新增依赖等)
  • 判断变更涉及的技术栈(Web 后端 / C/C++ 系统代码 / JavaScript/TypeScript / IaC 基础设施配置 / 其他)

第二步:按技术栈扫描安全漏洞

根据第一步识别的技术栈,逐类检查下列安全风险。对每一个适用的风险类型,读取对应的参考文档后再执行检查。

2A:Web 后端代码安全检查

适用场景:变更涉及 Web 接口、数据库访问、用户输入处理、文件操作、外部 HTTP 请求、命令执行、模板渲染、XML 解析、反序列化、认证鉴权。

风险类型 检查要点 参考文档
Query Language 注入 是否存在字符串拼接构造 SQL/HQL/NoSQL ../prevent-web-security-bugs/references/prevent-ql-injection.md
越权访问 按资源 ID 操作前是否校验当前用户权限 ../prevent-web-security-bugs/references/prevent-unauthorized-access.md
SSRF 服务端 HTTP 请求目标是否来自用户输入且未过滤内网地址 ../prevent-web-security-bugs/references/prevent-ssrf.md
路径遍历 文件路径是否由用户输入拼接且未规范化 ../prevent-web-security-bugs/references/prevent-path-traversal.md
OS 命令执行 系统命令中是否包含未转义的用户输入 ../prevent-web-security-bugs/references/prevent-os-command-execution.md
代码执行 是否动态执行了来自用户输入的脚本或表达式 ../prevent-web-security-bugs/references/prevent-code-execution.md
模板注入 模板引擎是否渲染了用户可控内容 ../prevent-web-security-bugs/references/prevent-template-injection.md
反序列化 反序列化的数据是否来自不可信来源 ../prevent-web-security-bugs/references/prevent-deserialization.md
凭据硬编码 是否有密码、密钥、Token 直接写入代码 ../prevent-web-security-bugs/references/prevent-hardcoded-credentials.md
XXE XML 解析器是否禁用了外部实体 ../prevent-web-security-bugs/references/prevent-xxe.md
2B:C/C++ 代码安全检查

适用场景:变更涉及 C/C++ 内存操作、字符串处理、文件读写、系统调用、多线程。

风险类型 检查要点 参考文档
缓冲区溢出 缓冲区读写是否有长度约束 ../prevent-c-cpp-security-bugs/references/prevent-buffer-overflow.md
UAF free/delete 后指针是否置空,后续是否继续使用 ../prevent-c-cpp-security-bugs/references/prevent-use-after-free.md
Double free 同一块内存是否可能被释放两次 ../prevent-c-cpp-security-bugs/references/prevent-double-free.md
格式化字符串漏洞 格式化函数参数是否来自不可信输入 ../prevent-c-cpp-security-bugs/references/prevent-format-string-vuln.md
整数溢出/下溢 内存分配、数组索引计算是否可能溢出 ../prevent-c-cpp-security-bugs/references/prevent-integer-overflow-underflow.md
符号扩展/类型转换 有符号数和无符号数混合运算是否安全 ../prevent-c-cpp-security-bugs/references/prevent-signedness-bugs.md
条件竞争 多线程对共享资源的访问是否正确同步 ../prevent-c-cpp-security-bugs/references/prevent-race-condition.md
危险函数调用 是否使用了 gets/strcpy/sprintf 等危险函数 ../prevent-c-cpp-security-bugs/references/prevent-potential-dangerous-function.md
QL 注入 是否拼接了数据库查询语句 ../prevent-c-cpp-security-bugs/references/prevent-ql-injection.md
路径遍历 文件路径是否由用户输入拼接 ../prevent-c-cpp-security-bugs/references/prevent-path-tranversal.md
OS 命令执行 system/popen/execve 是否包含用户输入 ../prevent-c-cpp-security-bugs/references/prevent-os-command-execution.md

Read the full file on GitHub · 178 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. 5d ago First seen · 178 lines · 161 tokens per session scan A 93509858540d

Subscribe to this mod's changes

post-edit-security-review is a skill published in the GitHub repository antgroup/adversarial-ai-coding-plugin (7 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 161 tokens to every session and 2,960 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

google-ads-audit

Google Ads account audit and business context setup. Run this first — it gathers business information, analyzes account health, and saves context that all other ads skills reuse. Trigger on "audit my ads", "ads audit", "set up my ads", "onboard", "account overview", "how's my account", "ads health check", "what should…

nowork-studio/notfair-plugin · 114 tokens

review

5-pass structured code review — correctness, security, performance, readability, consistency.

SethGammon/Citadel · 17 tokens

ops-pocket

OPS on-demand: This skill should be used when the user asks to "pocket memos", "voice memo pipeline"…

Lifecycle-Innovations-Limited/claude-ops · 29 tokens

alive:system-upgrade

Upgrade ALIVE to the current version. Handles v1/v2/v3.x source states, multi-surface aware (alive-mcp / Hermes / Codex), retroactive version detection, partial-failure resume, dry-run previews, and rollback inspection.

alivecontext/alive · 57 tokens

extract-resume

Parse a resume's uploaded PDF into structured JSON (basics, experience, projects, skills, education) and save it to the editor.

suxrobGM/jobpilot · 32 tokens