AgentSkillsCN

ci

查看当前Git分支的CI状态,浏览工作流运行记录,并检查日志信息。当用户输入/ci,或询问CI状态、构建进度、工作流运行情况,以及GitHub Actions的相关信息时,这一工具将为您提供有力支持。

SKILL.md
--- frontmatter
name: ci
description: Check CI status, view workflow runs, and inspect logs for the current git branch. Use when user types /ci or asks about CI, build status, workflow runs, or GitHub Actions.
allowed-tools: Bash

CI Status Interaction

Interact with GitHub Actions CI for the current branch using the gh CLI.

Instructions

  1. Get current branch: git branch --show-current

  2. Based on user request, run the appropriate command:

ActionCommand
Check CI statusgh run list --branch <branch> --limit 5
View latest run detailsgh run view --branch <branch>
View specific rungh run view <run-id>
View failed jobsgh run view <run-id> --log-failed
View full logsgh run view <run-id> --log
Watch run in progressgh run watch
Re-run failed jobsgh run rerun <run-id> --failed
Re-run entire workflowgh run rerun <run-id>
List workflowsgh workflow list
  1. Default behavior (when user just types /ci):

    • Get current branch
    • Run gh run list --branch <branch> --limit 5 to show recent runs
    • If there's a failing or in-progress run, show details with gh run view
  2. For failures: Automatically fetch failed job logs with --log-failed to help diagnose issues.

Examples

  • /ci -> Show CI status for current branch
  • /ci logs -> Show logs for the latest run
  • /ci rerun -> Re-run failed jobs from the latest run
  • /ci watch -> Watch the current run in progress