Find and update copy across the codebase

Have Claude Code find a phrase and its near variants across the project, show each one in context, then change the wording while leaving tests alone.

Task: Find and update copy across the codebase · Other tasks

Fill in the details

Optional. Tests and the changelog are always left alone. Add any other files or folders that must keep the old wording.

Copy your prompt

This site doesn't run Claude or show model output. Results depend on your input and the model you use.

2 required fields are empty.

What you type is kept in this tab's session storage so a reload doesn't lose it. Use "Clear this task" to remove it. Browsers can restore session data when they reopen tabs, so closing a tab isn't a guaranteed way to erase it.

When to use this template

  • A label, button text, product name or call to action has changed, and the old wording is spread across components, pages, emails and docs.
  • The phrase appears in slightly different forms in different places, so a single exact find and replace in your editor would leave some of them behind.
  • You work on design, docs or marketing and want to review every visible change before it lands, without reading the code yourself.

When not to use it

  • The wording lives in a content management system or a translation service rather than in the repository. Claude Code can only change the files it can read; update it there instead.
  • You want to rename a code identifier, such as a function, variable or database column. That is a refactor with different risks; plan it as a code change instead.
  • The new wording still needs approval from someone else. Settle the text first, then run this once, so the project is not edited twice.

Why this structure

  • The opening line names the old and new wording and the default exclusions in one sentence, so the scope is clear before Claude searches anything.
  • Step 1 spells out what counts as a close variant. Without that list, a search tends to stop at exact matches and leave the variants behind.
  • Step 2 asks for each match in context, with exact matches and variants listed apart. That lets you reject a match that uses the same words in a different sense before anything is edited.
  • The setting in step 3 decides whether Claude pauses after the list. The default waits for you, which suits wording that has to be checked by someone else.
  • Step 6 searches again after editing and runs the project's checks. The search reports any matches that remain, the tests report failures in the code they cover, and a separate rule says what to do with tests that expect the old text.
  • The closing report lists what was left unchanged and why, which is the part you most need to check in a change like this.

Example input (fictional)

Current wording
Sign up free
New wording
Start free trial
Also leave alone
the archived blog posts under content/blog/2023/
After the list of matches
stop and wait for my go-ahead before you edit anything

Follow-ups to send Claude

  • Show me the full diff of the wording changes, grouped by page or component.
  • Which tests still expect the old wording? List them with file and line, but do not change them yet.
  • Search the translation files for the same message key and tell me which languages still use the old meaning.

Common mistakes

  • Asking for the change without the exclusions. Test fixtures and changelog entries often contain the old wording on purpose, and editing them rewrites history or breaks tests.
  • Letting Claude edit before you have seen the list. A phrase can mean different things in different places, and the list is the cheap moment to catch that.
  • Relying only on rewind to undo a bad edit. Checkpoints cover Claude's file edits but not changes made through shell commands, so commit or stash your own work before you start.
  • Edit a draft for clarity: Make a draft clearer for a named reader while keeping your meaning and voice, with a short list of what changed and why.
  • Migrate a pattern across a codebase: Move every use of an old API, library or pattern to its replacement: Claude Code lists each place first, then changes them in checked batches.
  • Review your changes before you commit: Have Claude Code review uncommitted changes against their intent and flag risks by severity, asking before any check that could change files.

See all templates

Sources