• 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-stop

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

Output SDK ワークフロー(自動処理の流れ)の実行中の処理を中止します。 次のような場合に使用: - ワークフローをキャンセルしたいとき - 長く続いている処理を止めたいとき - 動作が止まったワークフローを終了させたいとき - 進行中のワークフローを途中で中止する必要があるとき

原文を表示

Stop a running Output SDK workflow execution. Use when cancelling a workflow, stopping a long-running process, terminating a stuck workflow, or when you need to abort a workflow in progress.

ユースケース
  • ワークフローをキャンセルしたいとき
  • 長く続いている処理を止めたいとき
  • 動作が止まったワークフローを終了させたいとき
  • 進行中のワークフローを途中で中止する必要があるとき
本文(日本語訳)

ワークフロー実行の停止

概要

実行中のワークフローを停止するスキルです。ワークフローは「終了」と表示され、残りのステップは実行されません。この操作は取り消せないため、慎重に使用してください。

このスキルを使用する場合

  • 不要になったワークフローをキャンセルしたい
  • 動作が止まっているように見えるワークフローを停止したい
  • 長時間実行されているワークフローを停止してリソースを解放したい
  • 誤った入力でスタートしたワークフローを中止したい
  • 予期しない動作が発生した際に緊急停止したい

このスキルを使用しない場合

  • ワークフローがもうすぐ完了する場合(完了を待たせる)
  • 停止が安全かどうか確認できていない場合
  • デバッグを行う場合(代わりに npx output workflow debug を使用)
  • ワークフローが副作用(データベースの変更など)を伴い、データが不完全な状態で残る可能性がある場合

使用方法

ワークフローを停止する

npx output workflow stop <workflowId>

安全性に関する注意点

停止する前に、以下を確認してください:

  1. 副作用(すでに行われた変更): ワークフローが行った変更をやり直す必要があるか
  2. 部分的な完了: 副作用を伴うステップがすでに実行されていないか
  3. 依存関係: 他のワークフローやシステムがこの結果を待機していないか
  4. 復旧: 停止後に再開またはクリーンアップが必要か

使用例

例1: 動作が止まったワークフローを停止

# 状態を確認 - ワークフローが長時間実行されている
npx output workflow status abc123xyz
# Status: RUNNING (2時間実行中)

# 停止することを決定
npx output workflow stop abc123xyz
# ワークフロー abc123xyz は停止されました

# 停止状態を確認
npx output workflow status abc123xyz
# Status: TERMINATED

例2: 誤った入力で開始したワークフローをキャンセル

# 開始直後に入力が間違っていたことに気づいた
npx output workflow start expensive-job --input '{"wrong": "input"}'
# ワークフロー ID: job-abc123

# 処理が進む前に停止
npx output workflow stop job-abc123

# 正しい入力で再度開始
npx output workflow start expensive-job --input '{"correct": "input"}'

例3: 複数のワークフローを停止

# 実行中のワークフロー一覧を取得
npx output workflow runs list --json | jq '.[] | select(.status == "RUNNING") | .workflowId'

# 各々を停止する(事前に十分確認してください)
for id in abc123 def456; do
  echo "停止中: $id"
  npx output workflow stop $id
done

ワークフロー停止後

状態を確認する

npx output workflow status <workflowId>
# Status: TERMINATED

実行内容を確認する

npx output workflow debug <workflowId> --json

以下の情報が表示されます:

  • 停止前に完了したステップ
  • 部分的な結果や副作用
  • ワークフローが停止された時点

必要に応じてクリーンアップする

ワークフローが部分的な変更を加えた場合:

  1. デバッグ出力で何が完了したかを確認
  2. 必要に応じて副作用を手動で戻す
  3. 同様の状況に備えてクリーンアップ用ワークフローの作成を検討

必要に応じて再度開始する

# 新しい実行を開始する
npx output workflow start <workflowName> --input '<input>'

ワークフロー停止時の動作

  1. Temporal サーバーが終了リクエストを受け取る
  2. 実行中のステップは完了またはキャンセルされる場合がある
  3. 以降のステップは実行されない
  4. ワークフローのステータスが「終了」に変わる
  5. 実行結果は利用できない(ワークフローが完了していないため)

トラブルシューティング

「ワークフローが見つかりません」というメッセージが表示される

  • ワークフロー ID が正しいか確認
  • npx output workflow runs list を使用して有効な ID を確認

「ワークフローはすでに完了しています」というメッセージが表示される

  • 停止コマンド実行前にワークフローが完了した
  • ステータスを確認し、必要に応じて結果を取得

「ワークフローはすでに終了しています」というメッセージが表示される

  • ワークフローが既に停止されている
  • 対応は不要

