/project-toolkit:using-serena-symbolsfrom project-toolkit
Guidance for using Serena's LSP-powered symbol analysis to find definitions, trace references, and explore file structure when text search is imprecise.
Ships in project-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Serena provides LSP-powered code intelligence for accurate symbol extraction, relationship discovery, and cross-file analysis.
| Use Serena | Use Grep/Text Search |
|---|---|
| Finding class/function definitions | Searching for string literals |
| Tracing method references | Finding patterns in comments |
| Understanding call hierarchies | Searching config files |
| Analyzing imports/dependencies | Finding TODO/FIXME markers |
| Cross-file architecture analysis | Simple keyword search |
Key advantage: Serena understands code structure. find_symbol("UserService") finds the actual class definition, not every mention of "UserService" in comments or strings.
Get high-level view of symbols in a file. Start here when exploring a new file.
mcp__plugin_serena_serena__get_symbols_overview(
{
"relative_path": "src/services/auth.py",
"depth": 1, # 0=top-level only, 1=include methods
}
)
Returns: Classes, functions, variables with their kind and location.
Find symbols by name pattern. Supports flexible matching.
Name path patterns:
UserService - Find any symbol named "UserService"UserService/authenticate - Find method in class/UserService - Exact match (absolute path)Service with substring_matching: true - Matches "UserService", "AuthService", etc.mcp__plugin_serena_serena__find_symbol(
{
"name_path_pattern": "UserService/authenticate",
"include_body": true, # Get source code
"depth": 0, # 0=just this symbol, 1=include children
}
)
Key parameters:
include_body (bool): Include source code (use judiciously for context)depth (int): How many levels of children to retrieverelative_path (str): Restrict search to file/directorysubstring_matching (bool): Partial name matchingFind all references to a symbol. Essential for understanding impact.
mcp__plugin_serena_serena__find_referencing_symbols(
{"name_path": "UserService/authenticate", "relative_path": "src/services/auth.py"}
)
Returns: Code snippets showing each reference with context.
Regex search when you need flexibility (like grep, but smarter file filtering).
mcp__plugin_serena_serena__search_for_pattern(
{
"substring_pattern": "def.*async.*:",
"restrict_search_to_code_files": true,
"context_lines_before": 2,
"context_lines_after": 2,
}
)
Directory structure - Understand layout
mcp__plugin_serena_serena__list_dir({"relative_path": ".", "recursive": false})
Entry points - Find main files
mcp__plugin_serena_serena__get_symbols_overview({"relative_path": "src/main.py", "depth": 1})
Trace key classes - Understand structure
mcp__plugin_serena_serena__find_symbol(
{"name_path_pattern": "App", "include_body": false, "depth": 1}
)
Find the class with children
mcp__plugin_serena_serena__find_symbol(
{"name_path_pattern": "AuthService", "depth": 1, "include_body": false}
)
Read specific methods you need
mcp__plugin_serena_serena__find_symbol(
{"name_path_pattern": "AuthService/validate_token", "include_body": true}
)
Find who calls it
mcp__plugin_serena_serena__find_referencing_symbols(
{"name_path": "AuthService/validate_token", "relative_path": "src/services/auth.py"}
)
Find all imports of a module
mcp__plugin_serena_serena__search_for_pattern(
{"substring_pattern": "from.*auth.*import|import.*auth", "restrict_search_to_code_files": true}
)
Find references to trace usage
mcp__plugin_serena_serena__find_referencing_symbols(
{"name_path": "AuthService", "relative_path": "src/services/auth.py"}
)
LSP symbol kinds (for include_kinds/exclude_kinds filtering):
| Kind | Int | Description |
|---|---|---|
| File | 1 | |
| Module | 2 | |
| Namespace | 3 | |
| Package | 4 | |
| Class | 5 | |
| Method | 6 | |
| Property | 7 | |
| Field | 8 | |
| Constructor | 9 | |
| Enum | 10 | |
| Interface | 11 | |
| Function | 12 | |
| Variable | 13 | |
| Constant | 14 |
Example - find only classes:
mcp__plugin_serena_serena__find_symbol(
{
"name_path_pattern": "Service",
"substring_matching": true,
"include_kinds": [5], # Class only
}
)
relative_path to scope searches - much faster than searching entire codebaseinclude_body: false - get structure first, read code only when neededdepth: 0 initially - expand to children only when exploring specific classesmcp__serena__write_memorySerena writes to the checkout active at server start (--project root),
not your cwd. Call mcp__serena__write_memory, edit_memory,
delete_memory, or rename_memory only from that checkout. A linked worktree
(git rev-parse --git-dir differs from --git-common-dir) never qualifies.
In one, unsure, or without a shell, do not call them: edit .serena/memories/
files in your own checkout, or return the change to the parent session. Delete or
rename only when asked. New memory: <topic>/<name> plus a memory-index.md line.
See universal.md MUST NOT 11.
| Trigger Phrase | Operation |
|---|---|
how do I find a symbol | find_symbol with name_path_pattern |
how do I explore a file's structure | get_symbols_overview with depth |
how do I trace references | find_referencing_symbols |
how do I search code patterns | search_for_pattern with regex |
what methods does this class have | find_symbol with depth=1 |
Use this skill when:
Use Grep/text search instead when:
| Avoid | Why | Instead |
|---|---|---|
| Searching entire codebase without relative_path | Slow, noisy results | Scope with relative_path parameter |
| Starting with include_body=true | Wastes tokens on code you may not need | Start with include_body=false, read selectively |
| Using depth > 1 on large modules | Returns excessive nested symbols | Use depth=0 or depth=1, expand as needed |
| Using text grep for symbol definitions | Matches comments, strings, false positives | Use find_symbol for structural accuracy |
| Skipping get_symbols_overview | Jumping to find_symbol without context | Start with overview to understand file structure |
After symbol analysis:
Serena works with any language that has an LSP server configured:
The specific features available depend on the language server's capabilities.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (rjmurillo/ai-agents) — no native marketplace selected
npx claudepluginhub p/rjmurillo-copilot-cli-agents-src-copilot-cli104 skills in this plugin
/adr-generatorCreate comprehensive Architectural Decision Records (ADRs). Researches the destination directory to detect existing template conventions, gathers context, determines next ADR number, generates the ADR, validates completeness, and saves. Supports multiple ADR formats (MADR, Nygard, Alexandrian, project canonical). Use when documenting technical decisions, creating new ADR files, or capturing rationale so future readers can revisit a choice. Use when you say "write an ADR", "document this decision", "document these design choices", "record why we chose this", "capture the rationale", or "for future maintainers", or when creating an ADR-like markdown file under docs/decisions/, docs/adr/, docs/architecture/, architecture/decisions/, or .project-toolkit/architecture/. Do NOT use to debate or review an existing ADR (use adr-review)./adr-reviewMulti-agent debate orchestration for Architecture Decision Records. Automatically triggers on ADR create/edit/delete. Coordinates architect, critic, independent-thinker, security, analyst, and high-level-advisor agents in structured debate rounds until consensus. Use when you say "review this ADR", when an ADR is created/edited/deleted, or when reviewing, accepting, or updating a decision file under .project-toolkit/architecture/, docs/architecture/, docs/decisions/, docs/adr/, or architecture/decisions/, including intent like "review this decision record" or "check this rationale for future maintainers". Do NOT use to author a new ADR (use adr-generator).2 plugins in one repository ship this exact skill · first indexed Nov 13, 2026
Other plugins' skills for the same job