find-replace
БесплатноЗапускает вложенные скриптыНе проверенModern find-and-replace using sd (simpler than sed) and batch replacement patterns. Triggers on: sd, find replace, batch replace, sed replacement, string…
от aiskillstore★ 509 звёзд на GitHubОб этом скилле
Find Replace
Modern find-and-replace using sd.
sd Basics
# Replace in file (in-place)
sd 'oldText' 'newText' file.txt
# Replace in multiple files
sd 'oldText' 'newText' *.js
# Preview without changing (pipe)
cat file.txt | sd 'old' 'new'
sd vs sed
| sed | sd |
|---|---|
sed 's/old/new/g' |
sd 'old' 'new' |
sed -i 's/old/new/g' |
sd 'old' 'new' file |
sed 's#path/to#new/path#g' |
sd 'path/to' 'new/path' |
Key difference: sd is global by default, no delimiter issues.
Common Patterns
# Variable/function rename
sd 'oldName' 'newName' src/**/*.ts
# Word boundaries (avoid partial matches)
sd '\boldName\b' 'newName' src/**/*.ts
# Import path update
sd "from '../utils'" "from '@/utils'" src/**/*.ts
# Capture groups
sd 'console\.log\((.*)\)' 'logger.info($1)' src/**/*.js
Safe Batch Workflow
# 1. List affected files
rg -l 'oldPattern' src/
# 2. Preview replacements
rg 'oldPattern' -r 'newPattern' src/
# 3. Apply
sd 'oldPattern' 'newPattern' $(rg -l 'oldPattern' src/)
# 4. Verify
rg 'oldPattern' src/ # Should return nothing
git diff # Review changes
Special Characters
| Character | Escape |
|---|---|
. |
\. |
* |
\* |
[ ] |
\[ \] |
$ |
\$ |
\ |
\\ |
Tips
| Tip | Reason |
|---|---|
Always preview with rg -r first |
Avoid mistakes |
| Use git before bulk changes | Easy rollback |
Use \b for word boundaries |
Avoid partial matches |
| Quote patterns | Prevent shell interpretation |
Additional Resources
For detailed patterns, load:
./references/advanced-patterns.md- Regex, batch workflows, real-world examples
Установить find-replace в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashВложенные файлы
FAQ
Что делает скилл find-replace?
Modern find-and-replace using sd (simpler than sed) and batch replacement patterns. Triggers on: sd, find replace, batch replace, sed replacement, string replacement, rename.
Как установить скилл find-replace?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл find-replace запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic