find-replace

Performs batched regex-based find-and-replace across files using sd CLI and rg/fd selection.

29|6|Updated Nov 27, 2025
One-click install
npx skills add https://github.com/0xDarkMatter/claude-mods --skill find-replace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: find-replace
Source: https://github.com/0xDarkMatter/claude-mods/tree/main/skills/find-replace
Command: npx skills add https://github.com/0xDarkMatter/claude-mods --skill find-replace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sd.

What problem does it solve?

This Skill eliminates the tedious process of manual find-and-replace operations by providing modern replacement tools with simpler syntax.

Frequently Asked Questions about find-replace

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I batch replace text across multiple files in my codebase?

Batch find-and-replace across files using the sd CLI tool with regex pattern support. The sd command performs replacements safely with preview verification before applying changes, making it ideal for renaming variables, updating import paths, and migrating API endpoints across your entire codebase.

Can I use regex patterns and capture groups with batch replacement?

Yes, sd supports regex patterns, word boundaries, capture groups, and special character escaping. You can integrate sd with rg or fd for precise file selection, enabling complex pattern matching and auditable replacements with full verification before commit.

What's the safest way to perform find-and-replace without accidentally breaking code?

Use sd's preview and verification workflow: first list affected files with rg or fd, review the matches, then apply replacements with sd while maintaining an auditable log of changes. This staged approach lets you catch errors before they affect your codebase.

How do I handle special characters and escaping in find-and-replace operations?

The sd CLI handles escaping for special characters automatically, simplifying syntax compared to traditional tools. You can safely replace patterns containing regex metacharacters, quotes, and escaped sequences without manual quoting.

Can batch replacement work with configuration and documentation files, or just code?

Batch find-and-replace applies to codebases, configuration files, and documentation. Common tasks include updating API endpoints, migrating settings, and bulk pattern replacements across any text-based file structure in your project.