Help us improve
Share bugs, ideas, or general feedback.
From dotnet-artisan
AI/ML integration patterns for .NET: MCP server/client creation, Semantic Kernel orchestration, RAG pipelines, ML.NET inference, LLM integration, and AI framework selection.
npx claudepluginhub fenzel999/dotnet-artisan --plugin dotnet-artisanHow this skill is triggered — by the user, by Claude, or both
Slash command
/dotnet-artisan:dotnet-aiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. **MCP for tool exposure** — Use Model Context Protocol (MCP) to expose .NET capabilities to AI agents. MCP is the standard protocol — prefer it over custom REST APIs for agent-tool communication.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Guides systematic root-cause debugging when tests fail, builds break, or unexpected errors occur. Provides a structured triage checklist to preserve evidence, localize, and fix issues instead of guessing.
Share bugs, ideas, or general feedback.
MCP for tool exposure — Use Model Context Protocol (MCP) to expose .NET capabilities to AI agents. MCP is the standard protocol — prefer it over custom REST APIs for agent-tool communication.
Semantic Kernel for orchestration — Use Microsoft.SemanticKernel for multi-step AI workflows (planning, function calling, memory). Use raw HttpClient + OpenAI SDK for simple single-call scenarios.
RAG = Retrieval + Generation — The retrieval side matters more than the generation side. Invest in chunking strategy, embedding quality, and hybrid search (vector + keyword) before tuning prompts.
ML.NET for production ML — When you need a model that runs in-process without external API calls (cost, latency, offline), ML.NET is the answer. Otherwise, call an external model API.
| Scenario | Recommendation |
|---|---|
| Expose .NET tools to AI agents | MCP server (ModelContextProtocol) |
| Multi-step AI workflows | Semantic Kernel |
| Simple LLM call | HttpClient + OpenAI SDK |
| In-process ML inference | ML.NET |
| Vector search | Microsoft.SemanticKernel.Connectors.* or Qdrant |
| RAG pipeline | Semantic Kernel + vector DB |
| AI agent with tools | Microsoft.Agents.AI |
// Minimal MCP server exposing a .NET tool
#:sdk Microsoft.NET.Sdk.Web
#:package ModelContextProtocol
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddMcpServer();
var app = builder.Build();
app.MapMcpTool("get_weather", async (string city) =>
{
// Your .NET logic here
return new { City = city, Temp = 22.5, Condition = "Sunny" };
});
app.Run();
mcp-inspector CLI toolMcpServerOptions.Validate() for startup validation// Semantic Kernel RAG example
var kernel = Kernel.CreateBuilder()
.AddAzureOpenAIChatCompletion(deploymentName, endpoint, apiKey)
.AddQdrantVectorStore(host)
.Build();
// Query → search → generate
var response = await kernel.InvokePromptAsync(
"Answer based on: {{$context}} \n Question: {{$question}}",
new() { ["context"] = searchResults, ["question"] = userQuery });