停止コマンドが応答しない

  • Temporal サーバーが応答していない可能性
  • サービスが実行中か確認: docker ps | grep output
  • サービスの再起動が必要な場合がある

ベストプラクティス

  1. 必ず事前に状態を確認: ワークフローが実際に実行中か確認する
  2. 停止前に確認: npx output workflow debug を使用して状態を把握する
  3. 理由を記録: なぜワークフローを停止したかをメモに残す
  4. クリーンアップを計画: 手動で対応が必要な副作用を把握する
  5. 代案を検討: 停止ではなく、完了を待つ方がよい場合もある

関連コマンド

  • npx output workflow status <id> - 現在のステータスを確認
  • npx output workflow debug <id> - 実行の詳細を確認
  • npx output workflow start <name> - 新しい実行を開始
  • npx output workflow runs list - 実行履歴を表示
原文(English)を表示

Stop Running Workflow

Overview

This skill stops a running workflow execution. The workflow will be marked as TERMINATED and will not complete its remaining steps. Use this carefully as it cannot be undone.

When to Use This Skill

  • Cancelling a workflow that's no longer needed
  • Stopping a workflow that appears stuck
  • Terminating a long-running workflow to free resources
  • Aborting a workflow with incorrect input
  • Emergency stop during unexpected behavior

When NOT to Use This

  • If the workflow is about to complete (let it finish)
  • If you're unsure whether stopping is safe
  • For debugging (use npx output workflow debug instead)
  • If the workflow has side effects that may leave data in an inconsistent state

Instructions

Stop a Workflow

npx output workflow stop <workflowId>

Safety Considerations

Before stopping, consider:

  1. Side effects: Has the workflow made changes that need to be rolled back?
  2. Partial completion: Are there steps that completed with side effects?
  3. Dependencies: Are other workflows or systems waiting on this result?
  4. Recovery: Do you need to restart or clean up after stopping?

Examples

Scenario: Stop a stuck workflow

# Check status - workflow has been running too long
npx output workflow status abc123xyz
# Status: RUNNING (for 2 hours)

# Decide to stop it
npx output workflow stop abc123xyz
# Workflow abc123xyz has been stopped

# Verify it's terminated
npx output workflow status abc123xyz
# Status: TERMINATED

Scenario: Cancel a workflow started with wrong input

# Realized input was wrong immediately after starting
npx output workflow start expensive-job --input '{"wrong": "input"}'
# Workflow ID: job-abc123

# Stop before it processes too much
npx output workflow stop job-abc123

# Start again with correct input
npx output workflow start expensive-job --input '{"correct": "input"}'

Scenario: Stop multiple workflows

# Get list of running workflows
npx output workflow runs list --json | jq '.[] | select(.status == "RUNNING") | .workflowId'

# Stop each one (carefully review first!)
for id in abc123 def456; do
  echo "Stopping $id"
  npx output workflow stop $id
done

After Stopping a Workflow

Check the State

npx output workflow status <workflowId>
# Status: TERMINATED

Review What Happened

npx output workflow debug <workflowId> --json

This shows:

  • Which steps completed before termination
  • Any partial results or side effects
  • The point at which the workflow was stopped

Clean Up If Needed

If the workflow made partial changes:

  1. Review the debug output to see what completed
  2. Manually revert any side effects if necessary
  3. Consider creating a cleanup workflow for this scenario

Restart If Appropriate

# Start a fresh execution
npx output workflow start <workflowName> --input '<input>'

What Happens When You Stop

  1. The Temporal server receives the termination request
  2. The currently executing step may complete or abort
  3. No further steps are executed
  4. The workflow status changes to TERMINATED
  5. The result will not be available (workflow didn't complete)

Troubleshooting

"Workflow not found"

  • Check the workflow ID is correct
  • Use npx output workflow runs list to find valid IDs

"Workflow already completed"

  • The workflow finished before the stop command
  • Check status and get result if needed

"Workflow already terminated"

  • The workflow was already stopped
  • No action needed

Stop command hangs

  • The Temporal server may be unresponsive
  • Check if services are running: docker ps | grep output
  • May need to restart services

Best Practices

  1. Always check status first: Confirm the workflow is actually RUNNING
  2. Review before stopping: Use npx output workflow debug to understand state
  3. Document why: Note why you stopped the workflow for future reference
  4. Plan for cleanup: Know what side effects may need manual handling
  5. Consider alternatives: Sometimes waiting is better than stopping

Related Commands

  • npx output workflow status <id> - Check current status
  • npx output workflow debug <id> - Review execution details
  • npx output workflow start <name> - Start a new execution
  • npx output workflow runs list - View execution history

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