/dapr-skills:create-workflow-javafrom dapr-skills
Scaffolds a local Dapr workflow application in Java with Spring Boot and Maven. Guides users through specification, project setup, build verification, and README creation.
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 in Java with Spring Boot 4 and Maven.
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, one
<ActivityName> per step with its <ActivityInput> and <ActivityOutput>, and <javaPackage> from
<ProjectRoot>: com.example. plus <ProjectRoot> lowercased with every non-alphanumeric character
removed; if the result starts with a digit or is a Java reserved keyword (for example new, switch,
class), prefix it with app (Ship-Track gives com.example.shiptrack, 2048 gives
com.example.app2048).
The following must be installed by the user before this skill can run:
Additional runtime dependencies (handled during project setup):
org.springframework.boot:spring-boot-starter-parent 4.0.8, the BOM
io.dapr.spring:dapr-spring-bom 1.19.1 imported in dependencyManagement, and
io.dapr.spring:dapr-spring-boot-starter without a version. Maven downloads them on the first build.## 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. Write every file
directly; there is no generator command. <app-id> is <ProjectName> in lowercase, and <app-port> is a
free port for the app, for example 8080.
<ProjectRoot>/
├── .gitignore
├── dapr.yaml
├── local.http
├── resources/
│ └── statestore.yaml
└── <ProjectName>/
├── pom.xml
└── src/main/
├── resources/
│ └── application.properties
└── java/<javaPackage>/ (one folder per segment: com/example/...)
├── Application.java
├── <WorkflowName>.java
├── <ActivityName>.java (one per activity)
├── <WorkflowInput>.java (one file per record)
├── StatusResponse.java
└── <WorkflowName>Controller.java
Ignores Maven's target/, the .dapr/ log folders and IDE files. See ../dapr-shared/java-workflow-project.md.
Multi-app run file in the project root. Runs the app with mvn spring-boot:run and points to the resources folder. See REFERENCE.md for the full example and key points.
Dapr Workflow requires a state store component (with actorStateStore set to "true"). See ../dapr-shared/dapr-statestore.md.
Maven project with the Spring Boot 4.0.8 parent, java.version 17, the Dapr Spring BOM 1.19.1 and the dapr-spring-boot-starter, spring-boot-starter-webmvc and spring-boot-starter-actuator dependencies. See ../dapr-shared/java-workflow-project.md.
Sets spring.application.name and server.port, which must equal appPort in dapr.yaml. Use application.properties, not application.yml, and add no dapr.client.* properties. See ../dapr-shared/java-workflow-project.md.
The @SpringBootApplication class, which also carries @EnableDaprWorkflows. See ../dapr-shared/java-workflow-project.md.
One top-level record per workflow and activity input and output, each in its own file, plus StatusResponse for the status endpoint. Never classes with getters and setters, never nested types. See ../dapr-shared/java-models.md.
A top-level @Component implementing Workflow. It calls each activity with ctx.callActivity(<ActivityName>.class.getName(), input, <ActivityOutput>.class).await(), logs through ctx.getLogger() and finishes with ctx.complete(...). See ../dapr-shared/java-workflow-class.md for the example, key points and determinism rules, and REFERENCE.md for the patterns (chaining, fan-out/fan-in, child workflows, monitor, external event, saga) and retry policies.
One top-level @Component implementing WorkflowActivity per activity, with collaborators taken through the constructor into final fields. See ../dapr-shared/java-activity-class.md.
One @RestController with the management endpoints POST /start, GET /status/{instanceId}, POST /pause/{instanceId}, POST /resume/{instanceId}, POST /terminate/{instanceId} and, only when the workflow waits for an external event, POST /raise-event/{instanceId}/{eventName}. It takes DaprWorkflowClient through its constructor. See ../dapr-shared/java-workflow-endpoints.md.
HTTP request file for testing the workflow endpoints: start, status, pause, resume, terminate, and a raise-event request when the workflow waits for an event. Uses the <app-port> from application.properties. See ../dapr-shared/java-local-http.md.
IMPORTANT: After Project Setup you MUST run these checks:
mvn -q -DskipTests package in the <ProjectName> folder. It must exit with code 0; fix any error and run it again until it does. Never report the project as created while the build fails. The first build downloads the dependencies and can take a few minutes.dapr run -f . in the project root.IMPORTANT: After Verify you MUST run these instructions:
Create a README.md file inside the folder.
The README contains the following sections:
dapr run -f . in the project root; the first start downloads the Maven dependencies).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.Other plugins' skills for the same job