.NET Performance Scan
Scans .NET code for about fifty performance anti-patterns with severity tiers.
Install
npx skills add dotnet/skills --skill analyzing-dotnet-performance -g -a claude-code -y- Repository
- dotnet/skills5.8k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- No, instructions only
What it does
Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I/O with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.
.NET Performance Patterns
Scan C#/.NET code for performance anti-patterns and produce prioritized findings with concrete fixes. Patterns sourced from the official .NET performance blog series, distilled to customer-actionable guidance.
When to Use
- Reviewing C#/.NET code for performance optimization opportunities
- Auditing hot paths for allocation-heavy or inefficient patterns
- Systematic scan of a codebase for known anti-patterns before release
- Second-opinion analysis after manual performance review
When Not to Use
- Algorithmic complexity analysis, this skill targets API usage patterns, not algorithm design
- Code not on a hot path with no performance requirements, avoid premature optimization
Inputs
| Input | Required | Description |
|---|---|---|
| Source code | Yes | C# files, code blocks, or repository paths to scan |
| Hot-path context | Recommended | Which code paths are performance-critical |
| Target framework | Recommended | .NET version (some patterns require .NET 8+) |
| Scan depth | Optional | critical-only, standard (default), or comprehensive |
Workflow
Step 1: Load Critical Reference
Resolve bundled paths from the directory that contains this SKILL.md, not from the user's workspace. Load this reference file first:
references/critical-patterns.md
If a direct read fails, list this skill's references/ directory once and retry only when the listing shows the expected file. Do not use workspace file or text search to locate the skill installation.
Step 2: Detect Code Signals and Select Topic Recipes
Scan the code for signals that indicate which pattern categories to check. Use the ## Detection section from the critical reference when available and the inline recipes in Step 3 for initial signal detection.
After detecting signals, load only the topic-specific references selected by scan depth:
