跳到正文
Skillpedia
通用编程8.2k · #12546

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/DevCaress/guia-entrevistas-de-programacion/blob/main/.claude/skills/create-pr/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Inspect the current branch, git status --short, the diff against main, recent commits, and any existing pull request for the branch.

  2. Confirm the branch is not main and that it contains a small, coherent change. If the scope, target branch, or included files are unclear, ask before proceeding.

  3. Ensure all intended work is committed. Use the create-commit skill if a commit is needed.

  4. Run the relevant validation commands from CONTRIBUTING.md. Report failures accurately; do not weaken checks or use bypass flags.

  5. Derive a concise Conventional Commit-style PR title, such as docs(react): add testing resources. Reuse a suitable user-provided title.

  6. 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.
  7. 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.

  8. 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 main as 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.

repo: DevCaress/guia-entrevistas-de-programacion

热度

GitHub 星标
8.2k
排名
#12546
许可证
MIT
更新时间
2026/8/8

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能