patch-edit
यह क्या करती है
यह टूल programming code में छोटे-छोटे बदलाव एक-एक करके करने में मदद करता है। सब कुछ एक साथ बदलने के बजाय, यह एक बार में एक छोटा fix या सुधार लागू करता है, ताकि लोगों के लिए बदलावों को देखना और समझना आसान हो।
कब इस्तेमाल करें
- ✓जब code में कोई छोटा bug ठीक करना हो।
- ✓जब कोई छोटा, जांचा जा सकने वाला नया feature जोड़ना हो।
- ✓बाकी code पर असर डाले बिना किसी खास हिस्से को बेहतर बनाने के लिए।
Skill का लिंक
https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/patch-edit/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं चाहता हूं कि refactoring plan का अगला step 'utils.js' file पर लागू हो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
टूल कई steps वाला plan लेता है और हर step को अलग-अलग लागू करता है। हर step के बाद यह दर्ज करता है कि क्या किया गया, ताकि आप प्रगति देख सकें और अगले बदलावों को मंज़ूरी दे सकें।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Patch edit
Spec §20.3 / §21.3.2: code-migration / tune-collab cannot ship a trustworthy diff when the agent rewrites whole files in one pass — the reviewer can't audit the change. This atom enforces "one step per turn, smallest possible localised edit".
Inputs
plan/steps.jsonfromrewrite-plan.- The current value of
iterations(the daemon's per-stage counter). code/index.jsonfor the file's known imports + neighbours.
Output
The atom mutates files inside the project cwd via the file-edit tool.
After every iteration, it writes a per-step receipt:
project-cwd/
└── plan/
├── steps.json (status updated: 'pending' → 'completed' | 'skipped')
└── receipts/
└── step-<id>.json # { files: ['...'], diffSummary, rationale, completedAt }
Convergence
The atom completes when every step in plan/steps.json is in a
terminal state (completed / skipped) OR iterations >= OD_MAX_DEVLOOP_ITERATIONS. Use:
{
"id": "patch-edit-loop",
"atoms": ["patch-edit"],
"repeat": true,
"until": "plan.steps.terminal === plan.steps.total || iterations >= 8"
}
Anti-patterns the prompt fragment forbids
- Rewriting an entire file when the rewrite-plan step is localised.
- Touching a file outside the step's
files[]. - Touching a
shell-tier file when the step'sriskis not'high'or the user hasn't confirmed. - Skipping a step without a receipt + a rationale string.
Status
Implemented by the daemon runner in
apps/daemon/src/plugins/atoms/patch-edit.ts. It validates step ownership and
risk, applies unified diffs with atomic writes, and records receipts and
progress.
अक्सर पूछे जाने वाले सवाल
पूरी file एक साथ क्यों नहीं बदली जाती?
पूरी file एक साथ बदलने से उसकी समीक्षा मुश्किल हो जाती है और गलतियां पकड़ना कठिन होता है। छोटे बदलाव करने से प्रक्रिया ज़्यादा सुरक्षित रहती है और जांचना आसान होता है।
किसी step के लागू होने के बाद क्या होता है?
टूल किए गए बदलाव का विस्तृत रिकॉर्ड सेव करता है, जिसमें लिखा होता है कि कौन सी files बदली गईं और क्यों। इससे बदलावों का इतिहास बनता है।
क्या मैं कोई step छोड़ सकता हूं?
हां, लेकिन इसके लिए आपको छोड़ने की वजह दर्ज करनी होगी। इससे हर फ़ैसला रिकॉर्ड में रहता है।
जानकारी
लेखक का मूल विवरण
Apply one rewrite-plan step at a time as small reviewable file edits, never rewriting whole files when a localised change suffices.
repo: nexu-io/open-design
लोकप्रियता
- GitHub स्टार
- 101k
- रैंकिंग में स्थान
- #987
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
sample-plugin
101kआपके एजेंट से टेस्ट के लिए metadata file बनवाता है। इससे पक्का होता है कि कोड अलग-अलग स्थितियों में सही चलता है।
aster-atelier
101kआपके एजेंट से क्लासिक लुक वाली एक कलात्मक website बनवाता है। इसमें खूबसूरत इमेज, नीला आसमान और serif fonts इस्तेमाल होते हैं, जिससे सिनेमाई एहसास मिलता है।
audio-jingle
101kआपके एजेंट से जिंगल्स और sound effects जैसा audio बनवाता है। यह music और voice बना सकता है और नतीजा audio file में सेव करता है।
blog-post
101kआपका एजेंट लंबे articles या blog posts लिखने में मदद करता है। इसमें images, quotes और author की जानकारी के लिए जगह भी होती है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।