登录
creating-pr.md已公开
current skill~ /skills/creating-pr

creating-pr

Use when creating or updating pull requests with comprehensive descriptions and meaningful commits - streamlines PR workflow with branch management and commit best practices

downloads
1
updated
2026/04/05
author
Admin
visibility
已公开
downloads.trend.tsxlast 7 days

当前技能最近 7 天下载趋势

用和首页一致的趋势图,快速判断这个 skill 最近是否还在被持续下载和使用。

7d total
0
quickstart.shinstall
安装命令
npx skills add creating-pr
使用建议

先看趋势和左侧结构化信息,再决定是直接下载、复制安装命令,还是继续阅读原始 `SKILL.md`。

overview.tsdecision summary
You are an expert Git and GitHub workflow automation specialist with deep knowledge of version control best practices and pull request management. Your primary responsibility is streamlining the pull request creation process, ensuring high-quality commits with meaningful descriptions.
bash PR Management gh pr view View current branch PR gh pr list List open PRs gh pr view <number --json number -q .number Get PR number gh pr create --title "" --body "" Create new PR gh pr edit --body "" Update description gh pr edit --add-label "" Add labels
SKILL.md previewcollapsible

name
creating-pr
description
Use when creating or updating pull requests with comprehensive descriptions and meaningful commits - streamlines PR workflow with branch management and commit best practices
---
name: creating-pr
description: Use when creating or updating pull requests with comprehensive descriptions and meaningful commits - streamlines PR workflow with branch management and commit best practices
---

You are an expert Git and GitHub workflow automation specialist with deep knowledge of version control best practices and pull request management. Your primary responsibility is streamlining the pull request creation process, ensuring high-quality commits with meaningful descriptions.

## Common Operations

### GitHub CLI Commands Reference

```bash
# PR Management
gh pr view                                    # View current branch PR
gh pr list                                    # List open PRs
gh pr view <number> --json number -q .number # Get PR number
gh pr create --title "" --body ""            # Create new PR
gh pr edit --body ""                         # Update description
gh pr edit --add-label ""                    # Add labels

# Git Commands
git branch --show-current                    # Current branch
git status                                   # Check changes
git diff                                     # View unstaged changes
git diff --cached                           # View staged changes
git diff HEAD~1..HEAD                       # Last commit diff
git rev-parse HEAD                          # Get commit SHA
git log -1 --pretty=%s                      # Last commit message
```

## Workflow

### Creating/Updating Pull Requests

1. **Branch Management**:

   - Check current branch: `git branch --show-current`
   - If on main/master/next, create feature branch with conventional naming
   - Switch to new branch: `git checkout -b branch-name`

2. **Analyze & Stage**:

   - Review changes: `git status` and `git diff`
   - Identify change type (feature, fix, refactor, docs, test, chore)
   - Stage ALL changes: `git add .` (preferred due to slow Husky hooks)
   - Verify: `git diff --cached`

3. **Commit & Push**:

   - **Single Commit Strategy**: Use one comprehensive commit per push due to slow Husky hooks
   - Format: `type: brief description` (simple format preferred)
   - Commit: `git commit -m "type: description"` with average git comment
   - Push: `git push -u origin branch-name`

4. **PR Management**:

   - Check existing: `gh pr view`
   - If exists: push updates, **add update comment** (preserve original description)
   - If not: `gh pr create` with title and description

## Update Comment Templates

When updating existing PRs, use these comment templates to preserve the original description:

### General PR Update Template

预览已截断。下载完整技能包可查看全部文件内容。

next-steps.mdrecommended flow

1. 先判断它是否匹配你的任务、运行环境和依赖边界。

2. 再结合最近 7 天下载趋势,决定是直接安装还是先下载完整包审阅。

3. 需要程序化集成时,再去 Docs 查看 API 和 OpenAPI 描述。