Skip to main content

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

Dapr Skills is a set of 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โ€‹

2. Install the Dapr Skills pluginโ€‹

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

claude

Add the 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 for local orchestration and observability.

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 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.

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. 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 to add the Diagrid Catalyst Aspire integration 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โ€‹

Dapr & AI University ยท Learn this hands-onBuild Dapr workflows in .NET with AspireBuild fault-tolerant Dapr Workflow applications in .NET, orchestrated and run locally with .NET Aspire.Advanced30 min.NETStart the track