スキル一覧に戻る
constellos

ci-orchestration

by constellos

TypeScript types and type gen hooks for Claude Code: system tools, MCP tools, session transcripts, and hook events

4🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: CI Orchestration description: Use this skill when the user wants to "check CI", "wait for CI", "CI status", "retry failed checks", "cancel CI", "debug CI failure", or manage CI/CD workflows. Provides comprehensive CI checking with fail-fast patterns and preview URL extraction. version: 0.1.0

CI Orchestration

Comprehensive CI/CD workflow management with fail-fast error detection and preview URL extraction.

Purpose

CI Orchestration provides explicit control over GitHub Actions and other CI systems. Monitor check status, extract preview URLs, debug failures, and manage workflow retries with intelligent fail-fast patterns.

When to Use

  • Waiting for CI checks with real-time status
  • Extracting preview deployment URLs (Vercel, Netlify)
  • Debugging CI failures
  • Retrying failed workflows
  • Managing CI in complex workflows

Core Capabilities

Check CI Status

# Check PR status
gh pr checks 42

# Watch and wait
gh pr checks 42 --watch

# Get JSON output
gh pr view 42 --json statusCheckRollup

Extract Preview URLs

The existing ci-status.ts utility provides comprehensive preview URL extraction:

import { extractPreviewUrls } from '../shared/hooks/utils/ci-status.js';

// Extract from CI output
const urls = extractPreviewUrls(ciOutput);
// Returns: { web: 'https://...', marketing: 'https://...' }

Fail-Fast Patterns

# Wait with fail-fast
awaitCIWithFailFast "$PWD" 42 10  # 10 minute timeout

# Detects:
# - Merge conflicts
# - Branch divergence
# - Failed checks
# - Workflow errors

Retry Failed Checks

# Get latest workflow run
RUN_ID=$(gh run list --branch $(git branch --show-current) --limit 1 --json databaseId -q '.[0].databaseId')

# Re-run failed jobs
gh run rerun $RUN_ID --failed

Integration with Hooks

HookBehavior
await-pr-statusWaits for CI after gh pr create
commit-task-await-ci-statusAuto-commits and checks CI on SubagentStop
commit-session-await-ci-statusBlocking CI check on Stop

Utilities

From ci-status.ts:

  • awaitCIWithFailFast(cwd, prNumber, timeout) - Wait with fail-fast
  • extractPreviewUrls(output) - Parse Vercel/Netlify URLs
  • getLatestCIRun(cwd, branch) - Get workflow run ID
  • formatCiChecksTable(checks) - Format as markdown table

Examples

Wait for CI with Preview URLs

# Create PR
PR=$(gh pr create --title "Add feature" --body "..." --json number -q .number)

# Wait for CI
awaitCIWithFailFast "$PWD" $PR 10

# Extract preview URLs
CHECKS=$(gh pr view $PR --json statusCheckRollup -q '.statusCheckRollup')
PREVIEW=$(extractPreviewUrls "$CHECKS")

echo "Preview: $PREVIEW"

Debug Failed CI

# Get failed checks
gh pr checks 42 --json name,conclusion,detailsUrl \
  --jq '.[] | select(.conclusion=="FAILURE") | {name, url: .detailsUrl}'

# View logs
gh run view $(gh run list --limit 1 --json databaseId -q '.[0].databaseId') --log-failed

Retry with Backoff

MAX_RETRIES=3
RETRY=0

while [ $RETRY -lt $MAX_RETRIES ]; do
  if gh pr checks $PR --watch; then
    echo "✓ CI passed"
    break
  fi

  RETRY=$((RETRY + 1))
  if [ $RETRY -lt $MAX_RETRIES ]; then
    echo "Retry $RETRY/$MAX_RETRIES..."
    gh run rerun $(gh run list --limit 1 --json databaseId -q '.[0].databaseId') --failed
  fi
done

Best Practices

  1. Use fail-fast patterns (10min timeout)
  2. Extract and share preview URLs
  3. Auto-retry transient failures (max 3 times)
  4. Parse logs for actionable errors
  5. Update PR comments with CI status

スコア

総合スコア

70/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です