Rename symbol

From berkcangumusisik/claude-code-practices · View interactive version

Rename symbol is an AI agent skill from the GitHub repository berkcangumusisik/claude-code-practices. Safely renames a function, variable, type, or class across the entire codebase

How to use this skill

Skill file

Rename Symbol

Old name: $1

New name: $2

  1. Find all occurrences:
grep -rn "\b$1\b" . --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" --exclude-dir=node_modules --exclude-dir=dist
  1. Categorize occurrences:
  1. Show the full list. Flag any in string literals or external-facing API contracts as risky.
  1. Ask for confirmation, then rename all (except flagged ones).
  1. Run type check to verify:
npx tsc --noEmit

Report any errors introduced.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.