serena-edit

Edit code by targeting symbols to modify functions, hooks, or components.

Updated Jun 17, 2025
One-click install
npx skills add https://github.com/Karlito8888/new-ggv-gps --skill serena-edit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: serena-edit
Source: https://github.com/Karlito8888/new-ggv-gps/tree/main/.claude/skills/serena-edit
Command: npx skills add https://github.com/Karlito8888/new-ggv-gps --skill serena-edit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables precise code edits by symbol, avoiding full-file rewrites and reducing risk during refactors.

Core Features & Use Cases

  • Symbol-level edits: Replace a function body, rename a symbol with references updated, or insert new symbols without touching unrelated code.
  • Safe refactoring: Update dependencies and references consistently across the project.
  • Incremental changes: Add or remove a symbol with minimal diff.

Quick Start

To modify the getPolygonCenter function, use mcp__serena__replace_symbol_body with the symbol_name 'getPolygonCenter' in the target file 'src/hooks/useMapConfig.js' and provide the new body.

Frequently Asked Questions about serena-edit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor code without rewriting entire files?

Symbol-level editing lets you target specific functions, hooks, or components and modify just their bodies or names while preserving unrelated code. This reduces risk during refactors by changing only what's necessary across your project.

Can I rename a JavaScript function and update all its references automatically?

Yes. Symbol-based editing can rename a symbol and automatically update all references throughout your project, ensuring consistency without manual search-and-replace across files.

What's the best way to add or remove a hook in a large codebase?

Use symbol-level tools to add or delete a hook as a discrete symbol without touching surrounding code. This produces minimal diffs and reduces the surface area for bugs during incremental changes.

How do I safely replace a function body in production code?

Target the specific function by symbol, provide the new body, and verify the build. Symbol-based edits isolate your change to a single function, minimizing unintended side effects in dependent code.

Can I use symbol-based editing to refactor React components?

Yes. You can modify component functions, replace hook logic, or rename symbols with reference updates across your React codebase, all at the symbol level without full-file rewrites.

What preparation do I need before making symbol-level edits?

Identify the exact symbol name and target file, then use dedicated tools like find_symbol to locate it precisely. After editing, run a build to verify that edits compile and dependencies remain consistent.