batch-operations
यह क्या करती है
यह स्किल आपके AI को प्रोजेक्ट की कई फ़ाइलों में एक ही तरह का एडिट लागू करने देती है। यह उन डेवलपर्स के लिए है जिन्हें हर जगह एक जैसा रेनेम या अपडेट करना है।
कब इस्तेमाल करें
- ✓जब आप कोडबेस में किसी फ़ंक्शन या कंपोनेंट का नाम हर जगह बदलना चाहें।
- ✓जब आपको कई फ़ाइलों में वर्ज़न नंबर या इम्पोर्ट अपडेट करना हो।
- ✓जब आप प्रोजेक्ट को एक लाइब्रेरी से दूसरी पर कई फ़ाइलों में ले जा रहे हों।
Skill का लिंक
https://github.com/vudovn/ag-kit/blob/main/.agents/skills/batch-operations/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
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
- Preview first — always show affected files before modifying
- Git safety — ensure clean working directory (
git stashor commit first) - Exclude tests — often tests need different treatment than source
- Verify after — run build + tests after every batch operation
- 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
कमेंट
- …
इस repository की और skills
brainstorming
8.2kयह आपके एजेंट को कुछ भी नया या जटिल बनाने से पहले स्पष्ट सवाल पूछना सिखाती है, ताकि वह पहले आपका लक्ष्य समझे।
code-review-checklist
8.2kयह आपके एजेंट को सही होने, सुरक्षा, प्रदर्शन, परीक्षण और डॉक्यूमेंटेशन के लिए कोड जाँचने की चेकलिस्ट देती है, AI से जुड़े जोखिमों सहित।
code-review-graph
8.2kयह आपके एजेंट को संरचना के मानचित्र से बड़े प्रोजेक्ट में कोड समीक्षा करने में मदद करती है, ताकि वह केवल बदलाव से प्रभावित फ़ाइलें पढ़े।
context-compression
8.2kयह आपके एजेंट को पूरे हो चुके काम का सार बनाकर और मुख्य फ़ैसले रखकर लंबे चैट सत्र छोटे करना सिखाती है, ताकि वह केंद्रित रहे।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।