Token导航 LogoToken导航TokenDH.com
待分类权限需确认github未标认证来源可访问许可证需确认审计未展示

git-prgit 公关

Agent Skill

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

总安装

186

周安装

8

GitHub Stars

28

下载量

65
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/laurigates/claude-plugins --skill git-pr

简介

git-pr 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中管理发布相关流程。

  • 适用于版本发布、变更提交流程或协作事项跟踪场景。
  • 通过安装命令从指定仓库添加,具体功能需参考原始文档。
  • 使用前应确认权限与维护状态,防范写入操作带来的风险。
  • git-pr 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

created
2026-01-21
modified
2026-04-29
reviewed
2026-04-29
name
git-pr
description
|
user-invocable
false
allowed-tools
Bash(git status *), Bash(git diff *), Bash(git log *), Bash(git branch *), Bash(git remote *), Bash(git push *), Bash(git fetch *), Bash(git rev-list *), Bash(gh pr *), Bash(gh issue *), Bash(gh repo *), Read, Grep, Glob, TodoWrite

Git PR

Create pull requests with comprehensive descriptions and proper issue linkage.

When to Use This Skill

Use this skill when...Use the alternative when...
Opening a PR from a pushed branch with description, labels, and issue refsUse github-pr-title if you only need to author or fix the conventional title
Selecting a base branch, draft mode, or reviewers as part of PR creationUse git-push first if the branch has not been pushed to remote yet
Going from a pushed branch to an open pull requestUse git-commit first if there are uncommitted changes locally
Inserting Fixes #N / Closes #N issue references into the PR bodyUse git-commit-push-pr for the consolidated commit + push + PR macro

PR Description Format

Standard Template

## Summary
Brief description of what this PR does.

## Motivation
Why this change is needed. Link to issue if applicable.

## Changes
- Key change 1
- Key change 2
- Key change 3

## Pre-merge Checklist
- [ ] Tests pass locally
- [ ] Code reviewed
- [ ] Documentation updated (if needed)

## Follow-up Issues
<!-- Post-merge actions tracked as separate issues so they survive PR closure -->
- Closes #456 after merge: database migration for new schema
- Refs #457: update deployment runbook

## Related Issues
Fixes #123
Related: #124, #125

Section Guidelines

SectionPurposeRequired
SummaryWhat the PR does (1-2 sentences)Yes
MotivationWhy this change is neededYes
ChangesKey changes as bullet pointsYes
Pre-merge ChecklistActions before merge only — never post-merge stepsIf applicable
Follow-up IssuesLinks to issues tracking post-merge actionsIf post-merge work exists
Related IssuesIssue links at bottomYes

Issue Linking Syntax

Place at the bottom of the PR description:

## Related Issues
Fixes #123              <!-- Auto-closes on merge -->
Closes #456             <!-- Auto-closes on merge -->
Resolves #789           <!-- Auto-closes on merge -->
Related: #124, #125     <!-- Links without closing -->

Rules:

  • Use Fixes, Closes, or Resolves for issues this PR solves
  • Use Related: for issues that are related but not solved
  • Follow-up work should be created as new issues, not left in checklist

Workflow

Before creating the PR, check whether any post-merge follow-up actions are needed (migrations, deployments, config changes, runbook updates). Create a GitHub issue for each and link them in the PR description. See Post-Merge Follow-up Issues.

1. Assess PR Readiness

# Check current branch
git branch --show-current

# Fetch latest remote state for accurate comparison
git fetch origin main

# Check commits ahead of origin/main (always compare against remote)
ahead=$(git rev-list --count origin/main..HEAD 2>/dev/null || echo "0")
if [ "$ahead" = "0" ]; then
  echo "No commits ahead of origin/main - nothing to create PR for"
  exit 1
fi

# Check for existing PR
gh pr view --json number,state 2>/dev/null || echo "no existing PR"

2. Analyze Commits

CRITICAL: Always compare against origin/main (not local main) to avoid including commits that haven't been merged to the remote. Local main may be ahead of origin/main with unrelated commits.

# Fetch latest remote state
git fetch origin main

# Always use origin/main as base reference
base_ref="origin/main"

git log $base_ref..HEAD --format='%H %s'

# Extract issue references
git log $base_ref..HEAD --format='%B' | grep -oE '#[0-9]+' | sort -u

# Get diff stats
git diff $base_ref...HEAD --stat

3. Identify Post-Merge Follow-ups and Create Issues

Before creating the PR, scan for any actions required after the PR is merged (deployments, migrations, config changes, external docs). For each:

# Create a follow-up issue
gh issue create \
  --title "[Chore] DB: Run migration for new schema" \
  --body "Follow-up to PR that adds user_preferences.\n\nRun: rake db:migrate in production after deploy."
# Returns: https://github.com/org/repo/issues/456

Keep a list of created issue numbers to link in the PR body.

4. Create PR

