/ ディレクトリ / プレイグラウンド / .NET Skills
● コミュニティ Aaronontheweb ⚡ 即起動

.NET Skills

作者 Aaronontheweb · Aaronontheweb/dotnet-skills

ClaudeでイディオマティックなNET 8/9 — xUnitテスト・BenchmarkDotNetパフォーマンス・NuGetパッケージング・async/await正確性・C#スタイルのスキル。

Aaron Stannardの.NETスキルは、本格的な.NET開発者向けの実戦経験豊富なバンドルです。単純なコード生成を超えて、モデルが習慣的に間違える部分(asyncのキャンセル・ConfigureAwaitの使用方法・IDisposable・struct vs classのトレードオフ・BenchmarkDotNetのパターン・NuGetパッケージングのメタデータ・最新のxUnit+FluentAssertionsスタイル)をカバーします。

なぜ使うのか

主な機能

ライブデモ

実際の動作

準備完了

インストール

クライアントを選択

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "dotnet-skills-aaronontheweb": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Aaronontheweb/dotnet-skills",
        "~/.claude/skills/dotnet"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config を開く。保存後、アプリを再起動。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "dotnet-skills-aaronontheweb": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Aaronontheweb/dotnet-skills",
        "~/.claude/skills/dotnet"
      ],
      "_inferred": true
    }
  }
}

Cursor は Claude Desktop と同じ mcpServers スキーマを使用。プロジェクト設定はグローバルより優先。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "dotnet-skills-aaronontheweb": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Aaronontheweb/dotnet-skills",
        "~/.claude/skills/dotnet"
      ],
      "_inferred": true
    }
  }
}

Cline サイドバーの MCP Servers アイコンをクリックし、"Edit Configuration" を選択。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "dotnet-skills-aaronontheweb": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Aaronontheweb/dotnet-skills",
        "~/.claude/skills/dotnet"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop と同じ形式。Windsurf を再起動して反映。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "dotnet-skills-aaronontheweb",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/Aaronontheweb/dotnet-skills",
        "~/.claude/skills/dotnet"
      ]
    }
  ]
}

Continue はマップではなくサーバーオブジェクトの配列を使用。

~/.config/zed/settings.json
{
  "context_servers": {
    "dotnet-skills-aaronontheweb": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/Aaronontheweb/dotnet-skills",
          "~/.claude/skills/dotnet"
        ]
      }
    }
  }
}

context_servers に追加。保存時に Zed がホットリロード。

claude mcp add dotnet-skills-aaronontheweb -- git clone https://github.com/Aaronontheweb/dotnet-skills ~/.claude/skills/dotnet

ワンライナー。claude mcp list で確認、claude mcp remove で削除。

ユースケース

実用的な使い方: .NET Skills

サービスのasync/await正確性を監査する

👤 バックエンドの.NETチーム ⏱ ~45 min advanced

使うタイミング: 断続的にデッドロックが発生するサービスを引き継いだ;asyncの問題が疑われる場合。

前提条件
  • スキルのインストール — git clone https://github.com/Aaronontheweb/dotnet-skills ~/.claude/skills/dotnet
フロー
  1. スキャン
    dotnet-skills async audit on src/. Flag: missing ConfigureAwait(false) in libraries, .Result/.Wait, async void (non-event), missing CancellationToken propagation.✓ コピーしました
    → 重大度付きの具体的なfile:lineリスト
  2. 1つのクラスターを修正
    Pick the highest-severity cluster (deadlock risk). Propose patches, file by file. Show diffs.✓ コピーしました
    → ファイル全体の書き直しではなく外科的なパッチ

結果: Asyncの衛生状態が改善;断続的なデッドロックの原因の1つが解消。

注意点
  • ConfigureAwaitの修正がUIスレッドコードを壊す — スキルはライブラリコードとアプリコードを区別する;その境界を尊重する
組み合わせ: filesystem

BenchmarkDotNetでホットパスをベンチマークする

👤 パフォーマンス志向の.NET開発者 ⏱ ~60 min advanced

