본문으로 건너뛰기
cccskills
무료GitHub에 공개

dotnet-serena-code-navigation

Efficient code navigation using Serena MCP symbol operations instead of text search

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

dotnet-serena-code-navigation

Navigate .NET codebases efficiently using Serena MCP symbol operations. Move beyond text search to precise symbol-level navigation.

Trigger

Use when needing to:

  • Find class/method definitions across files
  • Understand project structure and dependencies
  • Navigate complex inheritance hierarchies
  • Jump between related symbols quickly

The Problem with Text Search

Traditional approaches have limitations:

# Text search problems:
- "class UserService" finds comments, strings, unrelated mentions
- Line numbers change, breaking bookmarks
- Can't distinguish method overloads
- Misses inherited members
- No semantic understanding

Serena-First Navigation

1. Finding Definitions

Serena approach:

serena_find_symbol: "OrderService/ProcessOrder"

Text search fallback:

Grep: "public.*void.*ProcessOrder"
Read: src/Services/OrderService.cs

2. Understanding File Structure

Serena approach:

serena_get_symbols_overview: "src/Services/OrderService.cs"

Returns:

  • All types in file
  • Methods and properties
  • Inheritance relationships
  • Namespace organization

Text search fallback:

Read: src/Services/OrderService.cs
Grep: "^    (public|private|protected)"

3. Tracking References

Serena approach:

serena_find_referencing_symbols: "OrderService"

Shows:

  • All usages across codebase
  • Dependency direction
  • Impact analysis

Text search fallback:

Grep: "OrderService"
# Manual filtering of false positives

Common Navigation Patterns

Pattern 1: Jump to Implementation

# Scenario: Find where interface method is implemented

serena_find_symbol: "IOrderRepository/SaveAsync"
# Get implementing types
serena_find_referencing_symbols: "IOrderRepository"
# Navigate to concrete implementation

Pattern 2: Understand Call Hierarchy

# Scenario: Who calls this method?

serena_find_referencing_symbols: "OrderService/ProcessOrder"
# Returns all callers with context

Pattern 3: Navigate Inheritance

# Scenario: Find all implementations of an abstract method

serena_find_symbol: "BaseService/Execute"
serena_find_referencing_symbols: "BaseService"
# Review each derived type

When to Use Serena vs Text Search

ScenarioSerenaText Search
Find definition by name✅ PrimaryFallback
Understand file structure✅ PrimaryFallback
Track references✅ PrimaryFallback
Search by pattern/content❌ Not suitable✅ Primary
Read full file context❌ Not suitable✅ Primary
Regex-based search❌ Not suitable✅ Primary

Practical Examples

Example 1: Refactoring a Method

# Step 1: Find all references
serena_find_referencing_symbols: "OrderService/CalculateTotal"

# Step 2: Understand signature
serena_get_symbols_overview: "src/Services/OrderService.cs"

# Step 3: Replace with new signature
serena_replace_symbol_body: "OrderService/CalculateTotal"

Example 2: Understanding Dependencies

# Step 1: Get entry point structure
serena_get_symbols_overview: "src/Program.cs"

# Step 2: Follow service registration
serena_find_symbol: "Program/ConfigureServices"
serena_find_referencing_symbols: "IOrderService"

# Step 3: Analyze dependency chain
serena_get_symbols_overview: "src/Services/OrderService.cs"

Best Practices

1. Always Check Symbol Exists

# Good
result = serena_find_symbol: "UserService"
if not found:
    # Try text search or different name
    Grep: "UserService"

2. Combine with Traditional Tools

# Use Serena for navigation
serena_find_symbol: "OrderService/ProcessOrder"

# Use Read for understanding implementation
Read: src/Services/OrderService.cs (lines 45-80)

3. Cache Symbol Information

# In agent memory or notes:
"OrderService defined in src/Services/OrderService.cs:15"
"ProcessOrder has 5 references"

Troubleshooting

Issue: Symbol Not Found

Cause: LSP server not running or file not indexed

Solution:

# Fallback to text search
Grep: "class OrderService"
Read: found_file.cs

Issue: Outdated Symbol Info

Cause: File changed since last index

Solution:

# Re-trigger indexing by opening file
Read: src/Services/OrderService.cs

# Or use text search for recent changes
Grep: "public void NewMethod"

Issue: Partial Matches

Cause: Symbol name ambiguous

Solution:

# Use fully qualified name
serena_find_symbol: "MyApp.Services.OrderService"

# Or search with namespace context
serena_get_symbols_overview: "src/Services/OrderService.cs"

Performance Tips

  1. Use symbol overview first - Faster than reading entire file
  2. Cache symbol locations - Avoid repeated searches
  3. Follow references incrementally - Don't load entire graph at once
  4. Combine operations - Get overview, then dive into specific symbols

Integration with Other Skills

  • [skill:dotnet-solution-navigation] - Project structure basics
  • [skill:dotnet-csharp-coding-standards] - C# conventions
  • [skill:dotnet-serena-refactoring] - Symbol-level refactoring
  • [skill:dotnet-serena-analysis-patterns] - Code analysis with symbols

Example Agent Session

User: "I need to understand how Order processing works"

Agent:
1. serena_find_symbol: "OrderProcessingService"
2. serena_get_symbols_overview: "src/Services/OrderProcessingService.cs"
3. serena_find_referencing_symbols: "OrderProcessingService"
4. serena_find_symbol: "OrderProcessingService/ProcessOrder"
5. Read: specific implementation details

Result: Complete understanding with minimal file reads

Migration from Text Search

Before (Text-Heavy)

Read: src/Program.cs
Grep: "OrderService"
Read: src/Services/OrderService.cs
Grep: "ProcessOrder"
Read: found references

After (Serena-First)

serena_find_symbol: "OrderService"
serena_get_symbols_overview: "src/Services/OrderService.cs"
serena_find_referencing_symbols: "OrderService/ProcessOrder"
Read: specific implementations only

Result: 60% fewer file reads, precise targeting, better accuracy.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Patterns and techniques for evaluating and improving AI agent outputs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rudironsoni/Synaxis22026년 3월 17일 업데이트

Comprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for safety, bias, security vulnerabilities, and effectiveness while providing detailed improvement recommendations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rudironsoni/Synaxis22026년 3월 17일 업데이트

Use when user requests research requiring multiple sources, comprehensive analysis, or synthesis across topics - technical research, domain knowledge gathering, market analysis, or learning about complex subjects

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rudironsoni/Synaxis22026년 3월 17일 업데이트

deep-wiki

무료

AI-powered wiki generation for code repositories with commands, agents, and skills

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rudironsoni/Synaxis22026년 3월 17일 업데이트

Use when building .NET 10 or C# 14 applications; when using minimal APIs, modular monolith patterns, or feature folders; when implementing HTTP resilience, Options pattern, Channels, or validation; when seeing outdated patterns like old extension method syntax

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rudironsoni/Synaxis22026년 3월 17일 업데이트

Implements accessible .NET UI. SemanticProperties, ARIA, AutomationPeer, testing per platform.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

rudironsoni/Synaxis22026년 3월 17일 업데이트

rudironsoni의 스킬 모두 보기

이 스킬의 문제 신고