Write the PR body to a tempfile with the Write tool, then pass it via --body-file. This sidesteps shell quoting entirely — backticks, code fences, and shell metacharacters are preserved byte-for-byte. See the Body content rule in github-issue-writing for the canonical guidance and the threshold for when bare --body "..." is still acceptable.

# 1) Write tool → /tmp/pr-body.md (no shell escaping involved)
# 2) gh pr create --body-file
gh pr create \
  --title "feat(scope): add feature" \
  --body-file /tmp/pr-body.md

Body content of /tmp/pr-body.md:

## Summary
Brief description of what this PR does.

## Motivation
Why this change is needed.

## Changes
- Change 1
- Change 2

## Pre-merge Checklist
- [ ] Tests pass locally
- [ ] Code reviewed

## Follow-up Issues
- #456: run database migration after deploy
- #457: update production config

## Related Issues
Fixes #123
Related: #456

PR Title Format

Use conventional commits format (see github-pr-title skill):

<type>(<scope>): <subject>

Examples:

  • feat(auth): add OAuth2 support
  • fix(api): handle null response
  • docs(readme): update installation

PR Options

OptionCommand
Draftgh pr create --draft
Labelsgh pr create --label "enhancement"
Reviewersgh pr create --reviewer user1,user2
Base branchgh pr create --base develop
Assigneegh pr create --assignee @me

Main-Branch Development

When on main, push to remote feature branch:

# Push main to remote feature branch
git push origin main:feat/feature-name

# Create PR with --head
gh pr create --head feat/feature-name --base main --title "..." --body-file /tmp/pr-body.md

Pre-merge Checklist Guidelines

Include only actions before merging:

  • [ ] Tests pass locally
  • [ ] Code reviewed
  • [ ] Documentation updated
  • [ ] Breaking changes documented

Do NOT include post-merge steps in the checklist. PR descriptions are closed and buried after merge — checklists embedded there are easily missed. Post-merge actions must be tracked as GitHub issues.

Post-Merge Follow-up Issues

When a PR requires actions after it is merged, create a separate GitHub issue for each follow-up. Link all follow-up issues in the PR description under a Follow-up Issues section.

Why issues, not PR checklists: Once a PR is merged and closed, its description is rarely revisited. A GitHub issue stays open and assignable until explicitly closed, ensuring the follow-up is not lost.

Common post-merge follow-up types

TypeExample follow-up issue title
Database migration[Chore] DB: Run schema migration for user_preferences table
Deployment[Chore] Ops: Deploy feature-flag config to production
Manual configuration[Chore] Config: Enable new OAuth provider in admin panel
External documentation[Docs] Wiki: Update runbook for new deploy process
Communication[Chore] Comms: Announce deprecation of /v1 API to customers
Dependent PR[Feature] Next: Implement follow-on X after Y lands

Workflow

  1. Identify post-merge actions from commit messages, PR body, or conversation context.
  2. Create an issue for each follow-up:
   gh issue create \
     --title "[Chore] DB: Run migration for new schema" \
     --body "After #42 merges, run: \`rake db:migrate\` in production.\n\nSee PR #42 for context." \
     --label "chore"
  1. Link the newly created issues in the PR description:
   gh pr edit <pr-number> --body "$(gh pr view <pr-number> --json body -q '.body')

   ## Follow-up Issues
   - #<issue-num>: run database migration
   - #<issue-num>: update deployment runbook"
  1. Do NOT add post-merge steps to the Pre-merge Checklist.

Example: PR description with follow-up issues

## Follow-up Issues
<!-- These issues track post-merge work and will stay open until completed -->
- #456: run database migration for user_preferences table
- #457: update production feature-flag config

Output

On success, report:

Created PR #42: feat(auth): add OAuth2 support
URL: https://github.com/org/repo/pull/42

Related Issues:
  Fixes #123
  Related: #456

Status: Open

Error Handling

ErrorSolution
Branch not pushedPush first or use main-branch pattern
PR existsgh pr view or gh pr edit
No commitsCommit changes first

Quick Reference

ActionCommand
Create PRgh pr create --title "..." --body-file /tmp/pr-body.md
Draft PRgh pr create --draft
View PRgh pr view
Edit PRgh pr edit --title "..." --body-file /tmp/pr-body.md
List PRsgh pr list
Check statusgh pr checks
Create follow-up issuegh issue create --title "[Chore] ..." --body-file /tmp/issue-body.md

Agentic Optimizations

ContextCommand
PR readinessgh pr view --json number,state 2>/dev/null
Commitsgit log origin/main..HEAD --format='%s'
Issue refs`git log origin/main..HEAD --format='%B' \grep -oE '#[0-9]+'`
Create follow-up issuegh issue create --title "[Chore] ..." --body-file /tmp/follow-up.md
Create PRgh pr create --title "..." --body-file /tmp/pr-body.md

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

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

平台分布

Codex

33.33%
按下载量换算22

Claude

31.36%
按下载量换算20

Cursor

19.46%
按下载量换算13

Gemini CLI

8.32%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

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

来源信息

继续浏览同类 Skills