• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

output-workflow-trace

プラグイン
outputai
ソース
GitHub で見る ↗
説明

出力SDK(ソフトウェア開発キット)のワークフロー実行トレース(処理の履歴記録)を分析します。 次のような場合に使用: 特定のワークフローをデバッグ(問題を修正)したい、ステップの失敗を調べたい、入出力データを分析したい、実行の流れを理解したい、または調査対象となるワークフローIDがある場合。

原文を表示

Analyze Output SDK workflow execution traces. Use when debugging a specific workflow, examining step failures, analyzing input/output data, understanding execution flow, or when you have a workflow ID to investigate.

ユースケース
  • ワークフローをデバッグしたい
  • ステップの失敗を調べたい
  • 入出力データを分析したい
  • 実行の流れを理解したい
本文(日本語訳)

ワークフロー実行トレース分析

概要

このスキルは、Output CLIを使ってワークフロー実行トレース(実行記録)を取得・分析するための手引きを提供します。トレースには、各ステップの入力・出力、エラー、実行時間などの完全な実行履歴が記録されます。

次のような場合に使用

  • ワークフローIDがあり、何が起きたかを理解する必要がある
  • ワークフローが失敗し、どのステップで失敗したかを特定したい
  • 各ステップの入出力データを確認したい
  • 実行の流れと実行時間を理解したい
  • エラーメッセージとスタックトレース(エラーが発生した箇所の追跡情報)を見つけたい
  • リトライ動作や予期しない結果をデバッグしたい

手順

ステップ1: 実行トレースの取得

基本的なトレース(テキスト形式、長い値は省略される場合あり):

npx output workflow debug <workflowId>

完全なトレース(JSON形式、詳細な分析に推奨):

npx output workflow debug <workflowId> --json

ヒント: 完全なトレースデータが必要な場合は、常に --json を使用してください。テキスト形式は長い値を省略するため、重要なデバッグ情報が隠れる可能性があります。

ステップ2: トレースの分析

トレースを確認する際は、以下のチェックリストに従ってください:

  1. 失敗したステップを特定: エラーステータスや失敗を示すマークを持つステップを探す
  2. エラーメッセージを確認: 正確なエラーメッセージとスタックトレースを見つける
  3. ステップの入力を確認: 失敗したステップに渡されたデータが正しいか検証する
  4. ステップの出力を確認: 先行するステップからの出力結果を見る
  5. リトライ試行を確認: リトライの回数と結果を記録する
  6. 実行時間を確認: タイムアウトを示唆する異常な遅延がないか見る

ステップ3: Temporal UIで可視化分析

ブラウザで http://localhost:8080 を開き、ワークフローの見た目での検査ができます:

  1. ワークフローIDで検索
  2. イベント履歴のタイムラインを表示
  3. 個別のイベントをクリックして詳細を確認
  4. ステップの入出力を確認
  5. リトライ試行と実行時間の情報を見る
  6. 必要に応じてトレースデータをエクスポート

トレースで確認すべき事項

エラーパターン

エラーメッセージ 原因の可能性
「incompatible schema」 Zodインポートの問題 - zod を使用(正しくは @outputai/core)
「non-deterministic」 Math.random()やDate.now()などの非決定的な関数をワークフロー内で使用
「FatalError」リトライコンテキスト付き ステップ呼び出しをtry-catchでラップしている
「undefined is not a function」 スキーマ定義が不足している
「workflow must be deterministic」 ワークフロー関数内での直接的なI/O操作
「ECONNREFUSED」またはタイムアウト サービスが起動していないか、ネットワークに問題がある

ステップのステータス値

  • COMPLETED: ステップが正常に完了
  • FAILED: ステップがエラーをスロー(リトライされる場合もある)
  • RETRYING: 失敗後、ステップをリトライ中
  • TIMED_OUT: ステップが時間制限を超過
  • CANCELLED: ワークフローがステップ完了前に停止

トレースの主要フィールド

JSON トレースを確認する際は、以下のフィールドに注目してください:

  • steps[].name: ステップの識別子
  • steps[].status: 実行結果
  • steps[].input: ステップに渡されたデータ
  • steps[].output: ステップから返されたデータ
  • steps[].error: 失敗時のエラー詳細
  • steps[].attempts: 実行試行の回数
  • steps[].duration: ステップにかかった時間

例

シナリオ: 失敗したワークフローをデバッグする

# 実行リストからワークフローIDを取得
npx output workflow runs list --limit 5 --json

# 詳細なトレースを取得
npx output workflow debug abc123xyz --json

