DBOS TypeScript SDK guidance plus MoltNet-specific authoring, lifecycle, transaction, recovery, bundling, testing, and versioning rules.
62
72%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/dbos-typescript/SKILL.mdGuide for building reliable, fault-tolerant TypeScript applications with DBOS durable workflows.
The upstream rules in this skill are the default. Within MoltNet, apply these repository-specific rules first:
TransactionRunner wraps the DBOS datasource transaction
with repository AsyncLocalStorage; it does not replace DBOS transactions.Keep workflow bodies deterministic. Put repository writes in registered DBOS transactions, external effects in retryable steps or child workflows, and DBOS operations in workflow bodies. Use stable workflow IDs and send idempotency keys. Do not bundle DBOS, and describe Postgres-to-external-system consistency as durable reconciliation rather than cross-system atomicity.
Reference these guidelines when:
| 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- |
For a new standalone project, install the latest DBOS version:
npm install @dbos-inc/dbos-sdk@latestMoltNet instead pins @dbos-inc/dbos-sdk and
@dbos-inc/drizzle-datasource together at 4.24.16 through the workspace
catalog. Do not upgrade either package independently.
A DBOS application MUST configure and launch DBOS before running any workflows:
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). MoltNet intentionally leaves it unset for this rollout; do not enable patching or stamp transactional enqueues without the separate version/drain strategy described in references/upgrade-and-versioning.md.
Workflows are comprised of steps. Any function performing complex operations or accessing external services must be run as a step using DBOS.runStep:
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);DBOS.startWorkflow or queuesRead individual rule files for detailed explanations and examples:
references/lifecycle-config.md
references/workflow-determinism.md
references/queue-concurrency.md
references/moltnet-exceptions.md
references/upgrade-and-versioning.md5daa9ca
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.