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

batch-operations

यह क्या करती है

यह स्किल आपके AI को प्रोजेक्ट की कई फ़ाइलों में एक ही तरह का एडिट लागू करने देती है। यह उन डेवलपर्स के लिए है जिन्हें हर जगह एक जैसा रेनेम या अपडेट करना है।

कब इस्तेमाल करें

  • ✓जब आप कोडबेस में किसी फ़ंक्शन या कंपोनेंट का नाम हर जगह बदलना चाहें।
  • ✓जब आपको कई फ़ाइलों में वर्ज़न नंबर या इम्पोर्ट अपडेट करना हो।
  • ✓जब आप प्रोजेक्ट को एक लाइब्रेरी से दूसरी पर कई फ़ाइलों में ले जा रहे हों।

Skill का लिंक

https://github.com/vudovn/ag-kit/blob/main/.agents/skills/batch-operations/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

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

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

AI से क्या माँगें: उदाहरण

“मेरे प्रोजेक्ट की हर फ़ाइल में getUser फ़ंक्शन का नाम बदलकर fetchUser कर दीजिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह स्किल पहले वे सभी फ़ाइलें ढूँढती है जो मेल खाती हैं और बदलावों का पूर्वावलोकन दिखाती है। फिर उन्हीं फ़ाइलों में वही बदलाव लागू करती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Batch Operations — Multi-File Changes

Apply consistent changes across many files at once. One pattern, many targets.

When to Use

✅ Good for:

  • Renaming a function/component across all files that use it
  • Adding an import to every file in a directory
  • Updating version numbers across package files
  • Applying the same code pattern to multiple similar files
  • Migrating from one API to another across the codebase
  • Adding/removing a field from all similar data structures

❌ Not for:

  • Single-file edits (use direct editing)
  • Unique changes per file (handle individually)
  • Changes that need per-file judgment (use an agent per domain)

Batch Operation Protocol

Step 1: Define the Pattern

What:     [exact text/pattern to find]
Replace:  [exact replacement text]
Scope:    [file glob pattern, e.g., "src/**/*.tsx"]
Exclude:  [files to skip, e.g., "**/*.test.tsx"]

Step 2: Preview Before Executing

# Find all affected files FIRST
grep -rl "oldPattern" src/ --include="*.ts"

# Count matches
grep -rc "oldPattern" src/ --include="*.ts" | grep -v ":0$"

# Show context for each match
grep -rn "oldPattern" src/ --include="*.ts"

🔴 NEVER batch-modify without previewing first. Show the user what will change.

Step 3: Execute the Batch

For text replacements:

# On Linux/macOS
find src -name "*.ts" -exec sed -i 's/oldPattern/newPattern/g' {} +

# On Windows (PowerShell)
Get-ChildItem -Path src -Recurse -Filter *.ts |
  ForEach-Object { (Get-Content $_) -replace 'oldPattern','newPattern' | Set-Content $_ }

For structural changes (adding imports, wrapping code):

  • Use the Edit tool on each file
  • Process files in a consistent order (alphabetical or by dependency)

Step 4: Verify the Batch

# Confirm no missed instances
grep -rl "oldPattern" src/ --include="*.ts"
# Should return empty

# Confirm replacements are correct
grep -rn "newPattern" src/ --include="*.ts" | head -5

# Run tests to catch breakage
npm run test
npm run build

Common Batch Patterns

Operation Command Pattern
Rename import Find all import { X } → replace with import { Y }
Update version Find "version": "1.0" → replace across all package.json
Add export Append export { X } to all index files
Remove deprecated Find deprecatedFn() → replace with newFn()
Add header Prepend license header to all source files
Type migration Find interface X → replace with type X =

Safety Rules

  1. Preview first — always show affected files before modifying
  2. Git safety — ensure clean working directory (git stash or commit first)
  3. Exclude tests — often tests need different treatment than source
  4. Verify after — run build + tests after every batch operation
  5. Report changes — list every file modified with change summary
अक्सर पूछे जाने वाले सवाल

क्या फ़ाइलें बदलने से पहले मैं मिलान देख सकता हूँ?

हाँ। स्किल पहले पूर्वावलोकन का कदम अपनाती है, ताकि आप हर प्रभावित फ़ाइल देख सकें।

क्या यह एक ही फ़ाइल के लिए उपयोगी है?

नहीं। एक फ़ाइल के लिए सीधा एडिट सरल है, जैसा स्किल खुद बताती है।

क्या यह उन बदलावों के लिए काम करती है जिनमें हर फ़ाइल में अलग फ़ैसला चाहिए?

नहीं। स्किल के अनुसार ऐसे मामले एक-एक फ़ाइल करके बेहतर संभाले जाते हैं।

जानकारी

लेखक का मूल विवरण

Apply operations across multiple files simultaneously. Pattern-based bulk modifications, search-and-replace across codebases, consistent changes to many files at once.

repo: vudovn/ag-kit

लोकप्रियता

GitHub स्टार
8.2k
रैंकिंग में स्थान
#12525
लाइसेंस
MIT
अपडेट की गई
18/10/2026

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

0

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

कमेंट

  • …

इस repository की और skills

brainstorming

8.2k

यह आपके एजेंट को कुछ भी नया या जटिल बनाने से पहले स्पष्ट सवाल पूछना सिखाती है, ताकि वह पहले आपका लक्ष्य समझे।

प्रोडक्टिविटीटास्क और प्रोजेक्ट

code-review-checklist

8.2k

यह आपके एजेंट को सही होने, सुरक्षा, प्रदर्शन, परीक्षण और डॉक्यूमेंटेशन के लिए कोड जाँचने की चेकलिस्ट देती है, AI से जुड़े जोखिमों सहित।

कोडिंगसामान्य कोडिंग

code-review-graph

8.2k

यह आपके एजेंट को संरचना के मानचित्र से बड़े प्रोजेक्ट में कोड समीक्षा करने में मदद करती है, ताकि वह केवल बदलाव से प्रभावित फ़ाइलें पढ़े।

कोडिंगसामान्य कोडिंग

context-compression

8.2k

यह आपके एजेंट को पूरे हो चुके काम का सार बनाकर और मुख्य फ़ैसले रखकर लंबे चैट सत्र छोटे करना सिखाती है, ताकि वह केंद्रित रहे।

AI और एजेंटएजेंट

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