🛠️ Dbos Golang
DBOSの耐久性のあるワークフローを活用し、
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
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.
🇯🇵 日本人クリエイター向け解説
DBOSの耐久性のあるワークフローを活用し、
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 31
💬 こう話しかけるだけ — サンプルプロンプト
- › Dbos Golang を使って、最小構成のサンプルコードを示して
- › Dbos Golang の主な使い方と注意点を教えて
- › Dbos Golang を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
DBOS Go Best Practices
Guide for building reliable, fault-tolerant Go applications with DBOS durable workflows.
When to Use
Reference these guidelines when:
- Adding DBOS to existing Go code
- Creating workflows and steps
- Using queues for concurrency control
- Implementing workflow communication (events, messages, streams)
- Configuring and launching DBOS applications
- Using the DBOS Client 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
Install the DBOS Go module:
go get github.com/dbos-inc/dbos-transact-golang/dbos@latest
DBOS Configuration and Launch
A DBOS application MUST create a context, register workflows, and launch before running any workflows:
package main
import (
"context"
"log"
"os"
"time"
"github.com/dbos-inc/dbos-transact-golang/dbos"
)
func main() {
ctx, err := dbos.NewDBOSContext(context.Background(), dbos.Config{
AppName: "my-app",
DatabaseURL: os.Getenv("DBOS_SYSTEM_DATABASE_URL"),
})
if err != nil {
log.Fatal(err)
}
defer dbos.Shutdown(ctx, 30*time.Second)
dbos.RegisterWorkflow(ctx, myWorkflow)
if err := dbos.Launch(ctx); err != nil {
log.Fatal(err)
}
}
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.RunAsStep:
func fetchData(ctx context.Context) (string, error) {
resp, err := http.Get("https://api.example.com/data")
if err != nil {
return "", err
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
return string(body), nil
}
func myWorkflow(ctx dbos.DBOSContext, input string) (string, error) {
result, err := dbos.RunAsStep(ctx, fetchData, dbos.WithStepName("fetchData"))
if err != nil {
return "", err
}
return result, nil
}
Key Constraints
- Do NOT start or enqueue workflows from within steps
- Do NOT use uncontrolled goroutines to start workflows - use
dbos.RunWorkflowwith queues ordbos.Go/dbos.Selectfor concurrent steps - Workflows MUST be deterministic - non-deterministic operations go in steps
- Do NOT modify global variables from workflows or steps
- All workflows and queues MUST be registered before calling
Launch()
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
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (3,640 bytes)
- 📎 references/_sections.md (1,444 bytes)
- 📎 references/advanced-patching.md (2,894 bytes)
- 📎 references/advanced-versioning.md (1,880 bytes)
- 📎 references/client-enqueue.md (2,077 bytes)
- 📎 references/client-setup.md (1,965 bytes)
- 📎 references/comm-events.md (2,238 bytes)
- 📎 references/comm-messages.md (1,986 bytes)
- 📎 references/comm-streaming.md (2,309 bytes)
- 📎 references/lifecycle-config.md (2,064 bytes)
- 📎 references/pattern-debouncing.md (1,761 bytes)
- 📎 references/pattern-idempotency.md (1,967 bytes)
- 📎 references/pattern-scheduled.md (2,047 bytes)
- 📎 references/pattern-sleep.md (1,467 bytes)
- 📎 references/queue-basics.md (1,404 bytes)
- 📎 references/queue-concurrency.md (1,460 bytes)
- 📎 references/queue-deduplication.md (1,601 bytes)
- 📎 references/queue-listening.md (1,332 bytes)
- 📎 references/queue-partitioning.md (1,314 bytes)
- 📎 references/queue-priority.md (1,221 bytes)
- 📎 references/queue-rate-limiting.md (1,241 bytes)
- 📎 references/step-basics.md (2,353 bytes)
- 📎 references/step-concurrency.md (2,419 bytes)
- 📎 references/step-retries.md (2,069 bytes)
- 📎 references/test-setup.md (2,311 bytes)
- 📎 references/workflow-background.md (1,598 bytes)
- 📎 references/workflow-constraints.md (2,081 bytes)
- 📎 references/workflow-control.md (1,692 bytes)
- 📎 references/workflow-determinism.md (1,499 bytes)
- 📎 references/workflow-introspection.md (1,865 bytes)
- 📎 references/workflow-timeout.md (1,324 bytes)