# 出力から失敗したステップを探す
# 出力の例:
# {
#   "workflowId": "abc123xyz",
#   "status": "FAILED",
#   "steps": [
#     { "name": "fetchData", "status": "COMPLETED", ... },
#     { "name": "processData", "status": "FAILED", "error": "..." }
#   ]
# }

シナリオ: リトライ動作を調査する

npx output workflow debug abc123xyz --json | jq '.steps[] | select(.attempts > 1)'

シナリオ: 特定のステップへの入力を確認する

npx output workflow debug abc123xyz --json | jq '.steps[] | select(.name == "processData") | .input'

分析後の次のステップ

  1. エラーを一般的なパターンと照合(エラー関連スキルを参照)
  2. ベストプラクティスについて workflow-quality サブエージェントに相談
  3. 特定された問題に基づいてコードを修正
  4. ワークフローを再実行: npx output workflow run <workflowName> --input '<input>'
  5. 新しいトレースで修正を検証
原文(English)を表示

Workflow Trace Analysis

Overview

This skill provides guidance on retrieving and analyzing workflow execution traces using the Output CLI. Traces show the complete execution history including step inputs, outputs, errors, and timing information.

When to Use This Skill

  • You have a workflow ID and need to understand what happened
  • A workflow failed and you need to identify which step failed
  • You need to examine the input/output data at each step
  • You want to understand the execution flow and timing
  • You need to find error messages and stack traces
  • Debugging retry behavior or unexpected results

Instructions

Step 1: Retrieve the Execution Trace

Basic trace (text format, may be truncated):

npx output workflow debug <workflowId>

Full trace (JSON format, recommended for detailed analysis):

npx output workflow debug <workflowId> --json

Tip: Always use --json when you need complete trace data. The text format truncates long values which can hide important debugging information.

Step 2: Analyze the Trace

Follow this checklist when examining a trace:

  1. Identify the failed step: Look for steps with error status or failure indicators
  2. Examine error messages: Find the exact error message and stack trace
  3. Check step inputs: Verify the data passed to the failing step was correct
  4. Check step outputs: Look at outputs from preceding steps
  5. Review retry attempts: Note how many retries occurred and their outcomes
  6. Check timing: Look for unusual delays that might indicate timeouts

Step 3: Use the Temporal UI for Visual Analysis

Open http://localhost:8080 in your browser for a visual workflow inspection:

  1. Search for your workflow by ID
  2. View the event history timeline
  3. Click on individual events to see details
  4. Inspect step inputs and outputs
  5. See retry attempts and timing information
  6. Export trace data if needed

What to Look For in Traces

Error Patterns

Error Message Likely Cause
"incompatible schema" Zod import issue - using zod instead of @outputai/core
"non-deterministic" Using Math.random(), Date.now(), etc. in workflow code
"FatalError" with retry context Try-catch wrapping step calls
"undefined is not a function" Missing schema definitions
"workflow must be deterministic" Direct I/O in workflow function
"ECONNREFUSED" or timeout Services not running or network issues

Step Status Values

  • COMPLETED: Step finished successfully
  • FAILED: Step threw an error (may retry)
  • RETRYING: Step is being retried after a failure
  • TIMED_OUT: Step exceeded its timeout
  • CANCELLED: Workflow was stopped before step completed

Key Trace Fields

When examining JSON traces, focus on these fields:

  • steps[].name: Step identifier
  • steps[].status: Execution result
  • steps[].input: Data passed to the step
  • steps[].output: Data returned from the step
  • steps[].error: Error details if failed
  • steps[].attempts: Number of execution attempts
  • steps[].duration: How long the step took

Examples

Scenario: Debug a failed workflow

# Get the workflow ID from runs list
npx output workflow runs list --limit 5 --json

# Get detailed trace
npx output workflow debug abc123xyz --json

# Look for the failing step in the output
# Example output structure:
# {
#   "workflowId": "abc123xyz",
#   "status": "FAILED",
#   "steps": [
#     { "name": "fetchData", "status": "COMPLETED", ... },
#     { "name": "processData", "status": "FAILED", "error": "..." }
#   ]
# }

Scenario: Investigate retry behavior

npx output workflow debug abc123xyz --json | jq '.steps[] | select(.attempts > 1)'

Scenario: Check inputs to a specific step

npx output workflow debug abc123xyz --json | jq '.steps[] | select(.name == "processData") | .input'

Next Steps After Analysis

  1. Match the error to common patterns (see error skills)
  2. Consult the workflow-quality subagent for best practices
  3. Make code fixes based on identified issues
  4. Re-run the workflow: npx output workflow run <workflowName> --input '<input>'
  5. Verify the fix with a new trace

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。