create-pr
它能做什么
这项技能指导你的 AI 在 GitHub 上准备并发起拉取请求。适合希望变更描述清楚、便于审阅的开发者。
适用场景
- ✓当你在某个分支上完成工作,并想发起拉取请求的时候。
- ✓当你希望拉取请求的描述遵循项目模板的时候。
- ✓当你希望以草稿形式发起拉取请求,以便安全地审阅的时候。
技能链接
https://github.com/DevCaress/guia-entrevistas-de-programacion/blob/main/.claude/skills/create-pr/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请按照项目模板为我的分支准备一个拉取请求,并以草稿形式发起。”
每周 5 个新技能,1 分钟读完。
工作原理
技能会检查分支及其差异,运行仓库的检查,并根据模板撰写标题和描述。只有在你要求时,它才会推送并发起草稿拉取请求。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Create Pull Request
Prepare reviewable pull requests for main. Keep the branch focused, preserve unrelated work, and never merge or modify another person's pull request.
Workflow
Inspect the current branch,
git status --short, the diff againstmain, recent commits, and any existing pull request for the branch.Confirm the branch is not
mainand that it contains a small, coherent change. If the scope, target branch, or included files are unclear, ask before proceeding.Ensure all intended work is committed. Use the
create-commitskill if a commit is needed.Run the relevant validation commands from
CONTRIBUTING.md. Report failures accurately; do not weaken checks or use bypass flags.Derive a concise Conventional Commit-style PR title, such as
docs(react): add testing resources. Reuse a suitable user-provided title.Build the description from
.github/pull_request_template.md:- Explain what changed and why.
- Add
Closes #<number>only when an issue is known. - Mark only validation commands that actually passed.
- Keep unchecked items unchecked and do not claim work that was not performed.
If the user asked to open the PR, push the current branch and create a draft pull request targeting
main. Use GitHub CLI or an authenticated GitHub integration. If the user asked only to prepare it, provide the title and body without pushing or creating anything.Return the PR URL, target branch, title, validation results, and any limitations.
Safety rules
- Do not push or create a PR unless the user explicitly requested that external action.
- Do not use
--force, alter branch history, merge, approve, or request review unless explicitly asked. - Do not include secrets, generated output, local configuration, or unrelated changes.
- Do not create a duplicate PR. Update or report an existing PR instead.
- Use
mainas the base branch unless the user specifies another target.
常见问题
拉取请求会以草稿形式发起吗?
会。除非你另有要求,默认是草稿。
它会合并拉取请求吗?
不会。技能从不合并或更改别人的拉取请求。
它会在检查没有通过时声称通过吗?
不会。技能要求如实报告失败,只标记真正通过的验证。
详情
作者的原始描述
Prepare and open a safe GitHub pull request for this repository. Use when the user asks to create, open, or prepare a pull request from completed branch work. Inspect the branch and diff, validate changes, follow the repository PR template, push only when authorized, and open a draft PR by default.
热度
- GitHub 星标
- 8.2k
- 排名
- #12546
- 许可证
- MIT
- 更新时间
- 2026/8/8
评论
- …