[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CTZEFMH83QH886JTHZMFZX":3,"skill-same:01M7CTZEFMH83QH886JTHZMFZX":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":28,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7CTZEFMH83QH886JTHZMFZX","analyzing-dotnet-performance",null,"Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I\u002FO with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.","deadmade\u002Fdead-agent-skills","deadmade","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F130925709?v=4","01M7CTQ65AGYR4J9K9TX0YR9V3","01M7CTQ66B4VMJFEDZP4EKKE6K",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: analyzing-dotnet-performance\ndescription: >-\n  Scans .NET code for ~50 performance anti-patterns across async, memory,\n  strings, collections, LINQ, regex, serialization, and I\u002FO with tiered\n  severity classification. Use when analyzing .NET code for optimization\n  opportunities, reviewing hot paths, or auditing allocation-heavy patterns.\nlicense: MIT\n---\n\n# .NET Performance Patterns\n\nScan C#\u002F.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.\n\n## When to Use\n\n- Reviewing C#\u002F.NET code for performance optimization opportunities\n- Auditing hot paths for allocation-heavy or inefficient patterns\n- Systematic scan of a codebase for known anti-patterns before release\n- Second-opinion analysis after manual performance review\n\n## When Not to Use\n\n- **Algorithmic complexity analysis** — this skill targets API usage patterns, not algorithm design\n- **Code not on a hot path** with no performance requirements — avoid premature optimization\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Source code | Yes | C# files, code blocks, or repository paths to scan |\n| Hot-path context | Recommended | Which code paths are performance-critical |\n| Target framework | Recommended | .NET version (some patterns require .NET 8+) |\n| Scan depth | Optional | `critical-only`, `standard` (default), or `comprehensive` |\n\n## Workflow\n\n### Step 1: Load Critical Reference\n\nResolve bundled paths from the directory that contains this `SKILL.md`, not from the user's workspace. Load this reference file first:\n\n- `references\u002Fcritical-patterns.md`\n\nIf a direct read fails, list this skill's `references\u002F` 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.\n\n### Step 2: Detect Code Signals and Select Topic Recipes\n\nScan 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.\n\nAfter detecting signals, load only the topic-specific references selected by scan depth:\n\n- `critical-only`: No additional references (use only `critical-patterns.md`)\n- `standard` (default): Load references matching detected signals from this list:\n  - `references\u002Fasync-patterns.md` — async\u002FTask\u002FValueTask signals\n  - `references\u002Fmemory-and-strings.md` — Span\u002FMemory\u002Fstring allocation signals\n  - `references\u002Fregex-patterns.md` — Regex signals\n  - `references\u002Fcollections-and-linq.md` — Dictionary\u002FList\u002FLINQ signals\n  - `references\u002Fio-and-serialization.md` — JsonSerializer\u002FHttpClient\u002FStream signals\n  - `references\u002Fstructural-patterns.md` — always loaded (unsealed classes checked regardless)\n- `comprehensive`: Load all six topic-specific references above\n\nFor coverage reporting, the selected references are `references\u002Fcritical-patterns.md` plus only the topic-specific references selected above. If any selected reference remains unavailable after retry, use the inline recipes in Step 3 for the missing coverage. Include `Reference coverage: reduced; unavailable: \u003Cpaths>; used inline recipes for missing references.` in the final report, with `\u003Cpaths>` replaced by the missing relative paths of the selected references only.\n\nUse the `## Detection` sections from loaded reference files and the inline recipes in Step 3 for categories whose reference files are unavailable.\n\n| Signal in Code | Topic |\n|----------------|-------|\n| `async`, `await`, `Task`, `ValueTask` | Async patterns |\n| `Span\u003C`, `Memory\u003C`, `stackalloc`, `ArrayPool`, `string.Substring`, `.Replace(`, `.ToLower()`, `+=` in loops, `params` | Memory & strings |\n| `Regex`, `[GeneratedRegex]`, `Regex.Match`, `RegexOptions.Compiled` | Regex patterns |\n| `Dictionary\u003C`, `List\u003C`, `.ToList()`, `.Where(`, `.Select(`, LINQ methods, `static readonly Dictionary\u003C` | Collections & LINQ |\n| `JsonSerializer`, `HttpClient`, `Stream`, `FileStream` | I\u002FO & serialization |\n\nAlways check structural patterns (unsealed classes) regardless of signals.\n\n**Scan depth controls scope:**\n- `critical-only`: Only critical patterns (deadlocks, >10x regressions)\n- `standard` (default): Critical + detected topic patterns\n- `comprehensive`: All pattern categories\n\n### Step 3: Scan and Report\n\n**For files under 500 lines, read the entire file first** — you'll spot most patterns faster than running individual grep recipes. Use grep to confirm counts and catch patterns you might miss visually.\n\nFor each relevant pattern category, run the detection recipes below. Report exact counts, not estimates.\n\n**Core scan recipes** (run these when reference files aren't available):\n```\n# Strings & memory\ngrep -n '\\.IndexOf(\\\"' FILE                    # Missing StringComparison\ngrep -n '\\.Substring(' FILE                    # Substring allocations\ngrep -En '\\.(StartsWith|EndsWith|Contains)\\s*\\(' FILE  # Missing StringComparison\ngrep -n '\\.ToLower()\\|\\.ToUpper()' FILE        # Culture-sensitive + allocation\ngrep -n '\\.Replace(' FILE                      # Chained Replace allocations\ngrep -n 'params ' FILE                         # params array allocation\n\n# Collections & LINQ\ngrep -n '\\.Select\\|\\.Where\\|\\.OrderBy\\|\\.GroupBy' FILE  # LINQ on hot path\ngrep -n '\\.All\\|\\.Any' FILE                    # LINQ on string\u002Fchar\ngrep -n 'new Dictionary\u003C\\|new List\u003C' FILE      # Per-call allocation\ngrep -n 'static readonly Dictionary\u003C' FILE     # FrozenDictionary candidate\n\n# Regex\ngrep -n 'RegexOptions.Compiled' FILE           # Compiled regex budget\ngrep -n 'new Regex(' FILE                      # Per-call regex\ngrep -n 'GeneratedRegex' FILE                  # Positive: source-gen regex\n\n# Structural\ngrep -n 'public class \\|internal class ' FILE  # Unsealed classes\ngrep -n 'sealed class' FILE                    # Already sealed\ngrep -n ': IEquatable' FILE                    # Positive: struct equality\n```\n\n**Rules:**\n- Run every relevant recipe for the detected pattern categories\n- **Emit a scan execution checklist** before classifying findings — list each recipe and the hit count\n- A result of **0 hits** is valid and valuable (confirms good practice)\n- If reference files were loaded, also run their `## Detection` recipes\n\n**Verify-the-Inverse Rule:** For absence patterns, always count both sides and report the ratio (e.g., \"N of M classes are sealed\"). The ratio determines severity — 0\u002F185 is systematic, 12\u002F15 is a consistency fix.\n\n### Step 3b: Cross-File Consistency Check\n\nIf an optimized pattern is found in one file, check whether sibling files (same directory, same interface, same base class) use the un-optimized equivalent. Flag as 🟡 Moderate with the optimized file as evidence.\n\n### Step 3c: Compound Allocation Check\n\nAfter running scan recipes, look for these multi-allocation patterns that single-line recipes miss:\n\n1. **Branched `.Replace()` chains:** Methods that call `.Replace()` across multiple `if\u002Felse` branches — report total allocation count across all branches, not just per-line.\n2. **Cross-method chaining:** When a public method delegates to another method that itself allocates intermediates (e.g., A calls B which does 3 regex replaces, then A calls C), report the total chain cost as one finding.\n3. **Compound `+=` with embedded allocating calls:** Lines like `result += $\"...{Foo().ToLower()}\"` are 2+ allocations (interpolation + ToLower + concatenation) — flag the compound cost, not just the `.ToLower()`.\n4. **`string.Format` specificity:** Distinguish resource-loaded format strings (not fixable) from compile-time literal format strings (fixable with interpolation). Enumerate the actionable sites.\n\n### Step 4: Classify and Prioritize Findings\n\nAssign each finding a severity:\n\n| Severity | Criteria | Action |\n|----------|----------|--------|\n| 🔴 **Critical** | Deadlocks, crashes, security vulnerabilities, >10x regression | Must fix |\n| 🟡 **Moderate** | 2-10x improvement opportunity, best practice for hot paths | Should fix on hot paths |\n| ℹ️ **Info** | Pattern applies but code may not be on a hot path | Consider if profiling shows impact |\n\n**Prioritization rules:**\n1. If the user identified hot-path code, elevate all findings in that code to their maximum severity\n2. If hot-path context is unknown, report 🔴 Critical findings unconditionally; report 🟡 Moderate findings with a note: _\"Impactful if this code is on a hot path\"_\n3. Never suggest micro-optimizations on code that is clearly not performance-sensitive\n\n**Scale-based severity escalation:**\nWhen the same pattern appears across many instances, escalate severity:\n- 1-10 instances of the same anti-pattern → report at the pattern's base severity\n- 11-50 instances → escalate ℹ️ Info patterns to 🟡 Moderate\n- 50+ instances → escalate to 🟡 Moderate with elevated priority; flag as a codebase-wide systematic issue\n\nAlways report exact counts (from scan recipes), not estimates or agent summaries.\n\n### Step 5: Generate Findings\n\n**Keep findings compact.** Each finding is one short block — not an essay. Group by severity (🔴 → 🟡 → ℹ️), not by file.\n\nFormat per finding:\n\n```\n#### ID. Title (N instances)\n**Impact:** one-line impact statement\n**Files:** file1.cs:L1, file2.cs:L2, ... (list locations, don't build tables)\n**Fix:** one-line description of the change (e.g., \"Add `StringComparison.Ordinal` parameter\")\n**Caveat:** only if non-obvious (version requirement, correctness risk)\n```\n\n**Rules for compact output:**\n- **No ❌\u002F✅ code blocks** for trivial fixes (adding a keyword, parameter, or type change). A one-line fix description suffices.\n- **Only include code blocks** for non-obvious transformations (e.g., replacing a LINQ chain with a foreach loop, or hoisting a closure).\n- **File locations as inline comma-separated list**, not a table. Use `File.cs:L42` format.\n- **No explanatory prose** beyond the Impact line — the severity icon already conveys urgency.\n- **Merge related findings** that share the same fix (e.g., all `.ToLower()` calls go in one finding, not split by file).\n- **Positive findings** in a bullet list, not a table. One line per pattern: `✅ Pattern — evidence`.\n\nEnd with a summary table and disclaimer:\n\n```markdown\n| Severity | Count | Top Issue |\n|----------|-------|-----------|\n| 🔴 Critical | N | ... |\n| 🟡 Moderate | N | ... |\n| ℹ️ Info | N | ... |\n\n> ⚠️ **Disclaimer:** These results are generated by an AI assistant and are non-deterministic. Findings may include false positives, miss real issues, or suggest changes that are incorrect for your specific context. Always verify recommendations with benchmarks and human review before applying changes to production code.\n```\n\n## Validation\n\nBefore delivering results, verify:\n\n- [ ] All critical patterns were checked (from reference files or inline recipes)\n- [ ] Topic-specific recipes run only when matching signals detected\n- [ ] Each finding includes a concrete code fix\n- [ ] Scan execution checklist is complete (all recipes run)\n- [ ] Summary table included at end\n\n## Common Pitfalls\n\n| Pitfall | Correct Approach |\n|---------|-----------------|\n| Flagging every `Dictionary` as needing `FrozenDictionary` | Only flag if the dictionary is never mutated after construction |\n| Suggesting `Span\u003CT>` in async methods | Use `Memory\u003CT>` in async code; `Span\u003CT>` only in sync hot paths |\n| Reporting LINQ outside hot paths | Only flag LINQ in identified hot paths or tight loops; LINQ is acceptable in code that runs infrequently. Since .NET 7, LINQ Min\u002FMax\u002FSum\u002FAverage are vectorized — blanket bans on LINQ are misguided |\n| Suggesting `ConfigureAwait(false)` in app code | Only applicable in library code; not primarily a performance concern |\n| Recommending `ValueTask` everywhere | Only for hot paths with frequent synchronous completion |\n| Flagging `new HttpClient()` in DI services | Check if `IHttpClientFactory` is already in use |\n| Suggesting `[GeneratedRegex]` for dynamic patterns | Only flag when the pattern string is a compile-time literal |\n| Suggesting `CollectionsMarshal.AsSpan` broadly | Only for ultra-hot paths with benchmarked evidence; adds complexity and fragility |\n| Suggesting `unsafe` code for micro-optimizations | Avoid `unsafe` except where absolutely necessary — do not recommend it for micro-optimizations that don't matter. Safe alternatives like `Span\u003CT>`, `stackalloc` in safe context, and `ArrayPool` cover the vast majority of performance needs |\n","# .NET Performance Patterns\n\nScan C#\u002F.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.\n\n## When to Use\n\n- Reviewing C#\u002F.NET code for performance optimization opportunities\n- Auditing hot paths for allocation-heavy or inefficient patterns\n- Systematic scan of a codebase for known anti-patterns before release\n- Second-opinion analysis after manual performance review\n\n## When Not to Use\n\n- **Algorithmic complexity analysis** — this skill targets API usage patterns, not algorithm design\n- **Code not on a hot path** with no performance requirements — avoid premature optimization\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Source code | Yes | C# files, code blocks, or repository paths to scan |\n| Hot-path context | Recommended | Which code paths are performance-critical |\n| Target framework | Recommended | .NET version (some patterns require .NET 8+) |\n| Scan depth | Optional | `critical-only`, `standard` (default), or `comprehensive` |\n\n## Workflow\n\n### Step 1: Load Critical Reference\n\nResolve bundled paths from the directory that contains this `SKILL.md`, not from the user's workspace. Load this reference file first:\n\n- `references\u002Fcritical-patterns.md`\n\nIf a direct read fails, list this skill's `references\u002F` 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.\n\n### Step 2: Detect Code Signals and Select Topic Recipes\n\nScan 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.\n\nAfter detecting signals, load only the topic-specific references selected by scan depth:\n\n- `critical-only`: No additional references (use only `critical-patterns.md`)\n- `standard` (default): Load references matching detected signals from this list:\n  - `references\u002Fasync-patterns.md` — async\u002FTask\u002FValueTask signals\n  - `references\u002Fmemory-and-strings.md` — Span\u002FMemory\u002Fstring allocation signals\n  - `references\u002Fregex-patterns.md` — Regex signals\n  - `references\u002Fcollections-and-linq.md` — Dictionary\u002FList\u002FLINQ signals\n  - `references\u002Fio-and-serialization.md` — JsonSerializer\u002FHttpClient\u002FStream signals\n  - `references\u002Fstructural-patterns.md` — always loaded (unsealed classes checked regardless)\n- `comprehensive`: Load all six topic-specific references above\n\nFor coverage reporting, the selected references are `references\u002Fcritical-patterns.md` plus only the topic-specific references selected above. If any selected reference remains unavailable after retry, use the inline recipes in Step 3 for the missing coverage. Include `Reference coverage: reduced; unavailable: \u003Cpaths>; used inline recipes for missing references.` in the final report, with `\u003Cpaths>` replaced by the missing relative paths of the selected references only.\n\nUse the `## Detection` sections from loaded reference files and the inline recipes in Step 3 for categories whose reference files are unavailable.\n\n| Signal in Code | Topic |\n|----------------|-------|\n| `async`, `await`, `Task`, `ValueTask` | Async patterns |\n| `Span\u003C`, `Memory\u003C`, `stackalloc`, `ArrayPool`, `string.Substring`, `.Replace(`, `.ToLower()`, `+=` in loops, `params` | Memory & strings |\n| `Regex`, `[GeneratedRegex]`, `Regex.Match`, `RegexOptions.Compiled` | Regex patterns |\n| `Dictionary\u003C`, `List\u003C`, `.ToList()`, `.Where(`, `.Select(`, LINQ methods, `static readonly Dictionary\u003C` | Collections & LINQ |\n| `JsonSerializer`, `HttpClient`, `Stream`, `FileStream` | I\u002FO & serialization |\n\nAlways check structural patterns (unsealed classes) regardless of signals.\n\n**Scan depth controls scope:**\n- `critical-only`: Only critical patterns (deadlocks, >10x regressions)\n- `standard` (default): Critical + detected topic patterns\n- `comprehensive`: All pattern categories\n\n### Step 3: Scan and Report\n\n**For files under 500 lines, read the entire file first** — you'll spot most patterns faster than running individual grep recipes. Use grep to confirm counts and catch patterns you might miss visually.\n\nFor each relevant pattern category, run the detection recipes below. Report exact counts, not estimates.\n\n**Core scan recipes** (run these when reference files aren't available):\n```\n# Strings & memory\ngrep -n '\\.IndexOf(\\\"' FILE                    # Missing StringComparison\ngrep -n '\\.Substring(' FILE                    # Substring allocations\ngrep -En '\\.(StartsWith|EndsWith|Contains)\\s*\\(' FILE  # Missing StringComparison\ngrep -n '\\.ToLower()\\|\\.ToUpper()' FILE        # Culture-sensitive + allocation\ngrep -n '\\.Replace(' FILE                      # Chained Replace allocations\ngrep -n 'params ' FILE                         # params array allocation\n\n# Collections & LINQ\ngrep -n '\\.Select\\|\\.Where\\|\\.OrderBy\\|\\.GroupBy' FILE  # LINQ on hot path\ngrep -n '\\.All\\|\\.Any' FILE                    # LINQ on string\u002Fchar\ngrep -n 'new Dictionary\u003C\\|new List\u003C' FILE      # Per-call allocation\ngrep -n 'static readonly Dictionary\u003C' FILE     # FrozenDictionary candidate\n\n# Regex\ngrep -n 'RegexOptions.Compiled' FILE           # Compiled regex budget\ngrep -n 'new Regex(' FILE                      # Per-call regex\ngrep -n 'GeneratedRegex' FILE                  # Positive: source-gen regex\n\n# Structural\ngrep -n 'public class \\|internal class ' FILE  # Unsealed classes\ngrep -n 'sealed class' FILE                    # Already sealed\ngrep -n ': IEquatable' FILE                    # Positive: struct equality\n```\n\n**Rules:**\n- Run every relevant recipe for the detected pattern categories\n- **Emit a scan execution checklist** before classifying findings — list each recipe and the hit count\n- A result of **0 hits** is valid and valuable (confirms good practice)\n- If reference files were loaded, also run their `## Detection` recipes\n\n**Verify-the-Inverse Rule:** For absence patterns, always count both sides and report the ratio (e.g., \"N of M classes are sealed\"). The ratio determines severity — 0\u002F185 is systematic, 12\u002F15 is a consistency fix.\n\n### Step 3b: Cross-File Consistency Check\n\nIf an optimized pattern is found in one file, check whether sibling files (same directory, same interface, same base class) use the un-optimized equivalent. Flag as 🟡 Moderate with the optimized file as evidence.\n\n### Step 3c: Compound Allocation Check\n\nAfter running scan recipes, look for these multi-allocation patterns that single-line recipes miss:\n\n1. **Branched `.Replace()` chains:** Methods that call `.Replace()` across multiple `if\u002Felse` branches — report total allocation count across all branches, not just per-line.\n2. **Cross-method chaining:** When a public method delegates to another method that itself allocates intermediates (e.g., A calls B which does 3 regex replaces, then A calls C), report the total chain cost as one finding.\n3. **Compound `+=` with embedded allocating calls:** Lines like `result += $\"...{Foo().ToLower()}\"` are 2+ allocations (interpolation + ToLower + concatenation) — flag the compound cost, not just the `.ToLower()`.\n4. **`string.Format` specificity:** Distinguish resource-loaded format strings (not fixable) from compile-time literal format strings (fixable with interpolation). Enumerate the actionable sites.\n\n### Step 4: Classify and Prioritize Findings\n\nAssign each finding a severity:\n\n| Severity | Criteria | Action |\n|----------|----------|--------|\n| 🔴 **Critical** | Deadlocks, crashes, security vulnerabilities, >10x regression | Must fix |\n| 🟡 **Moderate** | 2-10x improvement opportunity, best practice for hot paths | Should fix on hot paths |\n| ℹ️ **Info** | Pattern applies but code may not be on a hot path | Consider if profiling shows impact |\n\n**Prioritization rules:**\n1. If the user identified hot-path code, elevate all findings in that code to their maximum severity\n2. If hot-path context is unknown, report 🔴 Critical findings unconditionally; report 🟡 Moderate findings with a note: _\"Impactful if this code is on a hot path\"_\n3. Never suggest micro-optimizations on code that is clearly not performance-sensitive\n\n**Scale-based severity escalation:**\nWhen the same pattern appears across many instances, escalate severity:\n- 1-10 instances of the same anti-pattern → report at the pattern's base severity\n- 11-50 instances → escalate ℹ️ Info patterns to 🟡 Moderate\n- 50+ instances → escalate to 🟡 Moderate with elevated priority; flag as a codebase-wide systematic issue\n\nAlways report exact counts (from scan recipes), not estimates or agent summaries.\n\n### Step 5: Generate Findings\n\n**Keep findings compact.** Each finding is one short block — not an essay. Group by severity (🔴 → 🟡 → ℹ️), not by file.\n\nFormat per finding:\n\n```\n#### ID. Title (N instances)\n**Impact:** one-line impact statement\n**Files:** file1.cs:L1, file2.cs:L2, ... (list locations, don't build tables)\n**Fix:** one-line description of the change (e.g., \"Add `StringComparison.Ordinal` parameter\")\n**Caveat:** only if non-obvious (version requirement, correctness risk)\n```\n\n**Rules for compact output:**\n- **No ❌\u002F✅ code blocks** for trivial fixes (adding a keyword, parameter, or type change). A one-line fix description suffices.\n- **Only include code blocks** for non-obvious transformations (e.g., replacing a LINQ chain with a foreach loop, or hoisting a closure).\n- **File locations as inline comma-separated list**, not a table. Use `File.cs:L42` format.\n- **No explanatory prose** beyond the Impact line — the severity icon already conveys urgency.\n- **Merge related findings** that share the same fix (e.g., all `.ToLower()` calls go in one finding, not split by file).\n- **Positive findings** in a bullet list, not a table. One line per pattern: `✅ Pattern — evidence`.\n\nEnd with a summary table and disclaimer:\n\n```markdown\n| Severity | Count | Top Issue |\n|----------|-------|-----------|\n| 🔴 Critical | N | ... |\n| 🟡 Moderate | N | ... |\n| ℹ️ Info | N | ... |\n\n> ⚠️ **Disclaimer:** These results are generated by an AI assistant and are non-deterministic. Findings may include false positives, miss real issues, or suggest changes that are incorrect for your specific context. Always verify recommendations with benchmarks and human review before applying changes to production code.\n```\n\n## Validation\n\nBefore delivering results, verify:\n\n- [ ] All critical patterns were checked (from reference files or inline recipes)\n- [ ] Topic-specific recipes run only when matching signals detected\n- [ ] Each finding includes a concrete code fix\n- [ ] Scan execution checklist is complete (all recipes run)\n- [ ] Summary table included at end\n\n## Common Pitfalls\n\n| Pitfall | Correct Approach |\n|---------|-----------------|\n| Flagging every `Dictionary` as needing `FrozenDictionary` | Only flag if the dictionary is never mutated after construction |\n| Suggesting `Span\u003CT>` in async methods | Use `Memory\u003CT>` in async code; `Span\u003CT>` only in sync hot paths |\n| Reporting LINQ outside hot paths | Only flag LINQ in identified hot paths or tight loops; LINQ is acceptable in code that runs infrequently. Since .NET 7, LINQ Min\u002FMax\u002FSum\u002FAverage are vectorized — blanket bans on LINQ are misguided |\n| Suggesting `ConfigureAwait(false)` in app code | Only applicable in library code; not primarily a performance concern |\n| Recommending `ValueTask` everywhere | Only for hot paths with frequent synchronous completion |\n| Flagging `new HttpClient()` in DI services | Check if `IHttpClientFactory` is already in use |\n| Suggesting `[GeneratedRegex]` for dynamic patterns | Only flag when the pattern string is a compile-time literal |\n| Suggesting `CollectionsMarshal.AsSpan` broadly | Only for ultra-hot paths with benchmarked evidence; adds complexity and fragility |\n| Suggesting `unsafe` code for micro-optimizations | Avoid `unsafe` except where absolutely necessary — do not recommend it for micro-optimizations that don't matter. Safe alternatives like `Span\u003CT>`, `stackalloc` in safe context, and `ArrayPool` cover the vast majority of performance needs |\n",{"name":5,"license":14,"description":7},"main","ccab8dffc0ecc173838f51e4c5f0d3b51a704f41","plugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills","https:\u002F\u002Fgithub.com\u002Fdeadmade","https:\u002F\u002Fdeadmade.github.io\u002F","Blood, an Ocean of blood","2026-11-14 02:03:31",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add deadmade\u002Fdead-agent-skills --skill analyzing-dotnet-performance",{"tool":37,"command":38},"bunx","bunx skills add deadmade\u002Fdead-agent-skills --skill analyzing-dotnet-performance",{"tool":40,"command":41},"pnpm","pnpm dlx skills add deadmade\u002Fdead-agent-skills --skill analyzing-dotnet-performance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance\u002FSKILL.md",true,[45,51,55,59,63,67,71],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fasync-patterns.md","REFERENCE","参考文档",2976,"https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance\u002Freferences\u002Fasync-patterns.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fcollections-and-linq.md",7744,"https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance\u002Freferences\u002Fcollections-and-linq.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fcritical-patterns.md",6787,"https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance\u002Freferences\u002Fcritical-patterns.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fio-and-serialization.md",3676,"https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance\u002Freferences\u002Fio-and-serialization.md",{"path":64,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fmemory-and-strings.md",5857,"https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance\u002Freferences\u002Fmemory-and-strings.md",{"path":68,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fregex-patterns.md",3324,"https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance\u002Freferences\u002Fregex-patterns.md",{"path":72,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fstructural-patterns.md",1683,"https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fanalyzing-dotnet-performance\u002Freferences\u002Fstructural-patterns.md",[76,83,92,100,107,114],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M7CVRBFTXSTTQ7F5P6PJEFYA","rust-best-practices","Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Frust-skills\u002Fskills\u002Frust-best-practices\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7CVR0W7B8EGTNPSPA7FPC4Z","postgres-database-migration","Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases.\n\n**Trigger when user asks to:**\n- Test a schema migration before applying it to production\n- Add, remove, or rename columns safely on a live table\n- Change a column's data type without downtime\n- Add or drop indexes, constraints, or foreign keys on large tables\n- Understand which ALTER TABLE operations lock the table\n- Roll back a failed migration\n- Plan a zero-downtime migration strategy\n- Fork a database to test a migration safely\n\nCovers: lock-level reference for every common DDL operation, safe migration patterns, fork-based testing, zero-downtime column changes, index creation, constraint addition, backfill strategies, pre\u002Fpost-migration validation, and rollback planning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-database-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-database-migration\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":87,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M7CVQWK20ASAZN5VETZC8J99","postgres-best-practices","Best practices and guidelines for working with Postgres. Covers schema design, indexing strategies, query optimization, migrations, and common pitfalls. Use when writing SQL, designing database schemas, optimizing queries, or setting up a Postgres database.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-best-practices\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-best-practices\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M7CVQ5CY7AQHY7A2Y99RE6A7","writing-mstest-tests","ALWAYS USE when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":18},"01M7CVPWJZ63GB0810F0SCGZ1K","winforms-expert","Create, modify, debug, or review Windows Forms applications only when the request contains a concrete Windows Forms marker. USE FOR: WinForms, Windows Forms, System.Windows.Forms, WinForms Form or UserControl designer files (*.Designer.cs or *.Designer.vb), Visual Studio WinForms Designer, TableLayoutPanel, BindingSource, DataGridView, Control.InvokeAsync, component-tray ownership, or custom control serialization. DO NOT USE FOR: WPF or WPF XAML, including Window.InputBindings, KeyBinding, commands, or DataContext; .NET MAUI; Avalonia; or any request where none of the listed Windows Forms markers is present.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fwinforms-expert\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":18},"01M7CVPR0QFZ1HMJ6GZRBQAQ7W","vectorization","Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64\u002F128\u002F256\u002F512, or platform hardware intrinsics; reviewing existing SIMD code, including the generic Vector type, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. DO NOT USE FOR: performance work unrelated to SIMD or vectorization.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fvectorization\u002FSKILL.md",[],[]]