pr-creator by google-gemini/gemini-cli
npx skills add https://github.com/google-gemini/gemini-cli --skill pr-creator此技能指导创建符合仓库标准的高质量拉取请求。
请遵循以下步骤创建拉取请求:
main 分支上工作。 * 运行 `git branch --show-current`。
* 如果当前分支是 `main`,您**必须**创建并切换到一个新的描述性分支:
git checkout -b <new-branch-name>
2. 提交更改 : 确认所有预期的更改都已提交。
* 运行 `git status` 检查是否有未暂存或未提交的更改。
* 如果有未提交的更改,请先使用描述性信息暂存并提交它们,然后再继续。**切勿**直接提交到 `main` 分支。
git add .
git commit -m "type(scope): description"
3. 定位模板 : 在仓库中搜索拉取请求模板。
* 检查 `.github/pull_request_template.md`
* 检查 `.github/PULL_REQUEST_TEMPLATE.md`
* 如果存在多个模板(例如在 `.github/PULL_REQUEST_TEMPLATE/` 目录中),请询问用户使用哪一个,或者根据上下文(例如 `bug_fix.md` 与 `feature.md`)选择最合适的一个。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
4. 阅读模板 : 阅读已识别模板文件的内容。
* **标题** : 保留模板中的所有标题。
* **核对清单** : 检查每一项。如果已完成,则标记为 `[x]`。如果某项不适用,请保持未选中状态或标记为 `[ ]`(根据模板的说明),或者如果模板允许灵活性,可以将其删除(但为了透明度,更倾向于保持其未选中状态)。
* **内容** : 用清晰、简洁的更改摘要填写各个部分。
* **相关议题** : 链接此 PR 修复或相关的任何议题(例如,"Fixes #123")。
6. 预检检查 : 在创建 PR 之前,运行工作区预检脚本,以确保所有构建、代码检查和测试检查都通过。
npm run preflight
如果任何检查失败,请在继续创建 PR 之前解决问题。
推送分支 : 将当前分支推送到远程仓库。关键安全护栏: 推送前再次检查您的分支名称。如果当前分支是 main,切勿推送。
git branch --show-current
# 非交互式推送
git push -u origin HEAD
8. 创建 PR : 使用 gh CLI 创建 PR。为了避免多行 Markdown 的 shell 转义问题,请先将描述写入临时文件。
# 1. 将起草的描述写入临时文件
# 2. 使用 --body-file 标志创建 PR
gh pr create --title "type(scope): succinct description" --body-file <temp_file_path>
# 3. 删除临时文件
rm <temp_file_path>
* **标题** : 如果仓库使用[约定式提交](https://www.conventionalcommits.org/)格式,请确保标题遵循该格式(例如,`feat(ui): add new button`、`fix(core): resolve crash`)。
main 分支。这是您的最高优先级。每周安装量
1.1K
仓库
GitHub 星标数
98.9K
首次出现
2026年1月21日
安全审计
安装于
gemini-cli849
opencode844
codex793
github-copilot732
claude-code720
cursor695
This skill guides the creation of high-quality Pull Requests that adhere to the repository's standards.
Follow these steps to create a Pull Request:
Branch Management : CRITICAL: Ensure you are NOT working on the main branch.
Run git branch --show-current.
If the current branch is main, you MUST create and switch to a new descriptive branch:
git checkout -b <new-branch-name>
Commit Changes : Verify that all intended changes are committed.
Run git status to check for unstaged or uncommitted changes.
If there are uncommitted changes, stage and commit them with a descriptive message before proceeding. NEVER commit directly to main.
git add .
git commit -m "type(scope): description"
Locate Template : Search for a pull request template in the repository.
.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE.md.github/PULL_REQUEST_TEMPLATE/), ask the user which one to use or select the most appropriate one based on the context (e.g., bug_fix.md vs feature.md).Read Template : Read the content of the identified template file.
Draft Description : Create a PR description that strictly follows the template's structure.
[x] if completed. If an item is not applicable, leave it unchecked or mark as [ ] (depending on the template's instructions) or remove it if the template allows flexibility (but prefer keeping it unchecked for transparency).Preflight Check : Before creating the PR, run the workspace preflight script to ensure all build, lint, and test checks pass.
npm run preflight
If any checks fail, address the issues before proceeding to create the PR.
Push Branch : Push the current branch to the remote repository. CRITICAL SAFETY RAIL: Double-check your branch name before pushing. NEVER push if the current branch is main.
git branch --show-current
# Push non-interactively
git push -u origin HEAD
8. Create PR : Use the gh CLI to create the PR. To avoid shell escaping issues with multi-line Markdown, write the description to a temporary file first.
# 1. Write the drafted description to a temporary file
# 2. Create the PR using the --body-file flag
gh pr create --title "type(scope): succinct description" --body-file <temp_file_path>
# 3. Remove the temporary file
rm <temp_file_path>
* **Title** : Ensure the title follows the [Conventional Commits](https://www.conventionalcommits.org/) format if the repository uses it (e.g., `feat(ui): add new button`, `fix(core): resolve crash`).
main. This is your highest priority.Weekly Installs
1.1K
Repository
GitHub Stars
98.9K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
gemini-cli849
opencode844
codex793
github-copilot732
claude-code720
cursor695
99,500 周安装