/dapr-skills:create-workflow-typescriptfrom dapr-skills
Scaffolds a local TypeScript Dapr app demonstrating Workflow and all core building blocks (service invocation, pub/sub, bindings, jobs, state, secrets) using the @dapr/dapr SDK.
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 application in TypeScript (Node.js) using the @dapr/dapr SDK. Unlike the other create-workflow-* skills, which scaffold a workflow-only app, this skill scaffolds a Dapr Workflow whose activities each exercise one other core Dapr building block — service invocation, pub/sub, bindings, jobs, state management, and secrets — plus a small second application that the workflow calls into via service invocation.
@dapr/dapr 3.19.0 — the pinned version — wraps the Jobs building block with both a client (client.jobs.schedule / .get / .delete) and a server callback hook (server.jobs.listen). The Jobs activity uses the client. The callback stays a plain Express route, because this scaffold schedules one job per order and server.jobs.listen matches job names exactly, so it cannot catch names that are only known at run time — REFERENCE.md explains the trade-off and when to prefer listen. Earlier versions of this scaffold called the sidecar's HTTP API directly because 3.18.0 wrapped neither; that is no longer the case.
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:
The following must be installed by the user before this skill can run:
Additional runtime dependencies (handled during project setup):
@dapr/dapr version 3.19.0## 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 main application folder should start with the and end with -app: -app. The companion service invoked by the service-invocation activity is a second, independent npm project (its name follows the domain — pricing-service for the default scenario).
<ProjectRoot>/
├── .gitignore
├── dapr.yaml
├── local.http
├── resources/
│ ├── statestore.yaml
│ ├── pubsub.yaml
│ ├── secretstore.yaml
│ ├── binding-receipt.yaml
│ └── binding-schedule.yaml
├── <ProjectName>/
│ ├── package.json
│ ├── tsconfig.json
│ └── src/
│ ├── index.ts
│ ├── models.ts
│ ├── workflow.ts
│ └── activities.ts
└── pricing-service/
├── package.json
├── tsconfig.json
└── src/
└── index.ts
Node.js style .gitignore file in the project root. See REFERENCE.md for full example.
Multi-app run file in the project root that starts both the main app and the companion service together, each with its own Dapr sidecar. 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 ../dapr-shared/dapr-statestore.md for full example and key points.
See ../dapr-shared/dapr-pubsub-redis.md for full example and key points.
See ../dapr-shared/dapr-secretstore-local-env.md for full example and key points.
An output binding (bindings.http) and an input binding (bindings.cron) — the two directions of the Bindings building block. Neither needs extra infrastructure beyond what dapr init already provides. See REFERENCE.md for full example and key points.
Standard npm project files. Targets the @dapr/dapr SDK with CommonJS modules, matching the SDK's own tested consumption pattern. See REFERENCE.md for full example.
TypeScript interfaces for workflow and activity input/output, placed in a models.ts file in the main app. See REFERENCE.md for full example and key points.
A workflow is an async function* registered with WorkflowRuntime.registerWorkflow(...). The workflow code is placed in a workflow.ts file and orchestrates activities via ctx.callActivity(...). See REFERENCE.md for full example, key points, determinism rules, and workflow patterns (chaining, fan-out/fan-in, sub-workflows, external events, saga).
Activities are plain (usually async) functions registered with WorkflowRuntime.registerActivity(...), placed in an activities.ts file. Each activity in the default scenario demonstrates one building block — service invocation, state, pub/sub, bindings, and jobs — and the payment activity reads the secret it needs itself. In custom scenarios too, never return a secret from an activity or pass it as activity input: activity inputs and outputs are stored in the workflow history, so the activity that uses a secret must read it from the secret store. See REFERENCE.md for full example and key points.
Constructs a plain Express app, hands it to new DaprServer({ serverHttp: app }) so Dapr-routed calls (service invocation, pub/sub, input bindings) and the app's own routes (workflow management, the catch-all Jobs trigger callback) share one HTTP port; also constructs the WorkflowRuntime and DaprWorkflowClient (these use their own gRPC connection to the sidecar, independent of DaprServer). Registers the workflow, activities, pub/sub subscription, input binding, and the management endpoints (/start, /status/:instanceId, /pause/:instanceId, /resume/:instanceId, /terminate/:instanceId, /purge/:instanceId, plus /raise-event/:instanceId/:eventName only when a workflow waits for an external event). See REFERENCE.md for full example and key points.
A minimal second Dapr app exposing one invocable method (calculate-total) via server.invoker.listen(...), called by the main app's service-invocation activity. See REFERENCE.md for full example.
See ../dapr-shared/typescript-local-http.md for the full example and key points.
IMPORTANT: After Project Setup you MUST run these exact verification instructions:
npm install in the <ProjectName> folder to install dependencies.npm install in the pricing-service folder to install dependencies.npx tsc --noEmit in both folders to check for type errors.IMPORTANT: After Verify you MUST run these instructions:
Create a README.md file inside the folder.
The README contains the following sections:
@dapr/dapr, Express) and prerequisites to run it locally. DO NOT suggest to run Redis separately since it's part of the Dapr installation and is running in a container already. Note that the Jobs activity schedules through the SDK's Jobs client, while its callback stays a plain Express route so it can catch the per-order job names this app generates.dapr run -f . starts both apps and their sidecars). First export the PAYMENT_API_KEY environment variable in the same shell (bash/zsh and PowerShell forms), because the secretstores.local.env component reads it from the sidecar's environment — see ../dapr-shared/dapr-secretstore-local-env.md.src/index.ts file and provide examples of how to call these using curl. Also include a link to the 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
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