serena-search

Search file contents using regular expressions and glob filters.

1|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/sachmata/serena-skills --skill serena-search
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: serena-search
Source: https://github.com/sachmata/serena-skills/tree/main/skills/serena-search
Command: npx skills add https://github.com/sachmata/serena-skills --skill serena-search

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a powerful and flexible way to search through your project's codebase using regular expressions and file glob patterns, going beyond simple text matching.

Core Features & Use Cases

  • Regex Search: Find patterns within file contents across your entire project.
  • File Filtering: Narrow down searches using glob patterns for specific file types or directories.
  • Contextual Results: Retrieve lines before and after matches for better understanding.
  • Use Case: Find all instances of a specific API call pattern across all TypeScript files in your src directory, including 2 lines of context before and after each match.

Quick Start

Search for the pattern 'TODO' within the 'src' directory, showing 2 lines of context before and after each match.

Frequently Asked Questions about serena-search

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

FAQPage Schema
How do I search for a regex pattern across specific file types in my project?

You can regex search across specific file types by applying glob filtering alongside pattern matching. This restricts the full-text search to designated file extensions like TypeScript within your project directories.

Can I get context lines before and after a code search match?

Yes, contextual code search results include lines before and after matches. You can specify the exact number of context lines to retrieve, helping you understand the surrounding code where the pattern appears.

What is the best way to find all instances of an API call pattern in non-code files?

The best way to find API call patterns in non-code files is using full-text regex search. It applies pattern identification across various file types without restricting to source code, satisfying exploratory search requirements.

Does file glob filtering work for restricting searches to a specific directory?

Yes, file glob filtering works for restricting searches to a specific directory. You can narrow down your regex pattern matching to target only the files and subdirectories within that defined project scope.

How do I search for TODO comments in my source directory with surrounding code?

You search for TODO comments by running a regex pattern match within your source directory and configuring the context lines option. This retrieves the TODO text along with surrounding code for better understanding.

What are the limitations of using glob patterns for code intelligence search?

Glob pattern search focuses on file filtering and pattern matching rather than deep code intelligence. It excels at exploratory text matching across file types but does not resolve complex semantic relationships or AST-level dependencies.