मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग101k · #987

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 पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/patch-edit/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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.json from rewrite-plan.
  • The current value of iterations (the daemon's per-stage counter).
  • code/index.json for 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's risk is 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

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills