AgentSkillsCN

review-all-prs

批量审核开放的 MR。不包括您自己的 MR。对于他人提交的每一条 MR:如果您已提供反馈且作者已予以回应 → 批准;若无任何回应 → 跳过;若已回复但问题仍未解决 → 进行跟进;若此前从未进行过评审 → 完整评审。适用于晨间批量评审或当日结束时的 PR 分类处理。

SKILL.md
--- frontmatter
name: review-all-prs
description: Batch review of open MRs. Excludes your own MRs. For each MR by others: if you gave feedback and author addressed it → approve; if no response → skip; if responded but issues remain → follow-up; if no prior review → full review. Use for morning review batch or end-of-day PR triage.

Review All PRs

Batch review open MRs with intelligent follow-up.

Inputs

InputTypeDefaultPurpose
projectstring-GitLab project (resolved from repo_name/cwd)
repo_namestring-Config repo name
reviewerstring-Filter by reviewer
limitint10Max MRs to process
dry_runboolfalseShow actions without taking them
include_my_mrsbooltrueShow your MRs with feedback
auto_rebasebooltrueAuto-rebase your MRs with conflicts
slack_formatboolfalseSlack link format

Workflow

1. Load Persona

  • persona_load("developer")

2. Check Known Issues

  • check_known_issues("gitlab_mr_list", "")

3. Resolve Project

  • project → repo_name → cwd → session → default automation-analytics/automation-analytics-backend

4. Get Username

  • config.user.gitlab_username or config.user.username or USER

5. List Open MRs

  • gitlab_mr_list(project, state="opened")
  • Parse with parse_mr_list, separate_mrs_by_author → to_review vs my_mrs

6. Check My MRs for Conflicts

  • gitlab_mr_view(project, mr_id) for first of my_mrs
  • analyze_mr_status → has_conflicts, needs_rebase
  • If needs_rebase and auto_rebase: skill_run("rebase_pr", '{"mr_id": X}')
  • persona_load("developer") — restore after rebase

7. Process Each MR (to_review)

  • For first MR: gitlab_mr_view(project, mr_id)
  • analyze_mr_status, analyze_review_status, extract_author_from_mr
  • Exclude own MRs (check author vs my_identities)
  • Actions: can_approve | needs_full_review | needs_followup | skip

8. Take Action (if not dry_run)

  • needs_full_review: skill_run("review_pr", '{"mr_id": X}') then persona_load("developer")
  • can_approve: gitlab_mr_approve(project, mr_id)
  • needs_followup: gitlab_mr_comment(project, mr_id, message="Follow-up Review...")

9. Build Summary

  • Approved / Full Review / Follow-up / Skipped
  • Your Open MRs (with rebase status)
  • Remaining MRs count

10. Memory

  • memory_session_log("Batch reviewed {total} MRs", "Approved: X, Feedback: Y")
  • Update learned/teammate_preferences with reviews per author

11. Learn from Failures

  • VPN: learn_tool_fix("gitlab_mr_list", "no such host", "VPN", "vpn_connect()")

MCP Tools

  • persona_load
  • check_known_issues
  • gitlab_mr_list
  • gitlab_mr_view
  • gitlab_mr_approve
  • gitlab_mr_comment
  • skill_run (rebase_pr, review_pr)
  • memory_session_log
  • memory_update (teammate_preferences)
  • learn_tool_fix

Output

  • Batch PR Review Summary
  • Project, user, MRs to review, my MRs
  • By category: Approved, Full Review, Follow-up, Skipped
  • Your MRs with rebase status
  • Quick actions: review next batch, review specific MR