Skip to main content

serena-refactor

This skill should be used when the user asks to "rename function", "refactor code", "rename symbol across codebase", "change function signature", "restructure code safely", or mentions Serena's rename_symbol or replace_symbol_body tools.

Ir para a instalação

Informações da origem

Repositório
anilcancakir/claude-code-plugins
Última atividade na origem
26 de janeiro de 2026 às 13:27
Idioma detectado do SKILL.md
inglês
Estrelas
6
Forks
1

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
serena-refactor
description
This skill should be used when the user asks to "rename function", "refactor code", "rename symbol across codebase", "change function signature", "restructure code safely", or mentions Serena's rename_symbol or replace_symbol_body tools.
# Serena Safe Refactoring ## Cross-Codebase Rename ``` rename_symbol(old_name="calcTax", new_name="calculate_tax") ``` - Updates ALL references automatically - Works across files - Handles imports/exports ## Replace Function Body ``` replace_symbol_body(symbol_name="process_payment", new_body="...") ``` - Preserves function signature - Safer than text replacement - Maintains formatting ## Pre-Refactoring Checklist 1. **Check impact**: ``` find_referencing_symbols("function_to_change") ``` Review all affected locations before changing. 2. **Verify tests exist**: ``` find_symbol("test_function_to_change") ``` 3. **Run tests after**: ```bash pytest tests/test_module.py -v ``` ## Common Patterns ### Rename Function ``` 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
Ver no GitHub