بنقرة واحدة
ci-health-check
Check CI/CD workflow status and troubleshoot failing checks in GitHub Actions
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Check CI/CD workflow status and troubleshoot failing checks in GitHub Actions
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Conduct thorough code reviews for pull requests and pre-commit changes
Run comprehensive project health checks including code quality, documentation, git status, and project structure
Initialize .docent/ directory structure and configuration for a new project
Comprehensive guide for AI agents on proactive documentation capture using /docent:tell
Migrate a docent v0.9 project to v1.0 skills-based architecture
Review journal entries and extract valuable knowledge into formal documentation
| name | ci-health-check |
| description | Check CI/CD workflow status and troubleshoot failing checks in GitHub Actions |
| group | devops |
| keywords | ["ci-cd","github-actions","troubleshooting","workflows","ci","cd","continuous integration"] |
| version | 1.0.0 |
| author | docent |
This runbook provides procedures for checking the health of CI/CD pipelines running on GitHub Actions. Use this runbook to:
Expected duration: 5-10 minutes for status check; additional time for troubleshooting
gh CLI (GitHub CLI) - installed and authenticatedgit command line toolBefore starting, ensure:
gh CLI installed (gh --version)gh auth status)Purpose: Get a quick overview of all workflow runs
Commands:
# Check status of recent workflow runs
gh run list --limit 10
# Check status for a specific branch
gh run list --branch main --limit 10
# Check status for current PR (if in a branch)
gh run list --branch $(git branch --show-current) --limit 5
Validation:
If step fails:
gh CLI is authenticated: gh auth statusgit statusPurpose: Identify which specific jobs failed in a workflow run
Commands:
# View the most recent failed run
gh run view $(gh run list --status failure --limit 1 --json databaseId --jq '.[0].databaseId')
# View a specific run by ID
gh run view <RUN_ID>
# Watch a run in progress
gh run watch
Validation:
If step fails:
gh run list --limit 20Purpose: Get detailed logs to understand why a job failed
Commands:
# View logs for the most recent failed run
gh run view $(gh run list --status failure --limit 1 --json databaseId --jq '.[0].databaseId') --log
# View logs for a specific failed job
gh run view <RUN_ID> --log-failed
# Download all logs for offline analysis
gh run download <RUN_ID> --dir ./ci-logs
Validation:
If step fails:
--log > output.log to save to filePurpose: Focus on a specific workflow (Test or Lint)
Commands:
# List runs for test workflow
gh run list --workflow=ci.yml --limit 10
# List runs for lint workflow
gh run list --workflow=lint.yml --limit 10
# View status of both workflows for current branch
gh run list --workflow=ci.yml --branch $(git branch --show-current)
gh run list --workflow=lint.yml --branch $(git branch --show-current)
Validation:
If step fails:
ls .github/workflows/Purpose: Retry failed workflows after fixing issues or if failure was transient
Commands:
# Re-run the most recent failed workflow
gh run rerun $(gh run list --status failure --limit 1 --json databaseId --jq '.[0].databaseId')
# Re-run only failed jobs
gh run rerun $(gh run list --status failure --limit 1 --json databaseId --jq '.[0].databaseId') --failed
# Watch the re-run
gh run watch
Validation:
gh run listgh run watchIf step fails:
After completing all steps, verify:
Overall Health:
gh run list --limit 5
Expected result: Recent runs show ✓ (completed) status
Both Workflows Passing:
gh run list --workflow=ci.yml --status success --limit 1
gh run list --workflow=lint.yml --status success --limit 1
Expected result: Both workflows have recent successful runs
Current Branch Status:
gh run list --branch $(git branch --show-current)
Expected result: Latest runs on current branch are successful
Symptoms:
Resolution:
# View the specific test failure
gh run view --log-failed
# Run tests locally to reproduce
npm test
# Common fixes:
# 1. Check if TypeScript compilation works
npm run build
# 2. Verify all test files are valid
npm test -- --reporter spec
Symptoms:
./scripts or ./test have issuesResolution:
# View the specific shellcheck errors
gh run view --log-failed | grep -A 5 "ShellCheck"
# Install shellcheck (see Contributing Guide for other platforms)
brew install shellcheck # macOS
# Run shellcheck locally
shellcheck ./scripts/*.sh ./test/*.sh
# Fix common issues:
# - Quote variables: "$var" instead of $var
# - Check for undefined variables
# - Fix array handling
# - Address exit code handling
# See Contributing Guide for detailed setup and troubleshooting
Symptoms:
*.md filesResolution:
# View the specific markdown errors
gh run view --log-failed | grep -A 10 "Markdown Lint"
# Install project dependencies (includes markdownlint-cli2)
npm install
# Run markdown lint locally
npx markdownlint-cli2 "**/*.md" "!node_modules"
# Common fixes:
# - Fix line length (MD013) - keep lines under 80 characters
# - Add blank lines around headers and lists (MD022, MD031, MD032)
# - Fix trailing spaces (MD009)
# - Consistent list styling (MD004, MD007)
# - Add language specifiers to code blocks (MD040)
# See Contributing Guide for more details on fixing markdown issues
Symptoms:
Resolution:
# View logs for specific OS
gh run view <RUN_ID> --log | grep -A 20 "Test on macos-latest"
gh run view <RUN_ID> --log | grep -A 20 "Test on ubuntu-latest"
# Common issues:
# - Path differences (/tmp vs /private/tmp on macOS)
# - Command availability (brew vs apt)
# - File permission differences
# - Line ending differences (CRLF vs LF)
# Test locally on both platforms if possible:
npm test
npm run build
Symptoms:
Resolution:
# Check workflow configuration
cat .github/workflows/ci.yml | grep -A 5 "on:"
cat .github/workflows/lint.yml | grep -A 5 "on:"
# Verify branch is configured to trigger workflows
gh run list --branch $(git branch --show-current) --limit 5
# Common causes:
# - Branch not pushed to remote: git push origin $(git branch --show-current)
# - Workflow only runs on main/specific branches
# - Workflow file has syntax errors
# - Repository settings disabled Actions
Escalate if:
Escalation Contact:
After completion:
# Quick health check
gh run list --limit 5
# View latest failure
gh run view $(gh run list --status failure --limit 1 --json databaseId --jq '.[0].databaseId') --log-failed
# Re-run failed jobs
gh run rerun $(gh run list --status failure --limit 1 --json databaseId --jq '.[0].databaseId') --failed
# Watch current run
gh run watch
# Test locally (see Contributing Guide for setup)
./test/test-install.sh
shellcheck ./scripts/*.sh ./test/*.sh
npx markdownlint-cli2 "**/*.md"
Important Notes:
Gotchas:
/tmp vs /private/tmp pathsRelated Procedures:
| Date | Author | Changes |
|---|---|---|
| 2025-10-14 | @tnez | Initial creation |