跳到正文
cccskills
免费在 GitHub 公开

pr-approve

Approve a GitHub pull request, inferring the target from context when no PR is given. Use when the user invokes `$pr-approve`, asks to approve a PR, or approves a pull request mentioned earlier in the conversation.

中文简介正在准备中。当前显示原文说明。

集成工具GitHub
查看安装方法

包含的文件(2)

  • SKILL.md2.9 KB
  • agents/openai.yaml259 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

pr-approve

Approve a GitHub pull request via gh pr review --approve.

Workflow

1. Resolve the target PR

If a PR number, #1234, or URL was given directly, strip a leading # and use it as the sole candidate — skip inference.

Otherwise, gather candidates from context:

  • Current branch's PR:
    gh pr view --json number --jq .number 2>/dev/null
    
  • Conversation context: scan the current session for PR references — #<number>, pull/<number> paths, or full github.com/.../pull/<number> URLs mentioned by the user or in prior output.

Deduplicate the results.

  • Zero candidates → ask directly: "Which PR would you like to approve? (number or URL)"
  • One candidate → continue to step 2.
  • Multiple candidates → continue to step 2, fetch metadata for all of them, and let the user choose in step 3.

2. Fetch metadata for each candidate

gh pr view <number> --json number,url,title,state,isDraft,mergedAt,headRefName,baseRefName,author,reviewDecision,reviews,reviewRequests,statusCheckRollup

Get the authenticated user's login once:

gh api user --jq .login

Derive per PR:

  • Lifecycle state: merged if mergedAt is set, else closed if state == "CLOSED", else open.
  • My approval status, in priority order: an existing review from the authenticated login (approved by you / changes requested by you); else being in reviewRequests[] (waiting on your review); else reviewDecision == "APPROVED" (approved by others); else not requested.
  • Checks status from statusCheckRollup[], priority order: any failing conclusion → failing; any in-progress/queued status → running; any cancelled conclusion → cancelled; all success → passing; empty rollup → waiting.

3. Confirm

Single candidate — show the card and ask for a yes/no:

#<number> <title>
<state> · <my approval status> · <headRefName> → <baseRefName> · @<author> · checks <checks status>
<url>

Approve this PR?

Multiple candidates — present each as #<number> <title> with the same detail line, and ask the user to pick one or more (multi-select). That selection is itself the confirmation — don't ask again.

If the user declines or picks nothing, stop without approving anything.

4. Approve

For each confirmed PR:

gh pr review <number> --approve

If gh refuses (self-authored PR, already approved, etc.), report that specific failure and continue with the rest.

5. Report

✅ Approved PR #<number>
<pr_url>

Report any failures separately with their reason instead of a ✅ line.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

2ndbrain

免费

Quick-save the last assistant response as a verbatim note in the 2ndBrain Obsidian vault (~/2ndBrain/quick-notes/<year>/). Use when the user asks to quick-save/save the last response to 2ndBrain, or invokes $2ndbrain or /skill:2ndbrain.

中文简介正在准备中。当前显示原文说明。

phatblat/dotfiles122026年10月20日 更新

Write commit messages under the agent-commits convention - a Conventional Commits fork with no chore catch-all, intent-only type tokens, facts in trailers, and legally-grounded AI provenance (Assisted-by, never Co-authored-by). Use when composing a commit in a repo whose commitlint.config.js extends agent-commits, when deciding between feat/fix/refactor/perf, or when recording AI participation.

中文简介正在准备中。当前显示原文说明。

phatblat/dotfiles122026年10月20日 更新

Coordinate multi-agent work through durable artifacts in git instead of chat. Use this whenever a task involves sending a message to another agent, agent mailboxes or handoffs, claiming work from a shared queue, notifying another agent or crew (OpenClaw, Grok Bot, Claude Code, Codex, Gas Town/Gas City workers) that work is ready, or whenever the user mentions the artifact bus, message bus, agent mail, beads mail, doorbells, or pings between agents — even if they don't say "bus" explicitly.

中文简介正在准备中。当前显示原文说明。

phatblat/dotfiles122026年10月20日 更新

aven

免费

Use aven to find tasks, update status, and leave durable handoff context.

中文简介正在准备中。当前显示原文说明。

phatblat/dotfiles122026年10月20日 更新

Plan, order and deliver a batch of backlog items (e.g. every High item) in a Conventional Docs repo, one decision, branch, worktree, draft PR, review and merge per item. Use when asked to work through the backlog, implement all items of a priority, or sequence several backlog items end to end.

中文简介正在准备中。当前显示原文说明。

phatblat/dotfiles122026年10月20日 更新

boris

免费

Codex workflow tips from Boris Cherny and the Codex team. Use when setting up Codex or optimizing workflows: parallel sessions, worktrees, plan mode, AGENTS.md, skills, subagents, hooks, MCP, permissions, and sandboxing.

中文简介正在准备中。当前显示原文说明。

phatblat/dotfiles122026年10月20日 更新

查看 phatblat 的全部技能

报告此技能的问题