create-pr

GitHub

指导创建符合规范的 Pull Request,确保标题和正文格式正确以生成准确的发布说明。涵盖分支管理、合并策略及基于 diff 的内容校验流程。

.agents/skills/create-pr/SKILL.md PanAchy/copilot-arewecooked

触发场景

用户要求打开或创建 PR 准备合并代码到 develop 或 main 分支 提及 'ship it' 或 'ready to merge'

安装

npx skills add PanAchy/copilot-arewecooked --skill create-pr -g -y
更多选项

非标准路径

npx skills add https://github.com/PanAchy/copilot-arewecooked/tree/develop/.agents/skills/create-pr -g -y

不安装直接使用

npx skills use PanAchy/copilot-arewecooked@create-pr

指定 Agent (Claude Code)

npx skills add PanAchy/copilot-arewecooked --skill create-pr -a claude-code -g -y

安装 repo 全部 skill

npx skills add PanAchy/copilot-arewecooked --all -g -y

预览 repo 内 skill

npx skills add PanAchy/copilot-arewecooked --list

SKILL.md

Frontmatter
{
    "name": "create-pr",
    "description": "Create PRs with titles and bodies that produce accurate release notes. Use when opening a pull request, merging to develop or main, or when user says \"open a PR\", \"create a PR\", \"ready to merge\", or \"ship it\"."
}

Create PR

Rules

  1. Create short-lived feature branches from develop for all work.
  2. Open normal work PRs from feature branches into develop.
  3. Prefer squash merge for feature → develop PRs. The PR title becomes one clean Conventional Commit on develop.
  4. Open release PRs from develop into main when ready to ship.
  5. Merge release PRs with a merge commit, not squash, so release-please sees the individual Conventional Commits accumulated on develop.
  6. The release PR body becomes useful release context, but release-please changelog entries come from commits merged to main.
  7. Use fix(...) for release-affecting fixes, including broken publish/release automation. Do not use ci(...) if the change must trigger a release.

PR title format

<type>(<scope>): <summary of all changes>

Pick the highest-impact type: feat > fix > refactor > test > docs > chore.

PR body format

## What changed

- <change 1>
- <change 2>
- <change 3>

## Context

<1-2 sentences on why>

## Test plan

- [ ] <how to verify>

Before creating a feature → develop PR

  1. Run git fetch origin.
  2. Confirm current branch is a feature branch, not main or develop: git branch --show-current.
  3. Run git diff origin/develop...HEAD --name-status to see actual changed files in the PR.
  4. Run git diff origin/develop...HEAD -- <file> to understand actual content changes.
  5. Synthesize the title and body from the diff, not from commit headlines alone.
  6. Verify npm run build && npm test passes.
  7. Push the branch: git push -u origin <branch>.
  8. Create PR: gh pr create --base develop --head <branch> --title "<title>" --body "<body>".
  9. After creating PR, run gh pr diff <number> --name-only and gh pr view <number> --json files,title,body to confirm body matches actual changed files.

Before creating a develop → main release PR

  1. Run git fetch origin.
  2. Run git diff origin/main...origin/develop --name-status to see actual release contents.
  3. Run git log --oneline origin/main..origin/develop to review Conventional Commits that release-please will see after merge.
  4. Verify release PR body summarizes the diff, not stale branch history.
  5. Create PR: gh pr create --base main --head develop --title "chore(release): merge develop into main" --body "<body>".
  6. Merge with a merge commit, not squash.

Title quality check

  • Would a user reading the changelog understand what changed?
  • Does it cover all user-visible changes, not just the first commit?
  • Is the type correct? (feat = user-visible feature, fix = bug, chore = internal)
  • No period at the end. No trailing punctuation.

Bad vs Good

Bad: feat: updates (vague) Bad: fix: typo in readme when the branch also adds tests and error handling (understates) Bad: feat: add error handling, tests, --version flag, npm publish, CONTRIBUTING.md (too long, use body)

Good: feat: add error handling, tests, and npm publish workflow (concise, accurate scope) Good: fix: handle malformed JSONL in source parsers (specific, covers the real fix)

版本历史

  • 1e89480 当前 2026-07-24 16:57

元信息

文件数
0
版本
1e89480
Hash
afeacfdd
收录时间
2026-07-24 16:57

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-16 13:27
浙ICP备14020137号-1 $访客地图$