dbos-typescript — Claude Code skill: durable DBOS workflows
A skill that teaches your agent the DBOS TypeScript SDK: workflows, steps and queues that survive failures.
npx skills add dbos-inc/agent-skills --skill dbos-typescript -a claude-codeWhat dbos-typescript does
The skill drops a DBOS TypeScript 5.x reference (@dbos-inc/dbos-sdk) into your agent's context. Rules are grouped by priority: app lifecycle, workflow structure, steps, queues, communication patterns, testing, and calling DBOSClient from outside the app. Each rule lives in its own file under references/, such as references/lifecycle-config.md or references/queue-concurrency.md.
It also carries hard constraints. Workflows stay deterministic, and anything touching an external service goes through DBOS.runStep. Starting a workflow from inside a step is off the table, same as mutating globals. Queues get registered with DBOS.registerQueue after DBOS.launch(), since they live in the system database.
Projects on 4.x, or ones still using removed APIs like new WorkflowQueue and @DBOS.scheduled, get pointed to references/advanced-upgrading.md. Connecting to DBOS Conductor or deploying to DBOS Cloud needs @dbos-inc/dbos-enterprise at the same minor version as the SDK. Worth checking your dependencies before the agent starts editing.
What it helps with
- write a DBOS workflow that survives a crashed process
- move external API calls into steps
- cap concurrency with queues
- pass data between workflows via events and messages
- drive DBOS from a separate app with DBOSClient
Example prompts for the agent
- add DBOS to this project and sketch a workflow with steps
- create a queue that limits concurrency for background jobs
- rewrite these external API calls as DBOS steps
How to install dbos-typescript
1Skills CLI (Vercel)
npx skills add dbos-inc/agent-skills --skill dbos-typescript -a claude-code2Manually: put the files in place
~/.claude/skills/dbos-typescript/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/dbos-typescript/
1Skills CLI (Vercel)
npx skills add dbos-inc/agent-skills --skill dbos-typescript -a codex2Manually: put the files in place
.agents/skills/dbos-typescript/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dbos-inc/agent-skills --skill dbos-typescript -a cursor2Manually: put the files in place
.cursor/skills/dbos-typescript/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dbos-inc/agent-skills dbos-typescript2Manually: put the files in place
.github/skills/dbos-typescript/SKILL.md1Skills CLI (Vercel)
npx skills add dbos-inc/agent-skills --skill dbos-typescript -a gemini-cli2Platform CLI
gemini skills install https://github.com/dbos-inc/agent-skills --path skills/dbos-typescriptManually: put the files in place
.devin/skills/dbos-typescript/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dbos-inc/agent-skills --skill dbos-typescript -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about dbos-typescript
How do I install dbos-typescript in Claude?
Run npx skills add dbos-inc/agent-skills --skill dbos-typescript -a claude-code. The skill lands in ~/.claude/skills/dbos-typescript/SKILL.md.
What does dbos-typescript do?
It gives the agent rules for the DBOS TypeScript SDK: configuring and launching an app, writing workflows and steps, using queues, and calling DBOSClient.
What is required to connect to DBOS Conductor?
You need @dbos-inc/dbos-enterprise installed at the same minor version as @dbos-inc/dbos-sdk.
Source text
SKILL.md · MIT
---
name: dbos-typescript
description: DBOS TypeScript SDK for building reliable, fault-tolerant applications with durable workflows. Use this skill when writing TypeScript code with DBOS, creating workflows and steps, using queues, using DBOSClient from external applications, or building applications that need to be resilient to failures.
license: MIT
metadata:
author: dbos
version: "2.1.0"
organization: DBOS
date: October 2026
abstract: Comprehensive guide for building fault-tolerant TypeScript applications with DBOS. Covers workflows, steps, queues, communication patterns, and best practices for durable execution.
---
# DBOS TypeScript Best Practices
Guide for building reliable, fault-tolerant TypeScript applications with DBOS durable workflows. Targets DBOS TypeScript 5.x (`@dbos-inc/dbos-sdk`). If a project is on 4.x or uses removed APIs (`new WorkflowQueue`, `@DBOS.scheduled`/`DBOS.registerScheduled`, `partitionQueue`, `priorityEnabled`, `@DBOS.requiredRole`, `dbos-config.yaml`-based config), see `references/advanced-upgrading.md`.
## When to Apply
Reference these guidelines when:
- Adding DBOS to existing TypeScript code
- Creating workflows and steps
- Using queues for concurrency control
- Implementing workflow communication (events, messages, streams)
- Configuring and launching DBOS applications
- Using DBOSClient from external applications
- Testing DBOS applications
## Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Lifecycle | CRITICAL | `lifecycle-` |
| 2 | Workflow | CRITICAL | `workflow-` |
| 3 | Step | HIGH | `step-` |
| 4 | Queue | HIGH | `queue-` |
| 5 | Communication | MEDIUM | `comm-` |
| 6 | Pattern | MEDIUM | `pattern-` |
| 7 | Testing | LOW-MEDIUM | `test-` |
| 8 | Client | MEDIUM | `client-` |
| 9 | Advanced | LOW | `advanced-` |
## Critical Rules
### Installation
Always install the latest version of DBOS:
```bash
npm install @dbos-inc/dbos-sdk@latest
```
### DBOS Configuration and Launch
A DBOS application MUST configure and launch DBOS before running any workflows:
```typescript
import { DBOS } from "@dbos-inc/dbos-sdk";
async function main() {
DBOS.setConfig({
name: "my-app",
applicationVersion: "0.1.0",
systemDatabaseUrl: process.env.DBOS_SYSTEM_DATABASE_URL,
});
await DBOS.launch();
await myWorkflow();
}
main().catch(console.log);
```
When creating a new application, set `applicationVersion` to `"0.1.0"`. If omitted, DBOS derives an opaque hash from workflow source code. When editing an existing application, leave its configured version alone — changing it is a deployment decision (see `references/advanced-versioning.md`).
### Workflow and Step Structure
Workflows are comprised of steps. Any function performing complex operations or accessing external services must be run as a step using `DBOS.runStep`:
```typescript
import { DBOS } from "@dbos-inc/dbos-sdk";
async function fetchData() {
return await fetch("https://api.example.com").then(r => r.json());
}
async function myWorkflowFn() {
const result = await DBOS.runStep(fetchData, { name: "fetchData" });
return result;
}
const myWorkflow = DBOS.registerWorkflow(myWorkflowFn);
```
### Key Constraints
- Do NOT call, start, or enqueue workflows from within steps
- Do NOT use threads or uncontrolled concurrency to start workflows - use `DBOS.startWorkflow` or queues
- Workflows MUST be deterministic - non-deterministic operations go in steps
- Do NOT modify global variables from workflows or steps
- Register queues (`DBOS.registerQueue`) and create schedules (`DBOS.applySchedules`/`DBOS.createSchedule`) AFTER `DBOS.launch()` - they are stored in the system database
- Steps are only durable when called from a workflow; outside a workflow they run as plain function calls
- Connecting to DBOS Conductor (`conductorKey`, or deploying to DBOS Cloud) requires installing `@dbos-inc/dbos-enterprise` at the same minor version as `@dbos-inc/dbos-sdk`
## How to Use
Read individual rule files for detailed explanations and examples:
```
references/lifecycle-config.md
references/workflow-determinism.md
references/queue-concurrency.md
references/advanced-upgrading.md
references/advanced-shared-database.md
```
If multiple applications share one system database, always set `applicationName` on `DBOSClient` and see `references/advanced-shared-database.md`.
## References
- https://docs.dbos.dev/
- https://github.com/dbos-inc/dbos-transact-ts
© dbos · MIT · dbos-inc/agent-skills