| name | pipelines-debug |
| description | Pipelines Service のデバッグワークフロー。API経由でワークフロー状態確認、失敗原因の特定、stepログの取得、手動リトライを行う。 |
| allowed-tools | Bash, Read |
Pipelines Debug
Pipelines Service のワークフロー状態確認・失敗調査・デバッグを行うスキル。全操作を API 経由で実行する。
ワークフロー
0. 環境変数セット
export API_BASE="http://localhost:8001"
export PIPELINES_API_KEY="<your-api-key>"
1. ヘルスチェック
curl -s http://localhost:8001/v1/health
2. 全ワークフローのステータス確認
./.claude/skills/pipelines-debug/check-workflows.sh "$API_BASE" "$PIPELINES_API_KEY"
3. 失敗ワークフローの run ID を特定
curl -s -H "X-API-Key: ${PIPELINES_API_KEY}" \
"${API_BASE}/v1/workflows/local_mirror_sync_workflow/runs" | jq '.[0]'
curl -s -H "X-API-Key: ${PIPELINES_API_KEY}" \
"${API_BASE}/v1/runs" | jq '.[] | {run_id, status, workflow_id, started_at}'
4. run の詳細を確認(step ごとのステータス・エラー)
RUN_ID="<run_id>"
curl -s -H "X-API-Key: ${PIPELINES_API_KEY}" \
"${API_BASE}/v1/runs/${RUN_ID}" | jq .
5. 失敗 step のログを取得
RUN_ID="<run_id>"
STEP_ID="<step_id>"
curl -s -H "X-API-Key: ${PIPELINES_API_KEY}" \
"${API_BASE}/v1/runs/${RUN_ID}/steps/${STEP_ID}/log"
6. 手動リトライ
curl -s -X POST -H "X-API-Key: ${PIPELINES_API_KEY}" \
"${API_BASE}/v1/runs/${RUN_ID}/retry" | jq .
API エンドポイント一覧
全エンドポイント(/v1/health 除く)に X-API-Key ヘッダーが必要。
| Method | Path | 説明 |
|---|
GET | /v1/health | ヘルスチェック |
GET | /v1/workflows | ワークフロー一覧 |
GET | /v1/workflows/{workflow_id} | ワークフロー詳細 |
GET | /v1/workflows/{workflow_id}/runs | ワークフローの run 一覧 |
POST | /v1/workflows/{workflow_id}/runs | 手動トリガー |
POST | /v1/workflows/{workflow_id}/enable | スケジュール有効化 |
POST | /v1/workflows/{workflow_id}/disable | スケジュール無効化 |
GET | /v1/runs | 全 run 一覧 |
GET | /v1/runs/{run_id} | run 詳細(steps 含む) |
GET | /v1/runs/{run_id}/steps/{step_id}/log | step ログ(text/plain) |
POST | /v1/runs/{run_id}/retry | リトライ |
POST | /v1/runs/{run_id}/cancel | キュー済み run をキャンセル |
環境変数
| 変数 | 説明 | デフォルト |
|---|
API_BASE | Pipelines API のベース URL | http://localhost:8001 |
PIPELINES_API_KEY | API 認証キー(必須) | - |
ガードレール
- API キーやシークレットをレスポンスやログに含めない
- リトライは原因究明後に行う
- 本番環境への操作は慎重に