{"id":"681935ca-3dc7-4fd7-bf59-6a34874ff714","shortId":"86KEkA","kind":"skill","title":"dbos-golang","tagline":"Guide for building reliable, fault-tolerant Go applications with DBOS durable workflows. Use when adding DBOS to existing Go code, creating workflows and steps, or using queues for concurrency control.","description":"# DBOS Go Best Practices\n\nGuide for building reliable, fault-tolerant Go applications with DBOS durable workflows.\n\n## When to Use\nReference these guidelines when:\n- Adding DBOS to existing Go 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 the DBOS Client 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\nInstall the DBOS Go module:\n\n```bash\ngo get github.com/dbos-inc/dbos-transact-golang/dbos@latest\n```\n\n### DBOS Configuration and Launch\n\nA DBOS application MUST create a context, register workflows, and launch before running any workflows:\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/dbos-inc/dbos-transact-golang/dbos\"\n)\n\nfunc main() {\n\tctx, err := dbos.NewDBOSContext(context.Background(), dbos.Config{\n\t\tAppName:     \"my-app\",\n\t\tDatabaseURL: os.Getenv(\"DBOS_SYSTEM_DATABASE_URL\"),\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer dbos.Shutdown(ctx, 30*time.Second)\n\n\tdbos.RegisterWorkflow(ctx, myWorkflow)\n\n\tif err := dbos.Launch(ctx); err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\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.RunAsStep`:\n\n```go\nfunc fetchData(ctx context.Context) (string, error) {\n\tresp, err := http.Get(\"https://api.example.com/data\")\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()\n\tbody, _ := io.ReadAll(resp.Body)\n\treturn string(body), nil\n}\n\nfunc myWorkflow(ctx dbos.DBOSContext, input string) (string, error) {\n\tresult, err := dbos.RunAsStep(ctx, fetchData, dbos.WithStepName(\"fetchData\"))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn result, nil\n}\n```\n\n### Key Constraints\n\n- Do NOT start or enqueue workflows from within steps\n- Do NOT use uncontrolled goroutines to start workflows - use `dbos.RunWorkflow` with queues or `dbos.Go`/`dbos.Select` for concurrent steps\n- Workflows MUST be deterministic - non-deterministic operations go in steps\n- Do NOT modify global variables from workflows or steps\n- All workflows and queues MUST be registered before calling `Launch()`\n\n## How to Use\n\nRead individual rule files for detailed explanations and examples:\n\n```\nreferences/lifecycle-config.md\nreferences/workflow-determinism.md\nreferences/queue-concurrency.md\n```\n\n## References\n\n- https://docs.dbos.dev/\n- https://github.com/dbos-inc/dbos-transact-golang\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.","tags":["dbos","golang","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows"],"capabilities":["skill","source-sickn33","skill-dbos-golang","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/dbos-golang","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34831 github stars · SKILL.md body (3,326 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T06:51:01.663Z","embedding":null,"createdAt":"2026-04-18T21:35:44.551Z","updatedAt":"2026-04-24T06:51:01.663Z","lastSeenAt":"2026-04-24T06:51:01.663Z","tsv":"'/data':261 '/dbos-inc/dbos-transact-golang':377 '/dbos-inc/dbos-transact-golang/dbos':184 '/dbos-inc/dbos-transact-golang/dbos@latest':154 '1':103 '2':107 '3':111 '30':210 '4':115 '5':119 '6':123 '7':127 '8':133 '9':137 'access':238 'ad':19,59 'advanc':138,140 'api.example.com':260 'api.example.com/data':259 'app':195 'applic':12,47,84,91,94,161 'appnam':192 'ask':411 'bash':149 'best':37 'bodi':269,274 'boundari':419 'build':6,41 'call':356 'categori':96,100 'clarif':413 'clear':386 'client':88,134,136 'code':24,64 'comm':122 'communic':76,120 'complex':235 'compris':229 'concurr':33,72,326 'configur':80,156 'constraint':300 'context':165,178 'context.background':190 'context.context':253 'control':34,73 'creat':25,65,163 'criteria':422 'critic':105,109,141 'ctx':187,209,213,218,252,278,287 'databas':200 'databaseurl':196 'dbos':2,14,20,35,49,60,83,87,93,146,155,160,198 'dbos-golang':1 'dbos.config':191 'dbos.dboscontext':279 'dbos.go':323 'dbos.launch':217 'dbos.newdboscontext':189 'dbos.registerworkflow':212 'dbos.runasstep':248,286 'dbos.runworkflow':319 'dbos.select':324 'dbos.shutdown':208 'dbos.withstepname':289 'defer':207,267 'describ':390 'detail':366 'determinist':331,334 'docs.dbos.dev':374 'durabl':15,50 'enqueu':305 'environ':402 'environment-specif':401 'err':188,203,206,216,219,222,257,263,266,285,292,295 'error':255,283 'event':77 'exampl':369 'exist':22,62 'expert':407 'explan':367 'extern':90,239 'fault':9,44 'fault-toler':8,43 'fetchdata':251,288,290 'file':364 'func':185,250,276 'function':233 'get':151 'github.com':153,183,376 'github.com/dbos-inc/dbos-transact-golang':375 'github.com/dbos-inc/dbos-transact-golang/dbos':182 'github.com/dbos-inc/dbos-transact-golang/dbos@latest':152 'global':342 'go':11,23,36,46,63,147,150,174,249,336 'golang':3 'goroutin':314 'guid':4,39 'guidelin':57 'high':113,117 'http.get':258 'impact':101 'implement':74 'import':177 'individu':362 'input':280,416 'instal':143,144 'io.readall':270 'key':299 'launch':82,158,169,357 'lifecycl':104,106 'limit':378 'log':179 'log.fatal':205,221 'low':130,139 'low-medium':129 'main':176,186 'match':387 'medium':121,125,131,135 'messag':78 'miss':424 'modifi':341 'modul':148 'must':162,241,329,352 'my-app':193 'myworkflow':214,277 'nil':204,220,264,275,293,298 'non':333 'non-determinist':332 'oper':236,335 'os':180 'os.getenv':197 'output':396 'packag':175 'pattern':124,126 'perform':234 'permiss':417 'practic':38 'prefix':102 'prioriti':98,99 'queue':31,70,116,118,321,351 'read':361 'refer':55,373 'references/lifecycle-config.md':370 'references/queue-concurrency.md':372 'references/workflow-determinism.md':371 'regist':166,354 'reliabl':7,42 'requir':415 'resp':256 'resp.body':271 'resp.body.close':268 'result':284,297 'return':265,272,294,296 'review':408 'rule':95,142,363 'run':171,243 'safeti':418 'scope':389 'servic':240 'skill':381 'skill-dbos-golang' 'source-sickn33' 'specif':403 'start':303,316 'step':28,68,112,114,225,231,246,309,327,338,347 'stop':409 'stream':79 'string':254,273,281,282 'structur':226 'substitut':399 'success':421 'system':199 'task':385 'test':92,128,132,405 'time':181 'time.second':211 'toler':10,45 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'treat':394 'uncontrol':313 'url':201 'use':17,30,54,69,85,247,312,318,360,379 'valid':404 'variabl':343 'within':308 'workflow':16,26,51,66,75,108,110,167,173,223,227,306,317,328,345,349","prices":[{"id":"7f7e40f8-2e57-4c72-bbaa-ccbfe29f37ea","listingId":"681935ca-3dc7-4fd7-bf59-6a34874ff714","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:35:44.551Z"}],"sources":[{"listingId":"681935ca-3dc7-4fd7-bf59-6a34874ff714","source":"github","sourceId":"sickn33/antigravity-awesome-skills/dbos-golang","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/dbos-golang","isPrimary":false,"firstSeenAt":"2026-04-18T21:35:44.551Z","lastSeenAt":"2026-04-24T06:51:01.663Z"}],"details":{"listingId":"681935ca-3dc7-4fd7-bf59-6a34874ff714","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"dbos-golang","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34831,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-24T06:41:17Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"860ea55abc670e4a2b1e772b18307e9363590a46","skill_md_path":"skills/dbos-golang/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/dbos-golang"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"dbos-golang","description":"Guide for building reliable, fault-tolerant Go applications with DBOS durable workflows. Use when adding DBOS to existing Go code, creating workflows and steps, or using queues for concurrency control."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/dbos-golang"},"updatedAt":"2026-04-24T06:51:01.663Z"}}