patch
यह क्या करती है
यह स्किल जाँचे गए सुरक्षा निष्कर्षों की सूची को प्रस्तावित कोड बदलावों में बदलती है। यह उन्हें आपके प्रोजेक्ट पर कभी लागू नहीं करती। यह उन डेवलपर्स के लिए है जिन्हें समीक्षा के लिए सुधार के सुझाव चाहिए।
कब इस्तेमाल करें
- ✓जब आपके पास सत्यापित सुरक्षा निष्कर्षों की सूची है और आपको सुधार के ड्राफ़्ट चाहिए।
- ✓जब आप सुधार को सबसे गंभीर निष्कर्षों तक सीमित करना चाहते हैं।
- ✓जब आप चाहते हैं कि सुधार के प्रस्ताव अपने-आप लागू होने के बजाय मानव समीक्षा के लिए सहेजे जाएं।
Skill का लिंक
https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/patch/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरी ट्रायज सूची के सबसे गंभीर सुरक्षा मुद्दों के सुधार का ड्राफ़्ट बना सकते हैं और समीक्षा के लिए सहेज सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
हर निष्कर्ष के लिए एजेंट एक प्रस्तावित बदलाव लिखता है, और एक दूसरी समीक्षा उसकी जाँच करती है। नतीजे टेक्स्ट diff के रूप में सहेजे जाते हैं, जिन्हें व्यक्ति पढ़कर खुद लागू कर सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
patch
Third leg of the static pipeline (/vuln-scan → /triage → /patch).
Turns a ranked list of verified findings into candidate diffs.
The skill never applies a diff to the target repo. Output is inert text
in ./PATCHES/ for a human to review and apply out-of-band — see
docs/patching.md#reviewing-generated-patches. There is no --apply or
--approve flag by design: the capability isn't present, so it can't be
prompt-injected into use.
Invoke with /patch <findings-path> [--repo PATH] [--top N] [--id fNNN] [--model M] [--fresh].
Arguments (parse from $ARGUMENTS):
- findings path (first positional, required):
TRIAGE.json,VULN-FINDINGS.json, a pipelineresults/<target>/<ts>/directory, or any JSON the/triageingest table recognizes. --repo PATH: target codebase, read-only (default cwd). Required for static mode; the skill stops if cited files don't resolve under it.--top N: patch only the N highest-severity true positives (static mode).--id fNNN: patch only the finding with this id.--model M: passed through tovuln-pipeline patchin execution-verified mode. Ignored in static mode (subagents inherit the orchestrator's model).--fresh: ignore./.patch-state/checkpoint and start over.
Tools. Prefer Read, Glob, Grep, Write, Task. Some sessions do not
provision Glob or Grep; allowed-tools is a permission filter, not a loader.
When they are unavailable, fall back to the read-only Bash commands
whitelisted above: rg/grep for search, ls for enumeration,
head/file/wc for sniffing, jq for JSON ingest. Bash is otherwise
permitted only for python3 .claude/skills/_lib/checkpoint.py (state I/O)
and vuln-pipeline patch (execution-verified delegate). find is NOT
permitted.
Write scope. The Write tool may target ONLY paths under ./PATCHES/ and
./.patch-state/. Never write into --repo, never git apply, never
patch, never edit target source. If a step seems to require it, the step is
wrong.
Checkpointing (runs before Phase 0 and after every phase)
State persists to ./.patch-state/ so a fresh /patch session resumes
without re-spawning patch or reviewer subagents. All checkpoint I/O goes
through python3 .claude/skills/_lib/checkpoint.py (atomic, JSON-validated).
The Write→--from pattern keeps repo-derived bytes out of Bash argv; never
pass payload via heredoc or stdin.
State files: progress.json (single source of truth: {"status": "running"|"complete", "phase_done": N, "shards_done": [...]}),
phaseN.json, _chunk.tmp.
Start of run. Bash:
python3 .claude/skills/_lib/checkpoint.py load ./.patch-state
status == "absent"OR"complete", OR--freshin$ARGUMENTS→ fresh start. Bash:python3 .claude/skills/_lib/checkpoint.py reset ./.patch-state, proceed to Phase 0.status == "running"withphase_done == N→ resume. Readphase0.json..phaseN.jsonin order (and anyshard_*.jsonlisted inshards_done), merge into working state, printResuming from checkpoint: Phase N complete, skip to Phase N+1. Do not re-spawn any subagent whose output is already checkpointed.
End of every phase N. Write tool → ./.patch-state/_chunk.tmp with the
phase's JSON, then Bash:
python3 .claude/skills/_lib/checkpoint.py save ./.patch-state <N> <name> --from ./.patch-state/_chunk.tmp
End of run. After writing PATCHES.md and PATCHES.json, Bash:
python3 .claude/skills/_lib/checkpoint.py done ./.patch-state 4
Phase 0: Parse arguments and detect mode
0a. Parse $ARGUMENTS
Extract findings path (first positional), --repo (default .), --top,
--id, --model, --fresh. If no findings path, stop and ask.
0b. Detect mode
Inspect the findings path:
- execution-verified mode when the path is a directory containing
reports/manifest.jsonlORfound_bugs.jsonlORrun_*/result.json(pipeline output) — unless anINCIDENTS.jsonis present anywhere in it: D&R run dirs also containrun_*/result.json, and their incidents route static. The findings have PoC bytes + ASAN traces + reproduction commands; the pipeline's verification ladder applies. - static mode otherwise:
TRIAGE.json,VULN-FINDINGS.json,INCIDENTS.json(the/dnr-*output), generic finding JSON, or markdown. No PoC; the oracle is a fresh-context reviewer.
Record mode in working state. The two modes share Phase 1 ingest then fork
at Phase 2.
**Checkpoi
अक्सर पूछे जाने वाले सवाल
क्या यह मेरा कोड बदलता है?
नहीं। आउटपुट केवल समीक्षा और खुद लागू करने के लिए टेक्स्ट फ़ाइलें हैं।
कौन से निष्कर्ष ठीक करने हैं, यह मैं चुन सकता हूं?
हां। आप काम को शीर्ष निष्कर्षों तक या किसी एक निष्कर्ष तक ID से सीमित कर सकते हैं।
यह कौन सी फ़ाइलें पढ़ती है?
यह ट्रायज फ़ाइल, निष्कर्ष फ़ाइल, घटना फ़ाइल या पाइपलाइन परिणामों का फ़ोल्डर पढ़ती है।
जानकारी
लेखक का मूल विवरण
Generate candidate fixes for verified security findings. Consumes TRIAGE.json (preferred), VULN-FINDINGS.json, INCIDENTS.json, or a vuln-pipeline results directory. Pipeline input is delegated to the execution-verified `vuln-pipeline patch` ladder; static-analysis input gets a per-finding patch subagent + independent reviewer and is written as inert diffs for human review. Writes PATCHES/bug_NN/{patch.diff,patch_result.json}, PATCHES.md, and PATCHES.json. Use when asked to "fix the findings", "patch these vulns", "generate fixes", or "close the loop on triage".
लोकप्रियता
- GitHub स्टार
- 7.7k
- रैंकिंग में स्थान
- #13103
- लाइसेंस
- —
- अपडेट की गई
- 6/8/2026
कमेंट
- …
इस repository की और skills
customize
7.7kयह आपके एजेंट को AI से सुरक्षा कमज़ोरी खोजने वाली पाइपलाइन को नए बग प्रकार, भाषा या लक्ष्य के लिए ढालने में मदद करती है, खास हिस्से दोबारा लिखकर।
dnr-hunt
7.7kयह आपके एजेंट को बिना किसी अलर्ट के वेब लॉग में हमले के संकेत खोजने और मिली घटनाओं का लिखित विवरण बनाने में मदद करती है।
dnr-respond
7.7kयह आपके एजेंट को एक सुरक्षा अलर्ट या संकेत की जाँच करने में मदद करती है कि हमला सफल हुआ या नहीं और वह कितनी दूर तक पहुंचा।
quickstart
7.7kयह आपके एजेंट को सुरक्षा स्कैनिंग टूलकिट का छोटा परिचय देती है और उसके टूल इस्तेमाल करने के सवालों के जवाब देती है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।