Apply operations across multiple files simultaneously. Pattern-based bulk modifications, search-and-replace across codebases, consistent changes to many files at once.
73
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Apply consistent changes across many files at once. One pattern, many targets.
✅ Good for:
❌ Not for:
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"]# 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.
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):
# 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| 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 = |
git stash or commit first)549ba3d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.