一键导入
replacing-text
Use when performing text find & replace, batch transformations across files, or when JavaScript-style regex syntax is preferred over sed
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when performing text find & replace, batch transformations across files, or when JavaScript-style regex syntax is preferred over sed
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when implementing any feature or fix using TDD, before writing any implementation code
Use when domain logic leaks into API/Infrastructure, project references violate layer boundaries, or you need to decide between CQS (always), CQRS bus (complex domains), and DDD patterns (invariants and events).
Use when configuring Git hooks in .NET projects before team commits occur, to enforce commit message standards and code formatting automatically
Use before writing any test or implementation task, when observable behavior needs to be captured in business language scenarios and approved by the user before code begins
Use when running mutation testing, killing mutants, verifying test quality, checking mutation score, or analyzing survivors after the test baseline is green
Use when writing tests from the outside-in, defining behavior before code, or any feature where tests should start from observable business behavior and let internal design emerge
| name | replacing-text |
| description | Use when performing text find & replace, batch transformations across files, or when JavaScript-style regex syntax is preferred over sed |
Always invoke replacing-text skill for find & replace operations - do not execute bash commands directly.
Use sd for intuitive text replacement that's 2-12x faster than sed.
Use sd when:
Use ripgrep when:
Common workflow: searching-text skill → replacing-text skill (search first, then replace)
Invoke replacing-text skill for fast find & replace operations. Use when performing replacements on known patterns, batch text transformations across files, or need JavaScript-style regex syntax.
Common workflow: searching-text skill → replacing-text skill (search first, then replace) or finding-files skill → replacing-text skill for batch operations.
-F for string-literal mode (no regex)$1, $2 or ${var} for capture groups--preview to preview changes-- before patterns starting with -$$ for literal $ in replacementReplace text with familiar JavaScript/Python regex syntax - no sed escape hell.
For comprehensive find & replace patterns, regex syntax examples, and workflow tips, load sd guide when needing:
The guide includes:
# Find and replace across project
fd -e js -x sd "oldPattern" "newPattern" --preview
# Chain transformations
cat config.json | jq '.version' | sd '"v' '' | sd '"' '' | xargs git tag
# Interactive replacement with preview
rg "deprecated" -l | fzf --multi | xargs sd "deprecated" "legacy" --preview | bat