find_referencing_symbols("old_name") # Check impact
rename_symbol(old_name="old_name", new_name="new_name")
# Run tests
Replace Implementation
find_symbol("function_name", include_body=true) # See current
replace_symbol_body("function_name", new_body="...")
# Run tests
Safety Notes
Always check references before renaming
Run tests after each refactoring step
Document patterns in Serena memory for future reference
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: anilcancakir-claude-code-plugins-serena-refactor3description: Serena Safe Refactoring4---56# Serena Safe Refactoring78## Cross-Codebase Rename910```11rename_symbol(old_name="calcTax", new_name="calculate_tax")12```13- Updates ALL references automatically14- Works across files15- Handles imports/exports1617## Replace Function Body1819```20replace_symbol_body(symbol_name="process_payment", new_body="...")21```22- Preserves function signature23- Safer than text replacement24- Maintains formatting2526## Pre-Refactoring Checklist27281. **Check impact**:29 ```30 find_referencing_symbols("function_to_change")31 ```32 Review all affected locations before changing.33342. **Verify tests exist**:35 ```36 find_symbol("test_function_to_change")37 ```38393. **Run tests after**:40 ```bash41 pytest tests/test_module.py -v42 ```4344## Common Patterns4546### Rename Function47```48find_referencing_symbols("old_name") # Check impact49rename_symbol(old_name="old_name", new_name="new_name")50# Run tests51```5253### Replace Implementation54```55find_symbol("function_name", include_body=true) # See current56replace_symbol_body("function_name", new_body="...")57# Run tests58```5960## Safety Notes6162- Always check references before renaming63- Run tests after each refactoring step64- Document patterns in Serena memory for future reference6566---67> Converted and distributed by [TomeVault](https://tomevault.io/claim/anilcancakir) — claim your Tome and manage your conversions.68<!-- tomevault:4.0:skill_md:2026-04-13 -->
Run npx skillmds@latest add tomevault-io/anilcancakir-claude-code-plugins-serena-refactor in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Serena Safe Refactoring It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.