serena

Semantic code search, analysis, and editing. Use for understanding code structure, finding classes/functions, refactoring, and impact analysis. Triggers on "where is this function", "show references", "analyze impact" queries

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026⬇️1downloads

When & Why to Use This Skill

Serena is a high-performance semantic code search and editing tool designed to handle large-scale repositories with over 100 files. By operating at the symbol level, it allows for deep code understanding, dependency tracking, and precise refactoring without the need to load entire files into the context window, optimizing both speed and accuracy for complex software engineering tasks.

Use Cases

  • Large-Scale Codebase Navigation: Quickly locate specific class, function, or variable definitions across massive projects using semantic symbol search.
  • Impact Analysis: Trace referencing symbols and dependency chains to understand the potential side effects of code changes before implementation.
  • Precision Refactoring: Execute targeted edits at the symbol level, ensuring architectural consistency while minimizing the risk of introducing bugs in complex systems.
  • Pattern Discovery & Auditing: Search for specific code patterns, API endpoint usages, or technical debt like TODO comments across the entire source tree.
nameserena
descriptionSemantic code search, analysis, and editing. Use for understanding code structure, finding classes/functions, refactoring, and impact analysis. Triggers on "where is this function", "show references", "analyze impact" queries

Serena Tool Guide

Semantic code analysis. Searches and edits at symbol level without reading entire files.

Core Tools

find_symbol

Locate class, function, or variable definitions.

Examples:

  • "Where is the UserService class defined?"
  • "Find the authenticate function definition"

search_for_pattern

Search for code patterns or strings.

Examples:

  • "Find all TODO comments"
  • "Locate all API endpoint usages"

edit_symbol

Edit at symbol level without loading entire files.

find_referencing_symbols

Track symbol references and dependencies.

Examples:

  • "Show all callers of this function"
  • "Find dependency chain"

When to Use

  • Large codebases (100+ files)
  • Semantic search (understanding code meaning)
  • Refactoring (precise edits required)
  • Dependency tracking
  • Code structure analysis

Common Workflows

Code understanding:

  1. find_symbol to locate main classes/functions
  2. find_referencing_symbols to trace callers
  3. Build overall understanding

Refactoring:

  1. find_symbol to identify target
  2. edit_symbol to modify
  3. find_referencing_symbols to verify impact

Bug fixing:

  1. search_for_pattern to find error-related code
  2. find_symbol to examine details
  3. edit_symbol to fix

Examples

User: Find authentication code

Agent: Uses Serena to search for authentication-related code and explains


User: What calls UserService?

Agent: Shows all references


User: Refactor this code

Agent: Analyzes impact and proposes changes