使うタイミング: プロファイラーがメソッドを指摘している;厳密な数値が必要な場合。

フロー
  1. ベンチマークをスキャフォールド
    Skill: scaffold a BenchmarkDotNet project for OrderCalc.Compute. Multiple input sizes. Memory diagnoser on. Markdown exporter.✓ コピーしました
    → ベンチマークプロジェクトがコンパイルされる;Releaseビルドで実行
  2. 実行&解釈
    Run the bench. Report mean, allocated, gen0. What's the leading allocation?✓ コピーしました
    → アロケーターへの具体的な帰属(おそらく文字列結合またはLINQ)
  3. パッチ&再ベンチ
    Replace LINQ with a hand-rolled loop. Re-run. Show before/after.✓ コピーしました
    → アロケーションが測定可能に減少

結果: 感覚ではなく数値化されたパフォーマンス改善。

注意点
  • Debugビルドで実行する — BenchmarkDotNetはDebugを拒否する;Releaseを確認すること

ライブラリをNuGetリリースに向けて準備する

👤 OSSオーサー ⏱ ~30 min intermediate

使うタイミング: ライブラリの初めてのNuGetリリース;磨き上げたい場合。

フロー
  1. パッケージングの監査
    dotnet-skills: audit MyLib.csproj for NuGet readiness. Check Description, Authors, License, RepositoryUrl, source-link, multi-targeting.✓ コピーしました
    → 具体的な不足フィールドのリスト
  2. APIサーフェスのレビュー
    Generate the public API surface; flag any leaked internal types or oddly-named publics.✓ コピーしました
    → 懸念事項が指摘されたAPIサーフェスのダンプ

結果: プッシュ準備完了のクリーンなパッケージ。

注意点
  • ライセンスの不一致(LICENSEファイルと<PackageLicenseExpression>) — スキルがこれを検出する;両方を一致させる

組み合わせ

他のMCPと組み合わせて10倍の力を

dotnet-skills-aaronontheweb + filesystem

プロジェクト全体にパッチを適用する

Apply the async_audit patches across src/. One commit per file.✓ コピーしました
dotnet-skills-aaronontheweb + github

ベンチ結果付きでPRを作成する

Open a PR with the perf patch + before/after benchmark in the description.✓ コピーしました

ツール

このMCPが提供する機能

ツール入力呼び出すタイミングコスト
async_audit path コードベースの健全性チェック 0
scaffold_benchmark target_method パフォーマンス作業 0
interpret_bench bench_md ベンチマーク実行後 0
nuget_audit csproj リリース前 0
api_surface assembly_or_proj APIレビュー 0
test_conventions_check test_path PRレビュー 0

コストと制限

運用コスト

APIクォータ
N/A
呼び出しあたりのトークン
監査はコードをスキャンするため多くのtokenを使用;1パスで5k〜30k
金額
無料
ヒント
一度に1プロジェクトを監査する;モノリポ全体にファンアウトしないこと

セキュリティ

権限、シークレット、影響範囲

最小スコープ: filesystem-read filesystem-write
認証情報の保管: なし
データ送信先: なし

トラブルシューティング

よくあるエラーと対処法

Audit too noisy

重大度の閾値を指定する;スキルはデフォルトですべてを報告

Benchmark won't run

Releaseビルドが必要;BenchmarkDotNetはDebugを拒否する

確認: dotnet build -c Release
API surface includes internal types

InternalsVisibleToが正しく設定されているか確認;スキルは設定通りに報告する

代替案

.NET Skills 他との比較

代替案代わりに使う場面トレードオフ
Roslyn analyzers in repoCI実行時の強制が欲しい場合セットアップが多い;インタラクティブではない
ReSharper / RiderIDEでの修正が欲しい場合有料;LLM駆動ではない
Aspire / .NET Cloud Native skillsクラウドネイティブにフォーカスする場合異なるスコープ

その他

リソース

📖 GitHub の公式 README を読む

🐙 オープンな issue を見る

🔍 400以上のMCPサーバーとSkillsを見る