Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

create-pull-request创建拉取请求

Agent Skill

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。它适合让 Agent 查询项目状态、整理变更、辅助创建或检查协作事项,并把仓库中的信息转成可执行的下一步。使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

总安装

408

周安装

17

GitHub Stars

12

下载量

136
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/pjt222/development-guides --skill create-pull-request

简介

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。

  • 适合查询项目状态、整理变更、辅助创建或检查协作事项,并将信息转为可执行下一步。
  • 通过 npx skills add 命令安装,需结合原始 README 核验具体用法和功能细节。
  • 涉及写入操作时需确认 token 权限、目标仓库范围和用户授权,避免越权访问。
  • create-pull-request 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Create Pull Request

Create a GitHub pull request with a clear title, structured description, and proper branch setup.

When to Use

  • Proposing changes from a feature or fix branch for review
  • Merging completed work into the main branch
  • Requesting code review from collaborators
  • Documenting the purpose and scope of a set of changes

Inputs

  • Required: Feature branch with committed changes
  • Required: Base branch to merge into (usually main)
  • Optional: Reviewers to request
  • Optional: Labels or milestone
  • Optional: Draft status

Procedure

Step 1: Ensure Branch Is Ready

Verify the branch is up to date with the base branch and all changes are committed:

# Check for uncommitted changes
git status

# Fetch latest from remote
git fetch origin

# Rebase on latest main (or merge)
git rebase origin/main

Expected: Branch is ahead of origin/main with no uncommitted changes and no conflicts.

On failure: If rebase conflicts occur, resolve them (see resolve-git-conflicts skill), then git rebase --continue. If the branch has diverged significantly, consider git merge origin/main instead.

Step 2: Review All Changes on the Branch

Examine the full diff and commit history that will be included in the PR:

# See all commits on this branch (not on main)
git log origin/main..HEAD --oneline

# See the full diff against main
git diff origin/main...HEAD

# Check if branch tracks remote and is pushed
git status -sb

Expected: All commits are relevant to the PR. The diff shows only intended changes.

On failure: If unrelated commits are present, consider interactive rebase to clean up history before creating the PR.

Step 3: Push the Branch

# Push branch to remote (set upstream tracking)
git push -u origin HEAD

Expected: Branch appears on GitHub remote.

On failure: If push is rejected, pull first with git pull --rebase origin <branch> and resolve any conflicts.

Step 4: Write PR Title and Description

Keep the title under 70 characters. Use the body for details:

gh pr create --title "Add weighted mean calculation" --body "$(cat <<'EOF'
## Summary
- Implement `weighted_mean()` with NA handling and zero-weight filtering
- Add input validation for mismatched vector lengths
- Include unit tests covering edge cases

## Test plan
- [ ] `devtools::test()` passes with no failures
- [ ] Manual verification with example data
- [ ] Edge cases: empty vectors, all-NA weights, zero-length input

🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"

For draft PRs:

gh pr create --title "WIP: Add authentication" --body "..." --draft

Expected: PR created on GitHub with a URL returned. Description clearly communicates what changed and how to test.

On failure: If gh is not authenticated, run gh auth login. If the base branch is wrong, specify with --base main.

Step 5: Handle Review Feedback

Respond to review comments and push updates:

# View PR comments
gh api repos/{owner}/{repo}/pulls/{number}/comments

# View PR review status
gh pr checks

# After making changes, commit and push
git add <files>
git commit -m "$(cat <<'EOF'
fix: address review feedback on input validation

EOF
)"
git push

Expected: New commits appear on the PR. Review comments are addressed.

On failure: If CI checks fail after pushing, read the check output with gh pr checks and fix the issues before requesting re-review.

Step 6: Merge and Clean Up

After approval:

# Merge the PR (squash merge keeps history clean)
gh pr merge --squash --delete-branch

# Or merge with all commits preserved
gh pr merge --merge --delete-branch

# Or rebase merge (linear history)
gh pr merge --rebase --delete-branch

After merge, update local main:

git checkout main
git pull origin main

Expected: PR is merged, remote branch is deleted, local main is updated.

On failure: If merge is blocked by failing checks or missing approvals, address those first. Do not force-merge without resolving blockers.

Validation

  • PR title is concise (under 70 characters) and descriptive
  • PR body includes summary of changes and test plan
  • All commits on the branch are relevant to the PR
  • CI checks pass
  • Branch is up to date with base branch
  • Reviewers are assigned (if required by repository settings)
  • No sensitive data in the diff

Common Pitfalls

  • PR too large: Keep PRs focused on a single feature or fix. Large PRs are harder to review and more likely to have merge conflicts.
  • Missing test plan: Always describe how the changes can be verified, even for documentation PRs.
  • Stale branch: If the base branch has moved ahead significantly, rebase before creating the PR to minimize merge conflicts.
  • Force-pushing during review: Avoid force-pushing to a branch with open review comments. Push new commits so reviewers can see incremental changes.
  • Not reading CI output: Check gh pr checks before asking for re-review. Failing CI wastes reviewers' time.
  • Forgetting to delete branch: Use --delete-branch with merge to keep the remote clean.

Related Skills

  • commit-changes - creating commits for the PR
  • manage-git-branches - branch creation and naming conventions
  • resolve-git-conflicts - handling conflicts during rebase/merge
  • create-github-release - releasing after merge

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.93%
按下载量换算52

Claude

26.44%
按下载量换算36

Cursor

17.25%
按下载量换算23

Gemini CLI

9.12%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills