debug-pipeline
Diagnose and fix CI pipeline failures. Step-by-step debugging with sem-ai.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Diagnose and fix CI pipeline failures. Step-by-step debugging with sem-ai.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Deploy via Semaphore promotions. Manage deployment targets, promote pipelines, deploy-and-wait.
Manage Semaphore infrastructure — secrets, notifications, agent types, scheduled tasks, artifacts.
Diagnose sem-ai plugin issues when the sem-ai binary isn't installed yet, and guide the user through binary install. Use when the user reports sem-ai not working, MCP tools missing, slash command not found, `sem-ai connect` failing, or sees "command not found: sem-ai".
Triage and FIX flaky tests on a Semaphore project end-to-end — find the worst offenders, pull history, locate the test in the code, diagnose the root cause, write a fix or justified quarantine, and verify by re-running. Use whenever the user wants to fix/investigate flaky tests, de-flake CI, reduce intermittent failures, asks "why is CI randomly red", wants to quarantine a flake, or after `sem-ai flaky list` surfaces offenders. Goes BEYOND detection (test-intelligence) to root-cause + code change + verification.
Translate a repo's GitHub Actions workflows into an equivalent Semaphore pipeline. ONLY covers the GHA→Semaphore mapping and conversion procedure; for Semaphore-side depth (cache CLI, test-results, blocks structure, sharding, promotions) defer to the linked skills. Use when the user asks to convert/port/migrate GitHub Actions to Semaphore, says "translate this workflow" or "convert ci.yml", or the repo has `.github/workflows/` and the user wants Semaphore instead. Can be invoked directly as `/sem-ai:gha-to-semaphore` (or via the broader `/sem-ai:init` orchestrator).
Initialize Semaphore CI/CD for the current repository — bootstrap the Semaphore project, write a working `.semaphore/semaphore.yml` (translating from GitHub Actions if present, or from scratch), wire required secrets, validate, and watch the first workflow. Applies Semaphore-side defaults automatically — agent image, toolbox CLIs, `test-results` epilogue rule, sharding heuristics — by routing through the linked skills. Use when the user wants to set up CI on Semaphore, says "initialize", "bootstrap CI", "prepare CI/CD for this project", "create a workflow on Semaphore", "make a `.semaphore` config", or runs `/sem-ai:init`.
| name | debug-pipeline |
| description | Diagnose and fix CI pipeline failures. Step-by-step debugging with sem-ai. |
| user-invocable | false |
sem-ai diagnose <workflow-id>
# or auto-detect from git:
sem-ai diagnose
sem-ai diagnose --project my-app --branch main # --project/--branch optional, auto-detected from origin + HEAD
Returns: pipeline result, failed blocks, failed jobs with log tails AND parsed test results (file:line:message).
sem-ai workflow list --branch feature-x # --project/--branch optional, auto-detected from origin + HEAD
sem-ai pipeline show <pipeline-id>
# Shows blocks and jobs. Look for "result": "failed"
sem-ai job log <job-id> # structured JSON
sem-ai job log <job-id> --format table # human-readable
sem-ai test summary --pipeline <id>
Example output:
{
"verdict": "failed",
"total": 11, "passed": 10, "failed": 1,
"failures": [{"job": "go test", "test": "Test_timeHandler_statusCode", "file": "main_test.go", "line": 243, "message": "expected status 201, got 200"}]
}
sem-ai troubleshoot workflow <id>
sem-ai troubleshoot pipeline <id>
sem-ai troubleshoot job <id>
sem-ai test flaky --count 10 # --project optional, auto-detected from origin
sem-ai workflow rerun <id> # full rerun
sem-ai rerun-failed <pipeline-id> # rebuild failed blocks only
sem-ai watch <new-workflow-id> # wait for completion
sem-ai test summary --pipeline <id> # verify
sem-ai watch <id> is for when you already hold the id from workflow rerun output. To re-find and watch the rerun for your exact commit (e.g. after pushing the fix), use the watch-after-push pattern: find the run by commit_sha, then sem-ai watch it.
| Log pattern | Cause | Next step |
|---|---|---|
exit_code: 1 on test command | Test failure | sem-ai test summary --pipeline <id> |
Pipeline stuck initializing | YAML error | sem-ai yaml validate --file .semaphore/semaphore.yml |
result_reason: "stuck" | No agent available | sem-ai agent types |
| All blocks empty | Compile failed | sem-ai troubleshoot pipeline <id> |
cache errors | Cache not configured | Environment issue, not code |