mcpField
F
file-pr

file-pr

github.com/t3dotgg开发2.2k278 次安装今天更新
代码仓库

关于 file-pr

供 Agent 准备并创建 GitHub 拉取请求的技能,涵盖检查是否已有 PR、审阅差异、撰写标题和说明,以及提交非草稿 PR。

主要功能

  1. 01检查是否已有 PR
  2. 02对比基准分支审阅差异
  3. 03标题与说明撰写指引
  4. 04提交前的隐私检查
  5. 05创建正式而非草稿 PR

适用场景

  1. 01为分支准备 PR
  2. 02撰写简洁的 PR 标题和说明
  3. 03提交 PR 以供审查

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/t3dotgg/tstack --skill file-pr

安装后在 Claude Code 中输入/file-pr确认已加载。

详细介绍

提交 PR

提交前,先检查此分支是否已有 PR。与基准分支(通常是 origin/main)在本地对比差异,确保内容符合目标。

PR 标题通常会成为提交消息,因此请遵循仓库的标题规范。查看最近合并的 PR 和 Git 历史,参考示例。标题应简洁易懂,并说明此更改的意义:

不佳

❌ perf(server): negotiate permessage-deflate on the websocket

良好

✅ perf(server): cut websocket frame size by 70%+ with gzipping

描述开头应根据用户最初的提示,简单说明问题,然后简要解释解决方案。不要一上来罗列实现细节:

不佳

❌ Removed implicit workspace carry-over from every "new thread" entry point (cmd+n / cmd+shift+o, sidebar v1/v2 buttons, command palette). New threads inherit only the project from context; branch, worktree, and env mode always come from the configured defaults. Deleted buildContextualThreadOptions, startNewThreadInProjectFromContext, and the v1 sidebar's seed-context machinery.

良好

✅ My "new worktree" default was ignored when starting new threads on existing worktrees. Super unintuitive. Now your preferences always apply.

在描述末尾注明完成更改所用的公开模型名称和 harness,例如 Created with <model> in <harness>.。注明编写了部分更改的子 Agent 所用的模型。使用 harness 报告的模型名称。如果无法获取模型身份信息,只注明 harness,不要猜测模型。

提交前,检查标题、描述、引用内容和附件,确保其中不含秘密信息或私人信息。

请创建正式 PR,而不是草稿,以便审查机器人运行。如果 gh pr create 因 GraphQL 速率限制已用尽而失败,请使用 REST 接口创建 PR:gh api repos/<owner>/<repo>/pulls -f title=... -f head=... -f base=... -F body=@<file>。如果用户还要求持续跟进,请继续使用 babysit-pr 技能。

除非符合用户请求,否则不要发布 PR 后续评论。需要评论时,请使用 leaving-pr-comments 技能。

评论

支持 Markdown