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

Claude Code loads skills from the .claude/skills/ folder in your current working directory. That's why this tutorial asks you to launch Claude Code from inside the cloned dapr-skills repo — the skills are project-scoped to that folder.

1. Prerequisites​

2. Install the Dapr Skills​

Clone the dapr-skills repository and launch Claude Code from the cloned directory so the skills are available:

git clone https://github.com/diagrid-labs/dapr-skills.git
cd dapr-skills
claude

Once Claude Code is running, 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​