GitHub PR 创建与发布
create-pr
按照仓库检查和 changelog 规则准备、提交并发布 GitHub PR。当被要求创建 PR 时使用。在智能体团队中,PR 负责人负责推送、创建 PR,并用 ship.sh 完成合并。
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- create-pr
- description
- Prepare, commit and publish a GitHub PR using the repository checks and changelog rules. Use when asked to create a PR. In an agent team, the PR owner pushes, opens the PR and merges it with ship.sh.
03 SKILL.md 正文
Create PR
Read AGENTS.md and, in an agent team, "Commit, push and merge" in .claude/model-routing.md first. The PR owner pushes its branch, opens the PR and merges it with ~/dotfiles/script/ship.sh under that policy; the coordinator does not merge by hand. Outside a team, an explicit request to create a PR authorizes publication.
Prepare
- Inspect the worktree, current branch and all commits and changes since the default branch. Detect the default branch from Git or the repository metadata. Use a feature branch; keep an existing feature branch and rebase only when requested.
- Use the
code-reviewskill for review against that base and the originating issue or spec. Reuse a review of the same head when the project policy permits it. Follow the project's review timing, including merge on completion, without adding a second review gate here. - Run the repository's required checks. For a web app, detect its package from the repository instructions (
<project-b>_web/orweb/in the usual layouts) and runbun run buildthere before committing. A failed build blocks publication; usediagnosing-bugswhen diagnosis is needed. Documentation changes use the repository's documentation checks.
Changelog
When changelog.d/ exists, add <issue>-<slug>.md, or <branch-slug>.md without an issue, in the repository's entry format. The release process compiles it; leave CHANGELOG.md alone. Otherwise update the root CHANGELOG.md under its Unreleased section using today's date. Skip changelog only when the owner explicitly allows it for a dependency or chore change.
For product changes covered by .cursor/changelog-hook.json, update the configured vault HOME.md Recent Changes section with script/prepend-recent-change.ts from dotfiles. Read that config for the actual paths and use the helper's --link, --label and --summary arguments. If the helper is unavailable, follow the existing file format. Confirm the required file or fragment appears in the branch diff and the configured changelog hook allows PR creation. Resolve a denial before publishing.
Commit
Include all work belonging to the PR, including the changelog and required Recent Changes entry. Stage with git add -A, inspect the staged paths and diff, and unstage secrets, .env* and .cursor/hooks/state/. Respect explicit path exclusions and preserve unrelated work. Commit with the repository's message style. If the branch already contains all required commits, continue without an empty commit.
Publish
Only the PR owner performs this section. In an agent team, run ~/dotfiles/script/coordinator-publication.sh --repo owner/name --branch <branch> --body-file <path> per .claude/model-routing.md.
Prepare the title and body from the entire branch change. State the concrete outcome, link the issue or spec, and include scope, risk and validation evidence needed by the repository's review checklist. Use Fixes #<number> when appropriate. The owner's body rules prohibit a Test plan section, tool credit and Co-Authored-By suggestions, including on later edits.
Outside a team, push the feature branch with git push -u origin HEAD. Open the PR only after the push succeeds. Pass a prepared body file to gh pr create --title <title> --body-file <path> so newlines and literal text survive shell quoting. Report the returned PR URL. Follow the project's merge policy; opening a PR alone does not authorize merging it.
04 同仓库更多 Skills
tune-agent-docs
Cut words from agent guide files (role files, team docs, AGENTS.md) without changing any rule. Use when asked to tune, trim or shrink agent docs.
workflow-from-chats
Extract durable working preferences from recent Cursor chats and convert them into skills, rules, or workflow docs. Use when asked to learn preferences, mine feedback, personalize workflows, or generate team/person-specific agent guidance.
why
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
what-did-i-get-done
Summarize authored commits over a user-specified time period into a concise update
weekly-review
Produce a weekly synthesis of authored commits with highlights by bugfix, tech debt, and net-new work
verify-this
Verify a claim with fresh local evidence: restate it falsifiably, capture baseline and treatment, compare artifacts, and return VERIFIED, NOT VERIFIED, or INCONCLUSIVE.