likec4-gh-pr-triage
GitHub利用gh CLI和git查询LikeC4项目PR状态、审查意见、关联Issue及提及,提供合并就绪性分析。仅在明确要求时执行标记或添加评论等操作,保障本地文件安全。
Trigger Scenarios
Install
npx skills add likec4/likec4 --skill likec4-gh-pr-triage -g -y
SKILL.md
Frontmatter
{
"name": "likec4-gh-pr-triage",
"description": "Use when checking LikeC4 GitHub issues, mentions, PR status, review comments, CodeRabbit feedback, reviewer requests, or terse status follow-ups with `gh`."
}
LikeC4 GitHub PR Triage
Use gh and local git as the source of truth. Browser automation is a fallback only when explicitly requested or gh cannot answer.
Ground rules
- Re-check live state before reporting readiness, mergeability, reviews, or comments.
- Keep
statusreplies compact: PR number, checks, review state, blocker. - Do not post comments, mark ready, request reviewers, close issues, or merge unless the user explicitly asks.
- Preserve unrelated local files. In mixed worktrees, stage explicit paths only.
Identify the active PR
git status -sb
git branch --show-current
gh pr view "$(git branch --show-current)" --repo likec4/likec4 \
--json number,title,url,headRefName,baseRefName,state,isDraft,reviewDecision,mergeStateStatus,reviewRequests
If the current branch has no PR, ask whether to inspect a specific PR number or create one.
Check assigned issues and mentions
Set the target login from the request or live GitHub context. Do not hard-code personal usernames.
GITHUB_LOGIN='REPLACE_WITH_GITHUB_LOGIN'
REPO=likec4/likec4
gh api -X GET search/issues --paginate \
--raw-field q="repo:${REPO} is:issue assignee:${GITHUB_LOGIN}" \
--raw-field per_page=100
gh api -X GET search/issues --paginate \
--raw-field q="repo:${REPO} is:issue mentions:${GITHUB_LOGIN}" \
--raw-field per_page=100
gh api -X GET search/issues --paginate \
--raw-field q="repo:${REPO} is:issue is:open mentions:${GITHUB_LOGIN}" \
--raw-field per_page=100
Use gh api 'notifications?...' only for the authenticated user; notifications do not answer arbitrary-login mention searches.
For exact context:
gh issue view ISSUE --repo likec4/likec4 --comments
gh api repos/likec4/likec4/issues/ISSUE/timeline --paginate
Search issue bodies, comments, and timeline entries for exact mention locations.
Check PR health
gh pr view PR --repo likec4/likec4 \
--json number,title,url,isDraft,reviewDecision,mergeStateStatus,reviewRequests,statusCheckRollup,latestReviews
gh pr checks PR --repo likec4/likec4 --watch=false
REVIEW_REQUIRED means human review still blocks. BLOCKED with green checks usually means required review or branch protection.
Check review comments
gh pr view PR --repo likec4/likec4 --comments
gh api repos/likec4/likec4/pulls/PR/comments --paginate
Filter by reviewer or bot only after resolving the current login from PR comments or review metadata.
If counts disagree with GitHub UI, inspect review threads with GraphQL; resolved/outdated line comments may not show in simple comment views.
Common requested actions
- Trigger CodeRabbit only when requested by posting a PR comment such as
@coderabbitai review. - Mark ready only when requested and after checking branch state and validation.
- Add reviewers only when requested, for example:
gh pr edit PR --repo likec4/likec4 --add-reviewer REVIEWER_LOGIN
Reporting format
For status:
PR #NNNN: checks pass/fail, review state, merge state. Open blocker: ...
For comment triage:
Open comments:
- reviewer: actionable summary, file/path if known
No action needed:
- reviewer: reason
For mention triage:
LOGIN is mentioned in <total> issue(s); <open_count> remain open.
- #NNNN <title> — mentioned in <body/comment/timeline>; current action/blocker; URL
Version History
- 84ff665 Current 2026-08-20 13:06


