From security-code-audit
This skill should be used when the user asks to "review PR for security", "check staged changes", "security review diff", "pre-commit security check", "review recent changes", or analyzing security impact of git diffs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/security-code-audit:security-code-audit-review-diffThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Review git diff for security vulnerabilities in changed code.
Review git diff for security vulnerabilities in changed code.
Analyze git diffs for security implications in pre-commit reviews, PR security checks, or understanding the security impact of recent changes.
$ARGUMENTS - Git diff target (default: --staged)
/security-code-audit-review-diff # staged changes
/security-code-audit-review-diff HEAD~1 # last commit
/security-code-audit-review-diff HEAD~3 # last 3 commits
/security-code-audit-review-diff main # vs main branch
/security-code-audit-review-diff feature..main # between branches
git diff $ARGUMENTS
--- a/file, +++ b/file)+ prefix)- prefix)@@ context)grepai search "context for changed function" --json --compact
| Change Type | Security Concern |
|---|---|
| Added lines | May introduce vulnerabilities |
| Removed lines | May fix vulnerabilities |
| Modified lines | May change security properties |
{
"reviews": [
{
"file": "src/api/handlers.py",
"changes": {
"added_lines": [45, 46, 47],
"removed_lines": [42]
},
"reviews": [
{
"issue": "Command Injection",
"code_snippet": "os.system(f\"ping {user_input}\")",
"reasoning": "Line 46 passes unsanitized user input to os.system",
"mitigation": "Use subprocess with shell=False",
"confidence": 0.90,
"cwe": "CWE-78",
"severity": "CRITICAL",
"line_number": 46
}
]
}
],
"diff_summary": {
"files_changed": 3,
"additions": 25,
"deletions": 5,
"potential_fixes": []
}
}
See ../security-code-audit-review/references/ for:
npx claudepluginhub mfakbar127/agent-skills --plugin security-code-auditProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.