technology-selection
O que ela faz
Esta skill ajuda a escolher e implementar a tecnologia certa de IA ou aprendizado de máquina para um app .NET 8+, como ML.NET, Microsoft.Extensions.AI ou ONNX Runtime. É para desenvolvedores .NET que adicionam recursos de IA e querem a ferramenta certa para a tarefa.
Quando usar
- ✓Quando você quer adicionar classificação, regressão ou recomendações a um app .NET.
- ✓Quando você quer adicionar um recurso com modelo de linguagem ou um agente de IA a um app .NET.
- ✓Quando você quer comparar opções de IA antes de escrever qualquer código.
Link da skill
https://github.com/dotnet/skills/blob/main/plugins/dotnet-ai/skills/technology-selection/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Quero adicionar recomendações de produtos ao meu app .NET. Qual tecnologia devo usar e por quê?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente classifica a tarefa em uma categoria, como dados estruturados, modelo de linguagem ou trabalho com agentes, depois recomenda uma tecnologia e constrói apenas o que a tarefa pede.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
.NET AI and Machine Learning
Pick the right technology first, then deliver only what the task asks for. If the task asks for a plan, comparison, or architecture (or says "do not write code"), produce that — do not scaffold, build, or run code unprompted.
Step 1: Classify the task (decision tree)
State which branch applies and why, then choose that technology.
| Task type | Technology | Why |
|---|---|---|
| Structured/tabular: classification, regression, clustering, anomaly detection, recommendation | ML.NET (Microsoft.ML) |
Deterministic (fixed seed), no cloud dependency, purpose-built |
| NL understanding, generation, summarization, reasoning (single prompt → response, no tools) | LLM via Microsoft.Extensions.AI (IChatClient) |
Language capability, no orchestration needed |
| Agentic: multi-step tool/function calling, agent loops, multi-agent | Microsoft Agent Framework (Microsoft.Agents.AI) on Microsoft.Extensions.AI |
Needs orchestration, tool dispatch, iteration control IChatClient lacks |
| GitHub Copilot extensions / custom dev-workflow agents | GitHub Copilot SDK (GitHub.Copilot.SDK) |
Integrates with the Copilot agent runtime |
| Run a pre-trained/custom model in production | ONNX Runtime (Microsoft.ML.OnnxRuntime) |
Hardware-accelerated, format-agnostic inference |
| Local/offline LLM inference | OllamaSharp (Ollama models) | Privacy-sensitive, air-gapped, cost-constrained |
| Semantic search, RAG, embedding storage | Microsoft.Extensions.VectorData.Abstractions (MEVD) + a provider (Azure AI Search, Milvus, MongoDB, pgvector, Pinecone, Qdrant, Redis, SQL) | Provider-agnostic vector search |
| Ingest, chunk, load documents into a vector store | Microsoft.Extensions.AI.DataIngestion (preview) + MEVD | Parses, chunks, embeds, upserts |
| Both structured predictions AND NL reasoning | Hybrid: ML.NET scoring + LLM reasoning layer | ML.NET is reproducible; LLM adds explanation |
Critical rule: Do NOT use an LLM for tasks ML.NET handles well (tabular classification, regression, clustering) — LLMs are slower, costlier, and non-deterministic for these.
Step 1b: Pick the library layer
| Layer | Library | Use when |
|---|---|---|
| Abstraction | Microsoft.Extensions.AI (MEAI) |
Always the foundation. Use IChatClient directly for prompt-response and simple, bounded function invocation. |
| Provider SDK | Azure.AI.OpenAI / OpenAI / Azure.AI.Inference / OllamaSharp |
Concrete provider behind MEAI via AddChatClient. |
| Orchestration | Microsoft.Agents.AI (prerelease) |
Multi-step tool use, durable agent loops, and multi-agent workflows. |
| Copilot | GitHub.Copilot.SDK |
Building Copilot-platform extensions only. |
Rules: start with MEAI; put the provider behind it via AddChatClient (don't call the provider in
business logic); use Microsoft.Agents.AI for multi-step or durable agent workflows rather than
hand-rolling an agent loop; never mix a raw HttpClient-to-OpenAI call with MEAI in the same
workflow. Do not use Accord.NET (archived). For new projects, prefer MEAI and Agent Framework
unless existing Semantic Kernel features or investments are a requirement. Register AI/ML services
via DI; load secrets from user-secrets / env / Key Vault — never hardcode keys.
Step 2: Cover the branch essentials, then decide depth
Every answer — plan or implementation — must address the guardrails for the selected branch:
- ML.NET —
new MLContext(seed: …)(reproducible);TrainTestSplit+ evaluate on the held-out set; report real metrics (MicroAccuracy/MacroAccuracy/LogLoss, AUC/F1, or RMSE/R²); serve withPredictionEnginePool<TIn,TOut>(never a singletonPredictionEngine). - LLM (MEAI) — depend on
IChatClientregistered viaAddChatClient(provider behind it); setTemperatureandMaxOutputTokensinChatOptions; add retry/timeout (RetryingChatClient/Polly); pin a dated model; load keys from user-secrets / env / Key Vault — never hardcode ansk-…key; validate non-deterministic output against a schema with a fallback. - Agentic (Agent Framework) — orchestrate with
Microsoft.Agents.AIonIChatClient(never a hand-rolled loop); setMaximumIterationsand a token/cost ceiling; define each tool with a clear schema (AIFunctionFactory.Create); log each step (never raw sensitive content). - **RAG / e
Perguntas frequentes
Ela escreve código sem ser solicitada?
Não. Se você pedir um plano ou uma comparação, ela entrega isso e não escreve código.
Quais ferramentas ela cobre?
ML.NET, Microsoft.Extensions.AI, Microsoft Agent Framework, ONNX Runtime, Ollama e o GitHub Copilot SDK.
Ela funciona com modelos locais?
Sim. A inferência de modelos locais ou offline é uma das opções cobertas.
Detalhes
Descrição original do autor
Guides technology selection and implementation of AI and ML features in .NET 8+ applications using ML.NET, Microsoft.Extensions.AI (MEAI), Microsoft Agent Framework (MAF), GitHub Copilot SDK, ONNX Runtime, and OllamaSharp. Covers the full spectrum from classic ML through modern LLM orchestration to local inference. Use when adding classification, regression, clustering, anomaly detection, recommendation, LLM integration (text generation, summarization, reasoning), RAG pipelines with vector search, agentic workflows with tool calling, Copilot extensions, or custom model inference via ONNX Runti
repo: dotnet/skills
Popularidade
- Estrelas no GitHub
- 5,8 mil
- Posição no ranking
- #14558
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
create-custom-agent
5,8 milAjuda seu agente a criar arquivos de agentes personalizados para o VS Code, com suas próprias ferramentas, instruções e transferências para outros agentes.
create-skill
5,8 milAjuda seu agente a criar uma nova skill de agente com nome válido, uma descrição clara de quando usá-la e um arquivo SKILL.md que segue o padrão.
csharp-scripts
5,8 milAjuda seu agente a rodar um pequeno programa C# como um único arquivo com a ferramenta de linha de comando do .NET, sem criar um projeto completo.
dotnet-pinvoke
5,8 milAjuda seu agente a chamar corretamente bibliotecas nativas em C ou C++ a partir do .NET, cobrindo assinaturas, tratamento de strings, memória e handles seguros.
Skills parecidas
diffs
394 milPermite que seu agente gere um diff real e compartilhável das edições, como link de visualização ou arquivo de imagem, em vez de um resumo escrito à mão.
coding-agent
394 milAjuda seu agente a passar um trabalho grande de programação para o Codex, Claude Code ou OpenCode em segundo plano e acompanhar o andamento.
gh-issues
394 milAjuda seu agente a encontrar issues do GitHub, escolher quais resolver e abrir pull requests com correções, acompanhando os comentários de revisão.