一键导入
patch
Generate minimal, behavior-preserving fixes for verified security findings, then verify each fix builds, passes tests, and closes the root cause.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate minimal, behavior-preserving fixes for verified security findings, then verify each fix builds, passes tests, and closes the root cause.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Build a threat model for a codebase — map assets, entry points, trust boundaries, and the threats that matter — and write THREAT_MODEL.md to focus later scanning and triage.
Explore an existing codebase, design a concrete feature architecture, implement in small phases, and verify with focused tests.
Behavior-preserving cleanup of recently changed code for reuse, clarity, consistency, and efficiency.
Verify, deduplicate, rank, and route raw security findings from VULN-FINDINGS.json, scanner output, or a markdown report, then write TRIAGE.json and TRIAGE.md.
Static source-code vulnerability scan that maps focus areas, fans out read-only security agents, and writes VULN-FINDINGS.json plus VULN-FINDINGS.md for triage.
High-precision review of code changes for real bugs, security regressions, and explicit project-guideline violations, with independent verification before reporting.
| name | patch |
| description | Generate minimal, behavior-preserving fixes for verified security findings, then verify each fix builds, passes tests, and closes the root cause. |
| when-to-use | When asked to fix, patch, or remediate confirmed vulnerabilities after triage or security review. Use on verified findings, not raw scanner output. |
| arguments | ["findings"] |
Produce the smallest correct fix for each confirmed vulnerability. A patch that breaks legitimate input, changes unrelated behavior, or papers over the symptom is worse than no patch. Fix the root cause, change as little as possible, and prove the fix before claiming it.
${findings} is preferably TRIAGE.json or TRIAGE.md from /triage. It may also be a SECURITY-FINDINGS.md from /security-review, or a single described verified finding. Only patch confirmed, verified findings. If handed raw scanner output, stop and point the user at /triage first.
Read ${findings}. Take confirmed findings, highest severity first. For each, note the file:line, root cause, exploit scenario, and recommended fix from triage. Group findings that share a root cause, such as one vulnerable helper called from many sites. Fix the shared cause once rather than each call site.
For each finding (or root-cause group), read the surrounding code and its callers so the fix fits the codebase's existing patterns:
Apply the smallest change that closes the hole at its root:
memcpy; validate/normalize at the boundary; use the constant-time compare; escape at the sink; add the missing auth gate.A fix is not done until it's proven. For each patched finding:
verification agent to run the project's build and test commands. If it breaks, fix the regression before moving on.code-reviewer agent with the diff and original finding. Ask it to look only for behavior regressions, incomplete remediation, and over-broad changes. Fix any real issue it reports.If a fix cannot be verified statically and needs a runtime PoC to confirm, say so and recommend the user verify before merging. Do not claim a fix you could not prove.
For each finding: the file:line patched, a one-line description of the fix and why it closes the root cause, and the verification result (build/tests, hole-closed reasoning, legitimate-input check). List anything you intentionally did NOT patch (false positives, needs-manual-test, out-of-scope) with the reason. End with the overall diff summary and a recommendation on review/merge.