step-functions
AWS Step Functionsのエキスパートとして、サーバーレスなワークフローを構築し、Lambda関数やAPI、各種AWSサービスを連携させ、エラー処理や並列実行、承認フローなどを組み込んだ信頼性の高いシステムを構築するSkill。
📜 元の英語説明(参考)
You are an expert in AWS Step Functions, the serverless orchestration service for building workflows as state machines. You help developers coordinate Lambda functions, API calls, and AWS services using visual workflows with branching, parallel execution, error handling, retries, and human approval steps — building reliable, observable distributed systems without custom orchestration code.
🇯🇵 日本人クリエイター向け解説
AWS Step Functionsのエキスパートとして、サーバーレスなワークフローを構築し、Lambda関数やAPI、各種AWSサービスを連携させ、エラー処理や並列実行、承認フローなどを組み込んだ信頼性の高いシステムを構築するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o step-functions.zip https://jpskill.com/download/15420.zip && unzip -o step-functions.zip && rm step-functions.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15420.zip -OutFile "$d\step-functions.zip"; Expand-Archive "$d\step-functions.zip" -DestinationPath $d -Force; ri "$d\step-functions.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
step-functions.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
step-functionsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 この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-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
AWS Step Functions — サーバーレスワークフローオーケストレーション
あなたは、ステートマシンとしてワークフローを構築するためのサーバーレスオーケストレーションサービスである AWS Step Functions のエキスパートです。開発者が、分岐、並列実行、エラー処理、再試行、および人的承認ステップを備えた視覚的なワークフローを使用して、Lambda 関数、API 呼び出し、および AWS サービスを調整し、カスタムオーケストレーションコードなしで、信頼性が高く、可観測な分散システムを構築するのを支援します。
主要な機能
ステートマシン定義
{
"Comment": "Order processing workflow",
"StartAt": "ValidateOrder",
"States": {
"ValidateOrder": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:validate-order",
"Next": "CheckInventory",
"Catch": [{
"ErrorEquals": ["ValidationError"],
"Next": "RejectOrder"
}],
"Retry": [{
"ErrorEquals": ["States.TaskFailed"],
"IntervalSeconds": 2,
"MaxAttempts": 3,
"BackoffRate": 2.0
}]
},
"CheckInventory": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:check-inventory",
"Next": "InventoryDecision"
},
"InventoryDecision": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.inStock",
"BooleanEquals": true,
"Next": "ProcessPayment"
},
{
"Variable": "$.backorderAvailable",
"BooleanEquals": true,
"Next": "CreateBackorder"
}
],
"Default": "NotifyOutOfStock"
},
"ProcessPayment": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:process-payment",
"Next": "ParallelFulfillment"
},
"ParallelFulfillment": {
"Type": "Parallel",
"Branches": [
{
"StartAt": "ShipOrder",
"States": {
"ShipOrder": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:ship-order",
"End": true
}
}
},
{
"StartAt": "SendConfirmation",
"States": {
"SendConfirmation": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:send-email",
"End": true
}
}
},
{
"StartAt": "UpdateAnalytics",
"States": {
"UpdateAnalytics": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:update-analytics",
"End": true
}
}
}
],
"Next": "OrderComplete"
},
"OrderComplete": {
"Type": "Succeed"
},
"RejectOrder": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:reject-order",
"Next": "OrderFailed"
},
"NotifyOutOfStock": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:notify-out-of-stock",
"Next": "OrderFailed"
},
"OrderFailed": {
"Type": "Fail",
"Error": "OrderProcessingFailed",
"Cause": "Order could not be fulfilled"
}
}
}
Direct SDK Integrations
{
"WriteToDynamo": {
"Type": "Task",
"Resource": "arn:aws:states:::dynamodb:putItem",
"Parameters": {
"TableName": "orders",
"Item": {
"id": { "S.$": "$.orderId" },
"status": { "S": "processing" },
"total": { "N.$": "States.Format('{}', $.total)" }
}
},
"Next": "SendToSQS"
},
"SendToSQS": {
"Type": "Task",
"Resource": "arn:aws:states:::sqs:sendMessage",
"Parameters": {
"QueueUrl": "https://sqs.us-east-1.amazonaws.com/123/notifications",
"MessageBody.$": "States.JsonToString($.notification)"
},
"Next": "WaitForApproval"
},
"WaitForApproval": {
"Type": "Task",
"Resource": "arn:aws:states:::sqs:sendMessage.waitForTaskToken",
"Parameters": {
"QueueUrl": "https://sqs.us-east-1.amazonaws.com/123/approvals",
"MessageBody": {
"taskToken.$": "$$.Task.Token",
"orderId.$": "$.orderId"
}
},
"TimeoutSeconds": 86400,
"Next": "FinalStep"
}
}
インストール
# SAM / CDK / CloudFormation をデプロイメントに使用
# AWS SDK を実行の開始に使用
npm install @aws-sdk/client-sfn
# 実行を開始
import { SFNClient, StartExecutionCommand } from "@aws-sdk/client-sfn";
const sfn = new SFNClient({});
await sfn.send(new StartExecutionCommand({
stateMachineArn: "arn:aws:states:...",
input: JSON.stringify({ orderId: "123", items: [...] }),
}));
ベストプラクティス
- 高ボリュームには Express — イベント処理には Express Workflows を使用します(10万件以上の実行/秒、より安価)。長時間実行には Standard を使用します。
- Catch + Retry — すべての Task ステートに
CatchとRetryを追加します。一時的な障害を適切に処理します。 - ダイレクトインテグレーション — Lambda を使用せずに、DynamoDB、SQS、SNS、ECS を直接呼び出します。レイテンシーとコストを削減します。
- ファンアウトには Parallel — 並行操作には Parallel ステートを使用します。配列の処理には Map ステートを使用します。
- コールバックを待機 — 人的承認、外部 Webhook、または非同期処理には
.waitForTaskTokenを使用します。 - 入出力処理 — ステート間のデータフローを制御するには、
InputPath、OutputPath、ResultPathを使用します。 - 視覚的なデバッグ — Step Functions コンソールには、実行フローが視覚的に表示されます。各ステートには、入力/出力/エラーが表示されます。
- 冪等性 — ワークフローを通じて冪等性トークンを渡します。再試行によってステップが再実行される可能性があります。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
AWS Step Functions — Serverless Workflow Orchestration
You are an expert in AWS Step Functions, the serverless orchestration service for building workflows as state machines. You help developers coordinate Lambda functions, API calls, and AWS services using visual workflows with branching, parallel execution, error handling, retries, and human approval steps — building reliable, observable distributed systems without custom orchestration code.
Core Capabilities
State Machine Definition
{
"Comment": "Order processing workflow",
"StartAt": "ValidateOrder",
"States": {
"ValidateOrder": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:validate-order",
"Next": "CheckInventory",
"Catch": [{
"ErrorEquals": ["ValidationError"],
"Next": "RejectOrder"
}],
"Retry": [{
"ErrorEquals": ["States.TaskFailed"],
"IntervalSeconds": 2,
"MaxAttempts": 3,
"BackoffRate": 2.0
}]
},
"CheckInventory": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:check-inventory",
"Next": "InventoryDecision"
},
"InventoryDecision": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.inStock",
"BooleanEquals": true,
"Next": "ProcessPayment"
},
{
"Variable": "$.backorderAvailable",
"BooleanEquals": true,
"Next": "CreateBackorder"
}
],
"Default": "NotifyOutOfStock"
},
"ProcessPayment": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:process-payment",
"Next": "ParallelFulfillment"
},
"ParallelFulfillment": {
"Type": "Parallel",
"Branches": [
{
"StartAt": "ShipOrder",
"States": {
"ShipOrder": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:ship-order",
"End": true
}
}
},
{
"StartAt": "SendConfirmation",
"States": {
"SendConfirmation": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:send-email",
"End": true
}
}
},
{
"StartAt": "UpdateAnalytics",
"States": {
"UpdateAnalytics": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:update-analytics",
"End": true
}
}
}
],
"Next": "OrderComplete"
},
"OrderComplete": {
"Type": "Succeed"
},
"RejectOrder": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:reject-order",
"Next": "OrderFailed"
},
"NotifyOutOfStock": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123:function:notify-out-of-stock",
"Next": "OrderFailed"
},
"OrderFailed": {
"Type": "Fail",
"Error": "OrderProcessingFailed",
"Cause": "Order could not be fulfilled"
}
}
}
Direct SDK Integrations
{
"WriteToDynamo": {
"Type": "Task",
"Resource": "arn:aws:states:::dynamodb:putItem",
"Parameters": {
"TableName": "orders",
"Item": {
"id": { "S.$": "$.orderId" },
"status": { "S": "processing" },
"total": { "N.$": "States.Format('{}', $.total)" }
}
},
"Next": "SendToSQS"
},
"SendToSQS": {
"Type": "Task",
"Resource": "arn:aws:states:::sqs:sendMessage",
"Parameters": {
"QueueUrl": "https://sqs.us-east-1.amazonaws.com/123/notifications",
"MessageBody.$": "States.JsonToString($.notification)"
},
"Next": "WaitForApproval"
},
"WaitForApproval": {
"Type": "Task",
"Resource": "arn:aws:states:::sqs:sendMessage.waitForTaskToken",
"Parameters": {
"QueueUrl": "https://sqs.us-east-1.amazonaws.com/123/approvals",
"MessageBody": {
"taskToken.$": "$$.Task.Token",
"orderId.$": "$.orderId"
}
},
"TimeoutSeconds": 86400,
"Next": "FinalStep"
}
}
Installation
# SAM / CDK / CloudFormation for deployment
# AWS SDK for starting executions
npm install @aws-sdk/client-sfn
# Start execution
import { SFNClient, StartExecutionCommand } from "@aws-sdk/client-sfn";
const sfn = new SFNClient({});
await sfn.send(new StartExecutionCommand({
stateMachineArn: "arn:aws:states:...",
input: JSON.stringify({ orderId: "123", items: [...] }),
}));
Best Practices
- Express for high-volume — Use Express Workflows for event processing (100K+ executions/sec, cheaper); Standard for long-running
- Catch + Retry — Add
CatchandRetryon every Task state; handle transient failures gracefully - Direct integrations — Call DynamoDB, SQS, SNS, ECS directly without Lambda; reduces latency and cost
- Parallel for fan-out — Use Parallel state for concurrent operations; Map state for processing arrays
- Wait for callback — Use
.waitForTaskTokenfor human approval, external webhook, or async processing - Input/output processing — Use
InputPath,OutputPath,ResultPathto control data flow between states - Visual debugging — Step Functions console shows execution flow visually; each state shows input/output/errors
- Idempotency — Pass idempotency tokens through the workflow; retries may re-execute steps