{"id":"fix-failing-pipelines","name":"fix-failing-pipelines","summary":"このスキルは、ユーザーが「パイプラインを修正する」「CIを修正する」「ステージングパイプラインのチェック」「失敗するワークフローを修正する」「失敗するアクションを修正する」、またはベビーシッターリポジトリのステージングブランチで失敗しているGitHubアクションのワークフローを見つけて修正したい場合に使うべきです。","body":"# Fix Failing Pipelines\n\nCheck GitHub Actions workflows on the `staging` branch of https://github.com/a5c-ai/babysitter/actions, identify workflows whose most recent run is failing, and dispatch `/babysitter:yolo` to fix each one.\n\n## Workflow\n\n### Step 1: Fetch Most Recent Run Per Workflow\n\nUse the `gh` CLI to list recent workflow runs on the `staging` branch:\n\n```bash\ngh run list --repo a5c-ai/babysitter --branch staging --limit 50 --json databaseId,workflowName,status,conclusion,createdAt,headBranch\n```\n\nGroup the results by `workflowName`. For each workflow, keep only the **most recent** run (by `createdAt`). Discard workflows where the most recent run is still `in_progress` -- we only care about completed runs.\n\n### Step 2: Identify Failures\n\nFrom the grouped results, select only workflows where the most recent completed run has `conclusion: \"failure\"`. Skip workflows whose latest run succeeded, was cancelled, or is still running.\n\nIf no workflows have a failing most-recent run, report that all staging pipelines are green and stop.\n\n### Step 3: Get Failure Details\n\nFor each failing workflow run, fetch the failed job and step details:\n\n```bash\ngh run view <run_id> --repo a5c-ai/babysitter --json jobs --jq '.jobs[] | select(.conclusion == \"failure\") | {name, conclusion, steps: [.steps[] | select(.conclusion == \"failure\") | .name]}'\n```\n\nThen fetch the logs to understand the actual error:\n\n```bash\ngh run view <run_id> --repo a5c-ai/babysitter --log-failed 2>&1 | tail -100\n```\n\n### Step 4: Present Failures\n\nDisplay the list of failing workflows to the user with:\n- Workflow name\n- Run ID and link\n- Failed job name(s) and failed step name(s)\n- Brief summary of the error from the logs\n\n### Step 5: Fix via Babysitter\n\nFor each failing workflow, invoke the `babysitter:yolo` skill with a prompt that includes the failure context:\n\n```\n/babysitter:yolo fix the failing \"<workflow_name>\" pipeline on staging. The most recent run (<run_id>) failed in job \"<job_name>\" at step \"<step_name>\". Error details: <brief_error_summary>. Investigate the failure, fix the root cause, and push a fix to the staging branch. Do not create a new branch -- commit directly to staging.\n```\n\nIf multiple workflows are failing, process them sequentially -- complete one before starting the next. Present a summary after each fix attempt.\n\n### Step 6: Verify Fixes\n\nAfter pushing a fix for each workflow, wait briefly then check if a new run was triggered:\n\n```bash\ngh run list --repo a5c-ai/babysitter --branch staging --workflow \"<workflow_file>\" --limit 1 --json databaseId,status,conclusion\n```\n\nReport whether a new run was triggered and its current status. Do not wait for it to complete -- just confirm it was triggered.\n\n### Step 7: Summary\n\nAfter all failing workflows have been addressed, provide a summary:\n- Which workflows were failing\n- What was fixed for each\n- Whether new runs were triggered\n- Any workflows that could not be fixed (with reason)\n\n## Notes\n\n- Only the **most recent** run per workflow type matters. Older failures that have since been superseded by a success are not actionable.\n- Runs that are `in_progress` are skipped entirely -- they haven't concluded yet.\n- Cancelled runs are not treated as failures.\n- The `gh` CLI must be authenticated. If authentication fails, prompt the user to run `gh auth login`.\n- Each fix is handed off to `/babysitter:yolo` which handles the actual implementation work non-interactively.\n- Fixes are committed directly to `staging` -- no feature branches or PRs for pipeline fixes.\n- The entire workflow should be without any user interaction or breakpoints in the run, allowing for seamless pipeline repair.\n- if you fixed it, wait for the new run to be completed and check if it succeeded. if it failed again, iterate on the fix until it succeeds.","author":"@a5c-ai","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/a5c-ai/babysitter/tree/main/.claude/skills/fix-failing-pipelines","license":"MIT","category":"document","lang":"en","tokens":905,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}