# Tutorial: Scaffold a Dapr Workflow .NET application with Dapr Skills

[Dapr Skills](https://github.com/diagrid-labs/dapr-skills) is a set of [Claude Code](https://www.anthropic.com/claude-code) skills that scaffold Dapr Workflow applications for .NET (with or without Aspire).
Instead of writing the workflow project by hand, you describe what you want and the skills generate the project, register the workflow and activities, and add HTTP endpoints to start and inspect workflow executions.

In this tutorial you'll:

- Install the Dapr Skills for Claude Code
- Verify your environment with the prerequisite skill
- Scaffold a Dapr Workflow .NET application using the create-workflow skill

:::info
Dapr Skills are distributed as a Claude Code plugin, so you no longer need to clone the `dapr-skills` repo. Install the plugin once and the skills are available in any directory where you start Claude Code.
:::

## 1. Prerequisites

- [Claude Code](https://www.anthropic.com/claude-code)
- A container runtime such as [Docker Desktop](https://www.docker.com/products/docker-desktop) or [Podman](https://podman.io/)
- [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/) v1.17+
- [.NET 10 SDK](https://dotnet.microsoft.com/download)
- [C# LSP Plugin](https://claude.com/plugins/csharp-lsp) for Claude Code
- (Aspire variant only) [Aspire CLI](https://aspire.dev/get-started/install-cli/)

## 2. Install the Dapr Skills plugin

Start Claude Code in the directory where you want the generated project to be created:

```shell
claude
```

Add the [dapr-skills](https://github.com/diagrid-labs/dapr-skills) repository as a plugin marketplace and install the `dapr-skills` plugin:

```
/plugin marketplace add diagrid-labs/dapr-skills
/plugin install dapr-skills@diagrid-labs
```

Alternatively, run `/plugin` and use the interactive UI to browse and install the plugin. To update or remove the plugin later, use `/plugin` and select the corresponding action.

Once the plugin is installed, the prerequisite and workflow-creation skills are available as slash commands (for example `/check-prereq-dotnet`, `/create-workflow-aspire`).
Or describe what you want to do and Claude will pick up the relevant skill.

## 3. Choose your framework

Pick the framework you want to build against. The .NET tab uses the plain Dapr Workflow .NET SDK; the .NET Aspire tab adds [.NET Aspire](https://aspire.dev/) for local orchestration and observability.

**.NET**

### 3.1 Verify prerequisites

In Claude Code, run the prerequisite check skill:

```
/check-prereq-dotnet
```

The skill validates that Docker or Podman, the Dapr CLI, the .NET 10 SDK, and the C# LSP Plugin are installed. Resolve any missing dependencies it reports before continuing.

:::warning
This skill requires access to your local environment to check if the prerequisites are installed.
Review the access permissions carefully.
:::

### 3.2 Generate the workflow application

- Run the create-workflow skill either directly with:

  ```
  /create-workflow-dotnet
  ```

  and Claude Code will ask for details about the workflow you want to build.

- Or run the skill by describing what you want to build:

  ```
  Create a .NET Workflow application (EnterpriseDiagnostics) that performs a diagnostics scan for the spaceship Enterprise from Star Trek.
  The diagnostics start with parallel activities for analyzing the hull, analyzing the warp core, ship security systems, and weapon systems.
  Once all these analyses are done, data is combined and recommendations and priorities are made in an recommendations activity.
  The final activity should be a notification to the bridge with the analysis results.

  The input for the workflow contains the following fields:

  - Ship name
  - Date of diagnostics request
  - Name of the engineer who requested the diagnostic

  The output for the workflow is an array of recommendations based on the analysis results.
  ```

:::warning
This skill requires access to your local environment, create files, execute dotnet CLI commands etc.
Review the access permissions carefully.
:::

The skill scaffolds a new project folder containing:

- A workflow class with the orchestration logic
- One class per activity
- `record` model definitions for in the inputs and outputs of the workflow and activities
- `Program.cs` updated to register the workflow and activities via `AddDaprWorkflow` and HTTP endpoints to manage workflow executions
- A `README.md` containing:
  - architecture description
  - mermaid diagram
  - run instructions
  - workflow management instructions
  - instructions to start the [Diagrid Dapr Dev Dashboard](https://docs.diagrid.io/develop/local-development/dev-dashboard) to monitor workflow executions
  - Instructions to run the workflow application with Diagrid Catalyst

### 3.3 Review the generated project

Open the generated solution, read the `README.md` and verify the generated code.

**.NET Aspire**

### 3.1 Verify prerequisites

In Claude Code, run the prerequisite check skill:

```
/check-prereq-aspire
```

The skill validates that Docker or Podman, the Dapr CLI, the .NET 10 SDK, the Aspire CLI, and the C# LSP Plugin are installed. Resolve any missing dependencies it reports before continuing.

:::warning
This skill requires access to your local environment to check if the prerequisites are installed.
Review the access permissions carefully.
:::

### 3.2 Generate the workflow application

- Run the create-workflow skill either directly with:

  ```
  /create-workflow-aspire
  ```

  and Claude Code will ask for details about the workflow you want to build.

- Or run the skill by describing what you want to build:

  ```
  Create a .NET Workflow application (EnterpriseDiagnostics) that performs a diagnostics scan for the spaceship Enterprise from Star Trek.
  The diagnostics start with parallel activities for analyzing the hull, analyzing the warp core, ship security systems, and weapon systems.
  Once all these analyses are done, data is combined and recommendations and priorities are made in an recommendations activity.
  The final activity should be a notification to the bridge with the analysis results.

  The input for the workflow contains the following fields:

  - Ship name
  - Date of diagnostics request
  - Name of the engineer who requested the diagnostic

  The output for the workflow is an array of recommendations based on the analysis results.
  ```

:::warning
This skill requires access to your local environment, create files, execute dotnet CLI commands etc.
Review the access permissions carefully.
:::

The skill scaffolds a new Aspire solution containing:

- An AppHost project wired up with a Dapr sidecar, local state store (Valkey), and the [Dapr Dev Dashboard](https://docs.diagrid.io/develop/local-development/dev-dashboard)
- An API service project with the workflow and activity classes
- `record` model definitions for in the inputs and outputs of the workflow and activities
- `Program.cs` updated to register the workflow and activities via `AddDaprWorkflow` and HTTP endpoints to manage workflow executions
- A `README.md` containing:
  - architecture description
  - mermaid diagram
  - run instructions
  - workflow management instructions

### 3.3 Review the generated project

Open the generated solution, read the `README.md` and verify the generated code.

## 4. Run the application locally

Follow the run instructions in the generated `README.md`.

## 5. Move to Catalyst

When you're ready to move from local development to production, you can swap the local Dapr workflow engine for the managed workflow engine provided by [Diagrid Catalyst](https://docs.diagrid.io/operate). The generated application targets the Dapr Workflow API, so the workflow and activity code doesn't change — only the hosting configuration does.

For the Aspire variant, follow step 7 of the [Dapr Workflow with Aspire tutorial](https://docs.diagrid.io/develop/local-development/aspire-integration#7-switch-to-catalyst) to add the [Diagrid Catalyst Aspire integration](https://www.nuget.org/packages/Diagrid.Aspire.Hosting.Catalyst) and switch the AppHost over to Catalyst.

## Summary

In this tutorial you:

- Installed the Dapr Skills for Claude Code
- Verified your environment with the prerequisite skill
- Scaffolded a Dapr Workflow .NET application using the create-workflow skill

## Next steps

- Follow the [Dapr Workflow with Aspire tutorial](https://docs.diagrid.io/develop/local-development/aspire-integration) to build the same kind of application by hand and deploy it to Catalyst.
- Read [Why Dapr, Aspire, and Catalyst = 🚀](https://docs.diagrid.io/develop/workflows/dotnet-sdk/why-dapr-aspire-catalyst) to understand how the three pieces fit together.
- Browse the upstream [dapr-skills](https://github.com/diagrid-labs/dapr-skills) repository for the full list of skills and example prompts.

**Dapr & AI University — Learn this hands-on:** [Build Dapr workflows in .NET with Aspire](https://www.diagrid.io/university/dapr-workflows-dotnet-aspire?utm_source=docs&utm_medium=cta&utm_campaign=dapr-workflows-dotnet-aspire)

Build fault-tolerant Dapr Workflow applications in .NET, orchestrated and run locally with .NET Aspire.

Advanced · 30 min · .NET
