/dapr-skills:create-agent-dotnetfrom dapr-skills
Scaffolds a durable AI agent app in .NET using Microsoft Agent Framework on Dapr Workflow. Useful for building resilient, restart-safe .NET agents with pluggable LLM providers.
Ships in dapr-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill describes how to create a durable AI agent application in .NET.
On naming. Dapr Agents is a Python-only framework and is not used here. The .NET path is Microsoft Agent Framework (
Microsoft.Agents.AI+Microsoft.Extensions.AI) executed durably on Dapr Workflow by theDiagrid.AI.Microsoft.AgentFrameworkpackage. That package turns every LLM call and every tool call into its own workflow activity, so an agent run survives a process restart and resumes from the last completed step. TheDaprinAddDaprAgents()/IDaprAgentInvokernames that workflow runtime — it is not the Python framework.
The LLM is reached through a Dapr conversation component, not through a provider SDK registered in DI. Swapping providers is a YAML change, not a code change.
Observability: the Dapr sidecar emits workflow and conversation metrics and traces (see ../dapr-shared/agent-metrics-prometheus.md). The package creates no spans or metrics of its own, but it sets W3C baggage (agent.name, tool.name, …) inside LLM and tool activities and logs prompts and tool arguments at Debug level. See "Observability" in REFERENCE.md.
You MUST follow these phases in strict order:
## Show final message section: the closing sentence followed by the Dev Dashboard recommendation. Do NOT add any other text, summary, or commentary.If you don't have enough context what to build, ask the user the following clarifying questions one by one using an interview style:
The following must be installed by the user before this skill can run:
OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY) exported in the shell, or a local Ollama instanceAdditional runtime dependencies (handled during project setup):
Diagrid.AI.Microsoft.AgentFramework version 1.2.0 (multi-targets net8.0, net9.0, net10.0). It brings Microsoft.Agents.AI, Microsoft.Extensions.AI, Dapr.Workflow and the Dapr conversation/state clients transitively — do not add those at lower versions.Dapr.Workflow version 1.19.1, referenced explicitly because the app defines its own workflow.REFERENCE.md). Tell the user this in the generated README.Optional, for inspecting workflow runs locally:
## Check optional tools); it never installs it and never stops without it.Check once whether the optional Diagrid Dapr Dev Dashboard is installed by following the Check section of ../dapr-shared/dev-dashboard.md (diagrid-dev-dashboard --version). Remember the result (DevDashboardInstalled) for the final message. This check never stops the skill: do not ask the user about it, do not install anything, and continue with the next step whether or not the dashboard is installed.
Create the project root folder and a new ASP.NET Core web application inside it:
mkdir <ProjectRoot>
cd <ProjectRoot>
dotnet new web -n <ProjectName>
dotnet add <ProjectName> package Diagrid.AI.Microsoft.AgentFramework --version 1.2.0
The should start with the and end with App: App.
<ProjectRoot>/
├── .gitignore
├── dapr.yaml
├── local.http
├── resources/
│ ├── agent-workflow.yaml
│ └── llm-provider.yaml
└── <ProjectName>/
├── <ProjectName>.csproj
├── Program.cs
├── Properties/
│ └── launchSettings.json
├── Models/
│ └── AgentContracts.cs
└── Tools/
└── <ToolName>Tools.cs
All agents run in one app; a Dapr Workflow coordinates them. Same as above, plus a Workflows/ folder and one tools file per specialist:
<ProjectRoot>/
├── .gitignore
├── dapr.yaml
├── local.http
├── resources/
│ ├── agent-workflow.yaml
│ └── llm-provider.yaml
└── <ProjectName>/
├── <ProjectName>.csproj
├── Program.cs
├── Properties/
│ └── launchSettings.json
├── Models/
│ └── AgentContracts.cs
├── Workflows/
│ └── PlanWorkflow.cs
└── Tools/
└── <SpecialistName>Tools.cs
No agent-pubsub.yaml is needed. Only if the user explicitly needs the specialists as separately deployed apps, create one project per app instead (see "Alternative: specialists as separate apps" in REFERENCE.md).
Port assignment (separate apps only). Each app needs a unique applicationUrl in Properties/launchSettings.json and a matching appPort in dapr.yaml. Assign ports in sequence: 5100 for the coordinator, 5101 for the first specialist, 5102 for the second, and so on. Also bump daprHTTPPort (3500, 3501, 3502, …) and daprGRPCPort (50001, 50002, 50003, …) to match. Port collisions are the most common bring-up error in multi-app setups.
Visual Studio style .gitignore file in the project root. See ../dapr-shared/dotnet-gitignore.md.
Multi-app run file. Single agent and coordinator + specialists (one app): ../dapr-shared/agent-dapr-yaml-single.md with the .NET changes listed at the end of that file — command: ["dotnet", "run"] (it runs inside appDirPath, so no --project), no configFilePath line, and appPort: 5100. Specialists as separate apps: the .NET variant in ../dapr-shared/agent-dapr-yaml-multi.md.
Workflow state store (actor-enabled). See ../dapr-shared/agent-statestore-workflow.md. This is required: resourcesPath: ./resources in dapr.yaml replaces the default components from dapr init, so without an actorStateStore: "true" component in this folder the workflow engine will not start.
There is no separate agent-memory.yaml for .NET — conversation turns for a session are held in the session workflow's own state, which lives in this store.
Dapr Conversation component; its metadata.name is what you pass as conversationComponentName. Pick one: OpenAI | Anthropic | Google AI | Ollama.
Configures the ASP.NET Core port, which must match appPort in dapr.yaml. See REFERENCE.md.
Targets net10.0 and references Diagrid.AI.Microsoft.AgentFramework 1.2.0; the coordinator + specialists topology also references Dapr.Workflow 1.19.1. See REFERENCE.md.
Single agent: calls AddDaprAgents(), declares the agent with WithAgent(agentName:, conversationComponentName:, instructions:, tools:), and maps POST /run onto IDaprAgentInvoker with a session. Coordinator + specialists: registers every agent with WithAgent(...) and the coordinating workflow via AddDaprAgents(registrations: ...), maps POST /run to schedule the workflow (returns 202 Accepted) and GET /status/{instanceId}. See REFERENCE.md.
A Dapr Workflow that runs the specialists with context.RunAgentAsync(context.GetAgent(name), message) (each as a durable child workflow) and passes their answers to the coordinator agent. Workflow determinism rules apply. See REFERENCE.md.
Record types for the HTTP request/response. Must be serializable since Dapr persists workflow state. See REFERENCE.md.
Tool definitions using AIFunctionFactory.Create(..., name: "<ToolName>") — the name is what the LLM sees and what the agent's instructions must reference. See ../dapr-shared/agent-tools-dotnet.md.
HTTP request file for testing. See REFERENCE.md.
IMPORTANT: After Project Setup you MUST run these exact verification instructions:
dotnet build on the csproj file to check for build errors.dapr run -f . in the project root.IMPORTANT: After Verify you MUST run these instructions:
Create a README.md file inside the folder with the sections:
dapr run -f ..POST /run endpoint via curl (and, for coordinator + specialists, GET /status/{instanceId}) and link to local.http.../dapr-shared/dev-dashboard.md: why it is useful, the install command for each OS (macOS / Linux and Windows) and the run command (diagrid-dev-dashboard, http://localhost:9090).../dapr-shared/running-with-catalyst.md.Diagrid.AI.Microsoft.AgentFramework is licensed under the Business Source License 1.1, with a link to its LICENSE.md (see "License and usage analytics" in REFERENCE.md).review-agent-tools, review-agent-memory, review-agent-orchestration and review-agent-observability skills to audit the generated agent.See REFERENCE.md for Program.cs, Tools, and model templates.
IMPORTANT: This is the LAST step. After Create README.md, your final output MUST be ONLY the message below followed by the Dev Dashboard recommendation — no preamble, no summary, no additional commentary, only replace the with the actual value:
The agent application is created. Open the README.md file in the folder for a summary and instructions for running locally.
Then add, as a separate paragraph, the block from the Final recommendation section of ../dapr-shared/dev-dashboard.md that matches DevDashboardInstalled (installed → start it; not installed → install it). Use it as written, including the link and the commands. Nothing may follow it.
What SKILL.md sets; muted values are Claude Code's defaults
33 skills in this plugin
/add-pubsub-dotnetAdds Dapr pub/sub to an existing .NET (ASP.NET Core, plain or Aspire) project. Edits only after you approve a plan. Use for "add pub/sub to my .NET project" or "subscribe this ASP.NET app to a topic". For a new project use create-pubsub-dotnet./add-pubsub-pythonAdds Dapr pub/sub to an existing Python FastAPI app. Edits only after you approve a plan. Use for "add pub/sub to my FastAPI app" or "make this Python service subscribe to a Dapr topic". For a new app use create-pubsub-python./add-workflow-dotnetAdds Dapr Workflow, activities and management endpoints to an existing .NET (ASP.NET Core, plain or Aspire) project after you approve a plan. Use for "add a workflow to my .NET project" or "make this process a durable workflow". For a new project use create-workflow-dotnet. For Diagrid use the diagrid plugin./check-prereq-agent-dotnetChecks prerequisites for durable AI agents in .NET with Microsoft Agent Framework on Dapr Workflow. Use for "check prerequisites for .NET agents" or "verify .NET agent environment"./check-prereq-agent-pythonChecks prerequisites for durable AI agents in Python with the Dapr Agents SDK or diagrid package framework wrappers. Use for "check prerequisites for Python agents" or "verify Python agent environment"./check-prereq-aspireChecks prerequisites for Dapr Workflow apps with .NET Aspire. Use for "check prerequisites for Aspire" or "verify Aspire environment".npx claudepluginhub diagrid-labs/dapr-skills --plugin dapr-skillsOther plugins' skills for the same job