Skip to content
Back to skills

Dotnet Analyzer Code Intelligence

ASecurity

Navigate and understand C# code through symbol queries, type hierarchies, call graphs, and semantic analysis using Roslyn-powered MCP tools. Use when the user asks to find references, go to definition, understand type inheritance, explore call hierarchies, get symbol info, analyze code metrics, or traverse syntax trees. USE FOR: finding all references to a symbol, locating definitions, getting type hierarchy, understanding class inheritance chains, finding method overrides and interface imple...

  • 2 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 24, 2026
code-qualitygoc#shellnode

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add CartapenaBark/DotNetAnalyzer --skill dotnet-analyzer-code-intelligence --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dotnet Analyzer Code Intelligence?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dotnet Analyzer Code Intelligence
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cartapenabark-dotnet-analyzer-code-intelligence/badge)](https://www.skillsdirectory.com/skills/cartapenabark-dotnet-analyzer-code-intelligence)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dotnet-analyzer-code-intelligence
description: >
  Navigate and understand C# code through symbol queries, type hierarchies, call graphs,
  and semantic analysis using Roslyn-powered MCP tools.
  Use when the user asks to find references, go to definition, understand type inheritance,
  explore call hierarchies, get symbol info, analyze code metrics, or traverse syntax trees.
  USE FOR: finding all references to a symbol, locating definitions, getting type hierarchy,
  understanding class inheritance chains, finding method overrides and interface implementations,
  getting caller/callee info, generating call graphs, navigating to definitions,
  resolving symbols, getting semantic model details, analyzing syntax trees,
  calculating code metrics (cyclomatic complexity, maintainability index).
  DO NOT USE FOR: understanding overall project structure or listing projects
  → use dotnet-analyzer-project-analysis instead.
  DO NOT USE FOR: checking code quality, detecting code smells, or architecture violations
  → use dotnet-analyzer-code-quality instead.
  Covers .NET, C#, Roslyn, symbol navigation, type hierarchy, call graph, references,
  definitions, semantic model, syntax tree, code metrics, Go to Definition, Find All References.
---

# .NET Code Intelligence

Navigate and understand C# code through symbol queries, type hierarchies, call graphs, and semantic analysis.

## Prerequisite Check

**Before any analysis, verify dotnet-analyzer is installed:**

1. Run `dotnet-analyzer --version` in a shell
2. If it fails, ask the user: "DotNetAnalyzer global tool is not installed. Shall I run `dotnet tool install --global DotNetAnalyzer` for you?"
   - If confirmed, run the install command and continue
   - If declined, provide the manual install command and stop

## Available MCP Tools

Use these MCP tools (prefixed with `mcp__plugin_netan_dotnet-analyzer__`):

| Tool | Purpose | Key Parameters |
|------|---------|----------------|
| `find_references` | Find all references to a symbol | `projectPath`, `filePath`, `line`, `column` |
| `find_declarations` | Find symbol declaration locations | `projectPath`, `filePath`, `line`, `column` |
| `get_symbol_info` | Get detailed symbol metadata | `projectPath`, `filePath`, `line`, `column` |
| `resolve_symbol` | Resolve a symbol by name | `projectPath`, `filePath`, `line`, `column` |
| `go_to_definition` | Jump to symbol definition | `filePath`, `line`, `column` |
| `get_type_hierarchy` | Full type inheritance chain | `projectPath`, `typeName` |
| `get_member_hierarchy` | Member override/implementation chain | `projectPath`, `memberName`, `containingType` |
| `get_semantic_model` | Semantic info at a position | `filePath`, `line`, `column` |
| `get_syntax_tree` | Syntax tree structure as JSON | `filePath`, optional `range`, `maxDepth` |
| `get_code_metrics` | Complexity and quality metrics | `projectPath`, `filePath` |
| `get_caller_info` | Find all callers of a method | `projectPath`, `filePath`, `line`, `column` |
| `get_callee_info` | Find all methods called by a method | `projectPath`, `filePath`, `line`, `column` |
| `get_call_graph` | Generate call graph (DOT/JSON/Mermaid) | `projectPath`, `filePath`, optional `format` |
| `get_definition_and_references` | Combined definition + references | `projectPath`, `filePath`, `line`, `column` |

## Workflow

### Finding References

1. **Locate the symbol**: Get file path, line, and column (0-based)
2. **Call `find_references`**: Returns all reference locations with context snippets
3. **Distinguish definition vs reference**: Each result includes `isDefinition` flag
4. **Present**: Group by file, show context snippets

### Understanding Type Hierarchy

1. **Get type name**: From symbol info or user input
2. **Call `get_type_hierarchy`**: Returns base types, derived types, interfaces, and members
3. **Deep dive**: Use `get_member_hierarchy` for specific member override chains
4. **Present**: Show inheritance tree with file locations

### Analyzing Call Graphs

1. **Locate the method**: Get file path, line, and column
2. **Call `get_call_graph`**: Returns nodes, edges, and complexity metrics
3. **Optional formats**: DOT (Graphviz), JSON, Mermaid, SVG
4. **Present**: Visualize the call graph or summarize key relationships

### Code Metrics

1. **Call `get_code_metrics`**: Returns cyclomatic complexity, lines of code, maintainability index
2. **Review statistics**: Min, max, average, standard deviation, outliers
3. **Flag high-complexity methods**: Cyclomatic complexity > 15

## Output Format

Present findings with:
- Symbol name, kind, and containing type
- File locations with line numbers (clickable links)
- Hierarchical/tree views for type and member relationships
- Summary statistics for metrics
- Context code snippets for references

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in code-quality →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.