analyzing-dotnet-performance

Featured

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.

API & Backend 6,272 stars 499 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# .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 Reference Files (if available) Try to load `references/critical-patterns.md` and the topic-specific reference files listed below. These contain detailed detection recipes and grep commands. **If reference files are not found** (e.g., in a sandboxed environment or when the skill is embedded as instructions only), **skip file load...

Details

Author
dotnet
Repository
dotnet/skills
Created
9 months ago
Last Updated
today
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Featured

dotnet-trace-collect

Guide developers through capturing diagnostic artifacts to diagnose production .NET performance issues. Use when the user needs help choosing diagnostic tools, collecting performance data, or understanding tool trade-offs across different environments (Windows/Linux, .NET Framework/modern .NET, container/non-container).

6,272 Updated today
dotnet
DevOps & Infrastructure Listed

anti-pattern-detector

Detects and prevents common performance, concurrency, caching, monitoring, infrastructure, and build anti-patterns in code. Use when reviewing code for reliability issues, debugging race conditions or deadlocks, optimizing cache strategies, auditing monitoring coverage, validating infrastructure configs, or checking build/deploy safety. Triggers on: anti-pattern, race condition, deadlock, cache stampede, retry storm, circuit breaker, log flooding, SPOF, config drift, dependency hell, docker bloat, migration safety, fire-and-forget, TOCTOU, ABA problem, thundering herd, cold start.

1 Updated 1 weeks ago
novahiz
Testing & QA Featured

test-anti-patterns

Quick pragmatic review of .NET test code for anti-patterns that undermine reliability and diagnostic value. Use when asked to review tests, find test problems, check test quality, or audit tests for common mistakes. Catches assertion gaps, flakiness indicators, over-mocking, naming issues, and structural problems with actionable fixes. Use for periodic test code reviews and PR feedback. For a deep formal audit based on academic test smell taxonomy, use exp-test-smell-detection instead. Works with MSTest, xUnit, NUnit, and TUnit.

6,272 Updated today
dotnet