Agent skill
Serena Usage
This skill should be used when the user asks to "use serena", "semantic search", "symbol analysis", "find references", "code navigation", or needs Serena MCP guidance. Provides Serena tool usage patterns.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/serena-usage-motoki317-dotfiles-2
SKILL.md
Serena MCP Tool Patterns
Core Tools
Symbol Operations
- get_symbols_overview - Get high-level view of file symbols (start with depth=0, increase if needed)
- find_symbol - Find by name path (e.g., "MyClass/myMethod"), use
substring_matchingfor partial names - find_referencing_symbols - Find all references for dependency/impact analysis
- search_for_pattern - Regex search; use
restrict_search_to_code_filesandrelative_pathto scope
Editing Operations
- replace_symbol_body - Replace entire symbol definition
- insert_before_symbol / insert_after_symbol - Add imports, decorators, new functions
- rename_symbol - Rename across codebase with automatic reference updates
Memory Operations
- list_memories - Check existing patterns before implementation
- read_memory - Load project patterns (e.g., "nix-conventions")
- write_memory - Record new patterns for future reference
- edit_memory - Update specific parts using literal or regex mode
- delete_memory - Remove obsolete patterns (user request only)
Reflection Tools (call after searches/before changes)
- think_about_collected_information - After non-trivial search sequences
- think_about_task_adherence - Before making code changes
- think_about_whether_you_are_done - When task appears complete
Key Patterns
File Exploration
get_symbols_overview depth=0- top-level structureget_symbols_overview depth=1- class membersfind_symbol include_body=true- specific implementation
Dependency Tracing
find_symbol- locate the symbolfind_referencing_symbols- find all callers- Repeat for full dependency graph
Memory Workflow
list_memoriesbefore implementationread_memoryfor relevant patternswrite_memoryafter discovering new conventions
Critical Rules
- Always check memories before implementing new features
- Use symbol operations over reading entire files
- Restrict searches by
relative_pathwhen scope is known - Use
rename_symbolfor consistent renaming (not manual updates)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?