semantic-rename
Run deterministic TypeScript symbol rename using compiler APIs instead of text replacement.
SKILL.md.claude/skills/semantic-rename/SKILL.md
GitHubUse this skill when a refactor needs a safe symbol rename across files.
Execution steps:
- Identify the exact symbol location (file, 1-based line, 1-based column).
- Run dry-run first:
npm run refactor:rename -- --file <path> --line <line> --column <column> --newName <name> --dryRun
- Review output (
touchedFiles,touchedLocations) and confirm scope. - Apply rename:
npm run refactor:rename -- --file <path> --line <line> --column <column> --newName <name>
- Run verification:
npm run verify:fast
- If verification fails repeatedly, run:
npm run verify:loop -- -Profile fast -MaxAttempts 2
Rules:
- Do not use plain find/replace for symbol rename tasks.
- Keep rename scoped to one change branch.
- Record decision and verify evidence in OpenSpec tasks and session journal.