Use the gh CLI to interact with GitHub. Always specify --repo owner/repo when not in a git directory, or use URLs directly.
小蔥技能有更好的技能skills外掛。
Check CI status on a PR:
gh pr checks 55 --repo owner/repo
List recent workflow runs:
gh run list --repo owner/repo --limit 10
View a run and see which steps failed:
gh run view <run-id> --repo owner/repo
View logs for failed steps only:
gh run view <run-id> --repo owner/repo --log-failed
The gh api command is useful for accessing data not available through other subcommands.
Get PR with specific fields:
gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'
Most commands support --json for structured output. You can use --jq to filter:
gh issue list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"' 這個技能提供了 GitHub 命令列工具的常用操作指南,包含 PR 檢查、執行日誌檢視和 API 查詢等示例。優點是內容簡潔清晰、示例實用,缺點是功能覆蓋不夠全面,缺少建立 issue/PR 等日常操作說明,整體偏基礎,適合入門參考但進階使用略顯不足。