/dapr-skills:create-workflow-pythonfrom dapr-skills
Scaffolds a local Dapr workflow application in Python with project setup, activity/input/output resolution, and build verification.
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 Dapr Workflow application using Python.
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:
Before creating any file, write out the resolved names and restate them to the user in two or three lines,
so a wrong reading is caught before it is scaffolded. Resolve them exactly as
../dapr-shared/workflow-placeholders.md defines them:
<WorkflowName> from the purpose, <WorkflowInput> and <WorkflowOutput> from its stem, and one
<ActivityName> per step with its <ActivityInput> and <ActivityOutput>.
The following must be installed by the user before this skill can run:
uv venv uses the newest interpreter it finds; pin one with uv venv --python 3.12 when you need a specific version)Additional runtime dependencies (handled during project setup):
dapr[workflow] version 1.19.0 — the workflow extension ships inside the
dapr distribution from Dapr 1.19 on, so uv add "dapr[workflow]==1.19.0" is the whole dependency.
Quote the brackets: [ is a glob character in POSIX shells and a wildcard in PowerShell.## 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 inside the current location where the terminal is open:
mkdir <ProjectRoot>
cd <ProjectRoot>
The should start with the and end with -app: -app.
<ProjectRoot>/
├── .gitignore
├── dapr.yaml
├── local.http
├── resources/
│ └── statestore.yaml
└── <ProjectName>/
├── pyproject.toml
├── main.py
├── models.py
├── runtime.py
├── workflow.py
└── activities.py
Python style .gitignore file in the project root. See REFERENCE.md for full example.
Multi-app run file in the project root. Configures the Dapr sidecar and points to the resources folder. See REFERENCE.md for full example and key points.
Dapr Workflow requires a state store component (with actorStateStore set to "true"). See REFERENCE.md for full example and key points.
Python configuration file used by packaging tools. See REFERENCE.md for full example.
Main entry for the Python workflow application. The generic /raise-event endpoint stays in every project, because the event name comes from the request body; only the raise-event example in local.http depends on the workflow. See REFERENCE.md for full example.
Pydantic types for workflow and activity input/output, placed in a models.py file. Models must be serializable since Dapr persists workflow state. As of Dapr Python SDK 1.18 (dapr.ext.workflow), Pydantic models can be passed directly to schedule_new_workflow, call_activity, and call_child_workflow — no manual model_dump() is needed. See REFERENCE.md for full example and key points.
The runtime.py file creates the shared WorkflowRuntime instance (wfr). Both workflow.py and activities.py import wfr from this file. This avoids a circular import between workflow.py and activities.py. See REFERENCE.md for full example.
A workflow is defined using the @wfr.workflow(name="") attribute. The workflow code is placed in a workflow.py file. It imports wfr from runtime.py. See REFERENCE.md for full example, key points, determinism rules, and workflow patterns (chaining, fan-out/fan-in, sub-workflows).
A workflow activity is defined using the @wfr.activity(name="") attribute. The activity code is placed in an activities.py file. It imports wfr from runtime.py. See REFERENCE.md for full example and key points.
HTTP request file for testing the workflow endpoints. Contains a start request (POST) to schedule a new workflow instance and a status request (GET) to query the workflow state. Uses the <app-port> from dapr.yaml. The shared template includes a raise-event request: use the event name the workflow waits for, and remove the request when the workflow waits for no external event. See REFERENCE.md for full example.
IMPORTANT: After Project Setup you MUST run these exact verification instructions:
uv venv in the <ProjectName> folder to create a virtual environment.uv sync in the <ProjectName> folder to install dependencies.uv run python -m compileall -q -x .venv . in the <ProjectName> folder. The -x .venv skips the virtual environment, so only the project code is compiled. It must exit with code 0; fix any error and re-run. A SyntaxWarning that comes from a package inside .venv (seen with Python 3.14) is harmless.__pycache__ folders created by the compile step, on every OS, by running this in the <ProjectName> folder: uv run python -c "import pathlib, shutil; [shutil.rmtree(p) for p in pathlib.Path('.').rglob('__pycache__') if '.venv' not in p.parts]".IMPORTANT: After Verify you MUST run these instructions:
Create a README.md file inside the folder.
The README contains the following sections:
local.http file.../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).review-workflow-determinism, review-workflow-activity and review-workflow-management skills to audit the generated code.See REFERENCE.md for additional instructions on running locally and running with Diagrid.
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 workflow 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
Three short reads, in order
npx claudepluginhub diagrid-labs/dapr-skills --plugin dapr-skills33 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".Other plugins' skills for the same job