| name | pipeline-diagnostics |
| description | GitHub Actions CI/CD diagnostics — workflow run analysis, job/step failure identification, and remediation patterns. USE FOR: diagnose pipeline, workflow failure, build error, deploy failure, GitHub Actions troubleshooting, CI/CD debug. DO NOT USE FOR: test analysis (use test-coverage), Kubernetes operations (use kubectl-cli), Helm charts (use helm-cli). |
Pipeline Diagnostics Skill
Domain knowledge for CI/CD diagnostics via GitHub Actions API.
GitHub Actions API Reference
Workflow Runs
gh run list --repo {owner}/{repo} --limit 10
gh run list --repo {owner}/{repo} --status failure --limit 5
gh run view {run_id} --repo {owner}/{repo}
gh run view {run_id} --repo {owner}/{repo} --log-failed
gh run rerun {run_id} --repo {owner}/{repo} --failed
REST API Endpoints
| Endpoint | Method | Description |
|---|
/repos/{owner}/{repo}/actions/runs | GET | List workflow runs |
/repos/{owner}/{repo}/actions/runs/{id} | GET | Get specific run |
/repos/{owner}/{repo}/actions/runs/{id}/jobs | GET | Get jobs for a run |
/repos/{owner}/{repo}/actions/runs/{id}/logs | GET | Download run logs |
Run Status Values
| Status | Meaning |
|---|
queued | Run is waiting to be picked up |
in_progress | Run is currently executing |
completed | Run has finished (check conclusion) |
Run Conclusion Values
| Conclusion | Meaning | Action |
|---|
success | All jobs passed | No action needed |
failure | One or more jobs failed | Investigate failed steps |
cancelled | Run was cancelled | Check if manual or timeout |
skipped | Run was skipped (path filter, condition) | Review trigger conditions |
timed_out | Run exceeded time limit | Optimize or increase timeout |
Common Failure Patterns
1. Dependency Install Failures
Symptoms: npm ci, yarn install, or pip install step fails
Causes: Lock file out of sync, registry down, version conflicts
Remediation:
- Check if
package-lock.json / yarn.lock is committed
- Compare lock file with
package.json versions
- Check npm/PyPI registry status
- Clear caches and re-run
2. Build/Compile Errors
Symptoms: tsc, go build, dotnet build step fails
Causes: Type errors, missing imports, breaking API changes
Remediation:
- Read the error message from the failed step output
- Identify the file and line number
- Suggest specific code fix
- Recommend running build locally first
3. Test Failures
Symptoms: jest, pytest, go test step fails
Causes: Flaky tests, environment differences, assertion failures
Remediation:
- Identify which tests failed
- Use the
test-coverage skill for detailed test analysis
- Check if tests pass locally
4. Docker Build Failures
Symptoms: docker build or docker push step fails
Causes: Missing base image, COPY source not found, registry auth
Remediation:
- Check Dockerfile COPY paths match repo structure
- Verify base image exists and tag is valid
- Check registry credentials in secrets
5. Deployment Failures
Symptoms: kubectl apply, helm upgrade, or az webapp deploy fails
Causes: Cluster unreachable, image pull error, resource limits
Remediation:
- Check cluster connectivity (credentials, RBAC)
- Verify image exists in registry
- Check resource quotas and limits
Output Template
## 🔍 Pipeline Diagnosis
**Repository:** {owner}/{repo}
**Workflow:** {workflow_name}
**Run:** #{run_number} ({run_id})
**Branch:** {branch} | **Event:** {event} | **Status:** {conclusion}
### Failed Jobs
| Job | Step | Status | Duration |
|-----|------|--------|----------|
| {job_name} | {step_name} | ❌ {conclusion} | {duration} |
### Root Cause
{analysis}
### Remediation Steps
1. {step_1}
2. {step_2}
3. {step_3}
### Recommended Handoff
- {handoff_recommendation}
Quality Checklist