Skip to content
Back to skills

Serena Refactor

ASecurity

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.

  • 6 stars
  • 0 votes
  • 0 copies
  • 16 views
  • Added February 7, 2026
developmentbashrefactoring

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add anilcancakir/claude-code-plugins --skill serena-refactor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Serena Refactor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Serena Refactor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anilcancakir-serena-refactor/badge)](https://www.skillsdirectory.com/skills/anilcancakir-serena-refactor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.