[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-03a9c875-7b63-48d5-8ac7-9f1f2a026e12":3,"$f1na1Q7J_EIwQ78AoCRG5sEA2tXEIfGl8qvmZ2sPtZOI":44},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"03a9c875-7b63-48d5-8ac7-9f1f2a026e12","dbos-typescript","构建可靠的、容错的TypeScript应用程序的DBOS持久工作流程指南。在将DBOS添加到现有TypeScript代码、创建工作流程和步骤或使用队列进行并发控制时使用。","cat_life_career","mod_other","sickn33,other","---\nname: dbos-typescript\ndescription: \"Guide for building reliable, fault-tolerant TypeScript applications with DBOS durable workflows. Use when adding DBOS to existing TypeScript code, creating workflows and steps, or using queues for concurrency control.\"\nrisk: safe\nsource: \"https:\u002F\u002Fdocs.dbos.dev\u002F\"\ndate_added: \"2026-02-27\"\n---\n\n# DBOS TypeScript Best Practices\n\nGuide for building reliable, fault-tolerant TypeScript applications with DBOS durable workflows.\n\n## When to Use\nReference these guidelines when:\n- Adding DBOS to existing TypeScript code\n- Creating workflows and steps\n- Using queues for concurrency control\n- Implementing workflow communication (events, messages, streams)\n- Configuring and launching DBOS applications\n- Using DBOSClient from external applications\n- Testing DBOS applications\n\n## Rule Categories by Priority\n\n| Priority | Category | Impact | Prefix |\n|----------|----------|--------|--------|\n| 1 | Lifecycle | CRITICAL | `lifecycle-` |\n| 2 | Workflow | CRITICAL | `workflow-` |\n| 3 | Step | HIGH | `step-` |\n| 4 | Queue | HIGH | `queue-` |\n| 5 | Communication | MEDIUM | `comm-` |\n| 6 | Pattern | MEDIUM | `pattern-` |\n| 7 | Testing | LOW-MEDIUM | `test-` |\n| 8 | Client | MEDIUM | `client-` |\n| 9 | Advanced | LOW | `advanced-` |\n\n## Critical Rules\n\n### Installation\n\nAlways install the latest version of DBOS:\n\n```bash\nnpm install @dbos-inc\u002Fdbos-sdk@latest\n```\n\n### DBOS Configuration and Launch\n\nA DBOS application MUST configure and launch DBOS before running any workflows:\n\n```typescript\nimport { DBOS } from \"@dbos-inc\u002Fdbos-sdk\";\n\nasync function main() {\n  DBOS.setConfig({\n    name: \"my-app\",\n    systemDatabaseUrl: process.env.DBOS_SYSTEM_DATABASE_URL,\n  });\n  await DBOS.launch();\n  await myWorkflow();\n}\n\nmain().catch(console.log);\n```\n\n### Workflow and Step Structure\n\nWorkflows are comprised of steps. Any function performing complex operations or accessing external services must be run as a step using `DBOS.runStep`:\n\n```typescript\nimport { DBOS } from \"@dbos-inc\u002Fdbos-sdk\";\n\nasync function fetchData() {\n  return await fetch(\"https:\u002F\u002Fapi.example.com\").then(r => r.json());\n}\n\nasync function myWorkflowFn() {\n  const result = await DBOS.runStep(fetchData, { name: \"fetchData\" });\n  return result;\n}\nconst myWorkflow = DBOS.registerWorkflow(myWorkflowFn);\n```\n\n### Key Constraints\n\n- Do NOT call, start, or enqueue workflows from within steps\n- Do NOT use threads or uncontrolled concurrency to start workflows - use `DBOS.startWorkflow` or queues\n- Workflows MUST be deterministic - non-deterministic operations go in steps\n- Do NOT modify global variables from workflows or steps\n\n## How to Use\n\nRead individual rule files for detailed explanations and examples:\n\n```\nreferences\u002Flifecycle-config.md\nreferences\u002Fworkflow-determinism.md\nreferences\u002Fqueue-concurrency.md\n```\n\n## References\n\n- https:\u002F\u002Fdocs.dbos.dev\u002F\n- https:\u002F\u002Fgithub.com\u002Fdbos-inc\u002Fdbos-transact-ts\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,179,1318,"2026-05-16 13:14:31",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":43},"29a9304e-0585-4001-a4bd-8c5493decb6f","1.0.0","dbos-typescript.zip",31776,"uploads\u002Fskills\u002F03a9c875-7b63-48d5-8ac7-9f1f2a026e12\u002Fdbos-typescript.zip","c30d12e3c13a542ac273a7438e3ea1acd2a7dc3c23924f502270cf2e36cfefbe","[{\"path\":\"AGENTS.md\",\"isDirectory\":false,\"size\":2728},{\"path\":\"CLAUDE.md\",\"isDirectory\":false,\"size\":9},{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":3230},{\"path\":\"references\u002F_sections.md\",\"isDirectory\":false,\"size\":1444},{\"path\":\"references\u002Fadvanced-patching.md\",\"isDirectory\":false,\"size\":2054},{\"path\":\"references\u002Fadvanced-versioning.md\",\"isDirectory\":false,\"size\":1779},{\"path\":\"references\u002Fclient-enqueue.md\",\"isDirectory\":false,\"size\":2125},{\"path\":\"references\u002Fclient-setup.md\",\"isDirectory\":false,\"size\":1867},{\"path\":\"references\u002Fcomm-events.md\",\"isDirectory\":false,\"size\":2113},{\"path\":\"references\u002Fcomm-messages.md\",\"isDirectory\":false,\"size\":1956},{\"path\":\"references\u002Fcomm-streaming.md\",\"isDirectory\":false,\"size\":1942},{\"path\":\"references\u002Flifecycle-config.md\",\"isDirectory\":false,\"size\":1189},{\"path\":\"references\u002Flifecycle-express.md\",\"isDirectory\":false,\"size\":1490},{\"path\":\"references\u002Fpattern-classes.md\",\"isDirectory\":false,\"size\":2041},{\"path\":\"references\u002Fpattern-debouncing.md\",\"isDirectory\":false,\"size\":1929},{\"path\":\"references\u002Fpattern-idempotency.md\",\"isDirectory\":false,\"size\":1915},{\"path\":\"references\u002Fpattern-scheduled.md\",\"isDirectory\":false,\"size\":2283},{\"path\":\"references\u002Fpattern-sleep.md\",\"isDirectory\":false,\"size\":1655},{\"path\":\"references\u002Fqueue-basics.md\",\"isDirectory\":false,\"size\":1620},{\"path\":\"references\u002Fqueue-concurrency.md\",\"isDirectory\":false,\"size\":1728},{\"path\":\"references\u002Fqueue-deduplication.md\",\"isDirectory\":false,\"size\":1621},{\"path\":\"references\u002Fqueue-listening.md\",\"isDirectory\":false,\"size\":1786},{\"path\":\"references\u002Fqueue-partitioning.md\",\"isDirectory\":false,\"size\":1916},{\"path\":\"references\u002Fqueue-priority.md\",\"isDirectory\":false,\"size\":1376},{\"path\":\"references\u002Fqueue-rate-limiting.md\",\"isDirectory\":false,\"size\":1186},{\"path\":\"references\u002Fstep-basics.md\",\"isDirectory\":false,\"size\":1938},{\"path\":\"references\u002Fstep-retries.md\",\"isDirectory\":false,\"size\":1958},{\"path\":\"references\u002Fstep-transactions.md\",\"isDirectory\":false,\"size\":2207},{\"path\":\"references\u002Ftest-setup.md\",\"isDirectory\":false,\"size\":3023},{\"path\":\"references\u002Fworkflow-background.md\",\"isDirectory\":false,\"size\":1460},{\"path\":\"references\u002Fworkflow-constraints.md\",\"isDirectory\":false,\"size\":1955},{\"path\":\"references\u002Fworkflow-control.md\",\"isDirectory\":false,\"size\":2039},{\"path\":\"references\u002Fworkflow-determinism.md\",\"isDirectory\":false,\"size\":1664},{\"path\":\"references\u002Fworkflow-introspection.md\",\"isDirectory\":false,\"size\":1827},{\"path\":\"references\u002Fworkflow-timeout.md\",\"isDirectory\":false,\"size\":1358}]","2026-05-16 13:14:32",{"code":45,"message":46,"data":47},200,"success",{"items":48,"stats":49,"page":52},[],{"averageRating":50,"totalRatings":50,"ratingCounts":51},0,[50,50,50,50,50],{"limit":53,"offset":50,"hasMore":54,"nextOffset":53,"ratedOnly":16},15,false]