verify-dotnet-samples

作成者: microsoft

Agent Frameworkリポジトリ内の.NETサンプルプロジェクトをビルド、実行、検証する方法。ユーザーがサンプルがまだ機能していることを確認したい場合に使用します。

npx skills add https://github.com/microsoft/agent-framework --skill verify-dotnet-samples

Verifying .NET Sample Projects

Sample Pre-requisites

We should only support verifying samples that:

  1. Use environment variables for configuration.
  2. Have no complex setup requirements, e.g., where multiple applications need to be run together, or where we need to launch a browser, etc.

Always report to the user which samples were run and which were not, and why.

Verifying a sample

Samples should be verified to ensure that they actually work as intended and that their output matches what is expected. For each sample that is run, output should be produced that shows the result and explains the reasoning about what output was expected, what was produced, and why it didn't match what the sample was expected to produce.

Steps to verify a sample:

  1. Read the code for the sample
  2. Check what environment variables are required for the sample
  3. Check if each environment variable has been set
  4. If there are any missing, give the user a list of missing environment variables to set and terminate
  5. Summarize what the expected output of the sample should be
  6. Run the sample
  7. Show the user any output from the sample run as it gets produced, so that they can see the run progress
  8. Check the output of the run against expectations
  9. After running all requested samples, produce output for each sample that was verified:
  10. If expectations were matched, output the following:
    [Sample Name] Succeeded
    
  11. If expectations were not matched, output the following:
    [Sample Name] Failed
    Actual Output:
    [What the sample produced]
    Expected Output:
    [Explanation of what was expected and why the actual output didn't match expectations]
    

Environment Variables

Most samples use environment variables to configure settings.

var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set.");
var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini";

To run a sample, the environment variables should be set first. Before running a sample, check whether each environment variable in the sample has a value and then give the user a list of environment variables to set.

You can provide the user some examples of how to set the variables like this:

export AZURE_OPENAI_ENDPOINT="https://my-openai-instance.openai.azure.com/"
export AZURE_OPENAI_DEPLOYMENT_NAME="gpt-4o-mini"

To check if a variable has a value use e.g.:

echo $AZURE_OPENAI_ENDPOINT

How to Run a Sample (General Pattern)

cd dotnet/samples/<category>/<sample-dir>
dotnet run

For multi-targeted projects (e.g., Durable console apps), specify the framework:

dotnet run --framework net10.0

microsoftのその他のスキル

oss-growth
microsoft
OSS成長ハッカーのペルソナ
official
winapp-ui-automation
microsoft
コマンドラインからUI Automation(UIA)を使用して、実行中のWindowsアプリのUIを検査および操作します。AIエージェントや開発者がUIを検査する必要がある場合に使用します…
official
accessibility-aria-expert
microsoft
React/Fluent UIのWebビューにおけるアクセシビリティ問題を検出・修正します。スクリーンリーダー互換性のコードレビュー時、ARIAラベルの修正時、および…の確認時に使用します。
official
generate-canvas-app
microsoft
[DEPRECATED — 代わりに canvas-app を使用してください] 完全なPower Appsキャンバスアプリを生成します。
official
django
microsoft
Djangoウェブ開発のベストプラクティス(モデル、ビュー、テンプレート、テストを含む)
official
github-issue-creator
microsoft
生のメモ、エラーログ、音声入力、スクリーンショットを、簡潔なGitHub Flavored MarkdownのIssueレポートに変換します。ユーザーがバグ情報やエラーを貼り付けた際に使用します。
official
python-package-management
microsoft
依存関係管理にuvを使用し、タスク自動化にpoethepoetを使用します。
official
runtime-validation
microsoft
移行アプリケーションのランタイム検証 — テスト戦略(計画フェーズ)とテスト実行(検証フェーズ)をカバー:起動検証、…
official