Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计提醒

pr公关

Agent Skill

pr 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

238

周安装

10

GitHub Stars

公开资料未说明

下载量

83
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pr(公关)
来源仓库:https://github.com/bonkey/skills
仓库路径:skills/pr
安装命令:
npx skills add https://github.com/bonkey/skills --skill pr
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bonkey/skills --skill pr

简介

pr 用于创建、更新和管理 GitHub Pull Request,支持自动生成描述、添加评审人、标签等元数据。

  • 可结合用户意图自动路由操作,如合并、关闭、检查状态,提升协作效率。
  • 使用时需提供清晰的操作指令(如 /pr close)或上下文信息以生成准确描述。
  • 安装前需确认 GitHub CLI 已配置且具备相应仓库权限,避免越权操作。
  • pr 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

PR

Create, update, and manage pull requests with auto-generated descriptions.

Action Routing

Operations are combinable. If the user includes reviewers, labels, or other metadata alongside a create/update intent, create the PR first if needed, then apply the operations.

User saysAction
/pr (no text)Create or update PR (web interface)
/pr this fixes the timeout bugSame, with added context for description
/pr against release/v2.xPR against specified base branch
/pr closegh pr close --delete-branch
/pr mergegh pr merge --squash --delete-branch
/pr checksgh pr checks
/pr statusgh pr view
/pr reviewers alice bobCreate PR if needed, then add reviewers
/pr labels bug fixCreate PR if needed, then add labels
/pr webgh pr view --web
/pr updatePush + regenerate description
/pr rebasegh pr update-branch
/pr context info, reviewers: alice, bobCreate PR with context, then add reviewers
/pr only swift filesRestrict diff to matching paths
/pr ignore testsDrop matching paths from diff
/pr publish / /pr commit and pushAuto-commit unstaged changes, then push

If intent is unclear, ask.

Path filters

Users can scope the diff with include/exclude glob patterns. Translate natural language ("only swift", "ignore generated files") into git pathspecs:

  • Include → *<pattern> (e.g., *.swift)
  • Exclude → :!*<pattern> (e.g., :!*_test.go)

Append them to every git diff / git log invocation in Step 1 after a -- separator. Mention active filters in the Step 2 summary so the user can confirm.

Core Workflow (Create / Update)

Step 1 — Gather Context

Run these in parallel:

Detect base branch (in order, stop at first match):

  1. User-specified base from input
  2. Existing PR's base branch (if updating)
  3. Git history — git symbolic-ref refs/remotes/origin/HEAD to get remote default, or git config init.defaultBranch
  4. Last fallback: gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'

Then compute the merge base: git merge-base HEAD <detected-base>

Diff and log:

git diff --stat <base>...HEAD
git log --oneline <base>..HEAD

Detect existing PR:

gh pr list --head "$(git branch --show-current)" --state open --json number,url,title,isDraft,body,baseRefName --jq '.[0]'

This also fetches the existing description and base branch.

Other context:

  • Branch name → extract ticket IDs matching (?:^|[/_-])([A-Z]{3,}[A-Z0-9_]*-\d+). Deduplicate, sort, join with ,.
  • Repo template detection (first match wins):

1. .github/pull_request_template.md 2. .github/PULL_REQUEST_TEMPLATE/ (directory — pick the most relevant file) 3. .gitlab/pull_request_template.md 4. .gitlab/merge_request_templates/ (directory)

  • Working tree state → git status --porcelain to detect uncommitted/unpushed changes (surface in Step 2).

Step 2 — Summarize and Confirm

Print a summary before acting:

  • Commits: N commits, N files changed, +N/-N lines
  • Tickets: PROJ-123 (or "none detected")
  • Template: repo template / default / minimal (and *why* — see auto-selection below)
  • Filters: include=*.swift, exclude=*_test.go (omit line if none)
  • Action: Create new PR against <base> or Update PR #42
  • Branch: pushed / needs push / N uncommitted files / N commits ahead of remote

If there are uncommitted or unpushed changes, call them out explicitly and list the files (up to ~10). Ask the user whether to:

  1. Stop and let them handle it manually, or
  2. Auto-commit + push (only if the user already said /pr publish or similar, or confirms it now).

Then ask: "Proceed?"

Step 3 — Generate Description

Rules for writing

  • Follow any user-provided context verbatim.
  • Focus only on important changes. Skip comments, formatting, year bumps, typos.
  • A PR may contain multiple issues — describe them all, weighted by importance.
  • Technical but clear language. Short sentences, prefer bullet points.
  • No line-by-line analysis — high-level descriptions only.
  • Never deviate from the template structure.
  • Use commit messages for intent/context when the diff is ambiguous.
  • Title: concise, 5–10 words, under 72 chars.
  • No yapping.

Template selection (priority order)

  1. Explicit override — user said something like "use the minimal template" / "use default" / "use the repo template".
  2. Auto-classify by change importance (default when no override): Judge importance from the diff + commit messages. State the chosen template and the reasoning in the Step 2 summary.

- minimal — typo fixes, formatting, comments, tiny one-line bug fixes (< ~20 lines, 1–2 files). - default (built-in) — refactors, dependency bumps, moderate bug fixes. - detected — repo template from Step 1, used for significant changes, new features, breaking changes.

  1. Fallback — built-in assets/default-template.md.

Built-in templates live in assets/default-template.md and assets/minimal-template.md.

Title

  • Generate a concise title (5–10 words) summarizing the main change.
  • Prefix with ticket IDs if found in the branch name: PROJ-123: <title> (or PROJ-123,PROJ-456: <title> for multiple). Skip prefix only when no tickets were detected.
  • When updating an existing PR, keep the existing title unless the user asks to regenerate it.

Body

  • Focus on *why* not *what*.
  • Group changes by area.
  • Flag breaking changes explicitly.
  • Strip any <!-- GenAI... --> comments from the output.

For updates: always read the existing PR description first (fetched in Step 1). Preserve any user-added context, notes, or sections. Only remove content that is clearly irrelevant to the current diff (e.g., describes files/changes that no longer exist). Regenerate the auto-generated portions from the current diff.

Large diffs (>500 lines): use --stat first, selectively read the most relevant file diffs, summarize the rest from stat output.

Step 4 — Execute

  1. Auto-commit (if requested) — when the user opted into publish:

- Stage only the relevant files by name (avoid blanket git add -A; never stage .env, credentials, or large binaries). - Generate a short conventional-commit-style message (feat:, fix:, docs: …) under 72 chars from the staged diff. - Commit, then proceed.

  1. Push branch if needed: git push -u origin HEAD
  2. Create or update:

- New PR: gh pr create --webONLY open the browser. Do NOT pass --title or --body to gh pr create; those flags cause CLI creation. Print the generated title and body to the console for the user to paste in the browser. Use gh pr create --title "..." --body "..." only if the user explicitly asks for CLI creation. - Existing PR: gh pr edit --title "..." --body "..."

  1. Apply any combined operations (reviewers, labels) from the user's input

Reviewers: before adding, check availability via gh api:

gh api repos/{owner}/{repo}/collaborators --jq '.[].login'

Warn if a requested reviewer is not a collaborator.

Troubleshooting

  • No gh auth: run gh auth login
  • Detached HEAD: check out a branch first
  • No upstream remote: git remote add origin <url>
  • Push rejected: branch may need rebase — suggest git pull --rebase origin <base>

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.36%
按下载量换算29

Claude

32.23%
按下载量换算27

Cursor

20.41%
按下载量换算17

Gemini CLI

9.49%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills