ce-commit-push-pr
它能做什么
这项技能把你本地的代码改动依次完成提交、推送和创建拉取请求。适合希望发布步骤保持一致的开发者。
适用场景
- ✓当你想发布当前的改动并打开拉取请求的时候。
- ✓当你想为已完成的改动撰写清晰的拉取请求描述的时候。
- ✓当你想重写或更新已有拉取请求的描述的时候。
技能链接
https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/ce-commit-push-pr/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我提交改动、推送分支,并用一段好的描述打开拉取请求。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能检查代码仓库的状态,对改动进行分组,撰写提交信息和拉取请求描述,然后在推送前请你确认。它使用 GitHub 工具打开或编辑拉取请求。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Git Commit, Push, and PR
Asking the user: use the host's blocking question tool already in the current tool list (match by capability, not by a host-specific name). Presence in the current tool list is proof the tool exists; never call a user-facing question tool to discover whether it exists. If a matching tool is listed but unloaded, use the host's tool-discovery primitive to load that capability — do not search for another host's tool name. Fall back to asking in chat only when no such tool is in the list or a real question call errors, and never silently skip the question.
Mode
- Description-only — the user wants just a description ("write/draft a PR description", "describe this PR", a pasted PR URL or number). Run Step 4 only and print it. Apply it only if asked. Pass any pasted PR ref so Pre-A resolves the range.
- Description update — refresh or rewrite an existing PR's description, with no commit or push intent. Resolve PR presence by the Context rule below: an exit-0
[]is "no open PR" (report it and stop), and a non-zero exit is unknown (resolve auth or connectivity, then stop until presence is known). With an open PR, run Step 4 in PR mode on that URL, then Step 5 to preview, confirm, and apply viagh pr edit. - Full workflow — otherwise: Steps 1-5. Enter Stack mode instead when intent or preference wants a stack.
mode:pipeline modifier, set by orchestrated callers such as lfg. Run the resolved mode non-interactively and suppress every blocking ask. Each suppressed ask takes the conservative default: no existing-PR rewrite, the branch kept, an unresolvable base stopping rather than guessed, and a description-update preview applied directly, since that invocation is the apply intent. Pipeline stack mode uses only the intent and scope on the invocation and passes posture into the handoff.
Stack mode (opt-in)
Opt-in only. Enter it when intent or standing preference wants a multi-PR stack. An explicit stack request is required intent — do not re-read it as a single PR with a custom --base. Do not proactively suggest PR stacks. When the user did not ask for one, refuse nonsense stacks (one logical change, artificial slices) and stay single-PR.
In stack mode, load references/stack-submit.md before Step 3 and follow only its probing, topology, and retrospective construction; that layer-by-layer commit flow replaces ordinary Step 3. Do not submit there. Step 5 handles submission, the gh stack CLI dependency and residuals, and the handoff posture: posture:stack-ready by default, posture:stack-land only on explicit land intent, from the bottom open non-draft PR. Do not add posture: to this skill's argument-hint.
Context
Read references/context.md before Step 1. It defines the command table, the exit-code meanings, the fork and detached-HEAD traps, and the branch and PR resolution Steps 1-2 use. Two of its rules belong here too. Never ask whether to branch: a detached HEAD, or the default branch with work on it, creates one, and the default branch with no work reports and stops. And with conventional commits, default to fix: over feat: when ambiguous, unless the user overrides.
Three rules govern the run.
Every git and gh probe is its own argv-form call, gathering and re-verification alike, and its exit status is control flow. The reference gives the reason and names the two compound recipes this skill pins.
Probe output is a snapshot. Re-verify branch, remote, and PR state right before each consequential action: Step 3's push, Step 5's create.
Only an exit-0 [] from a query against the base repo means "no open PR." A non-zero exit is unknown, never "none". On a fork checkout, target the base with -R and pass the branch name only, since --head <owner>:<branch> silently returns []. With results, do not blindly take index 0: match head owner and branch, and stop on an ambiguous match. Note the URL and body from that entry — Step 5 uses the URL to pick the existing-PR path, Step 4 rewrites the existing body.
Step 3: Commit and push
Read references/commit-and-push.md for commit/push mechanics and default-branch handling via references/branch-creation.md. If stack mode committed its layers, skip to Step 4; Step 5 submits them.
Project publishing gate. Before publishing commits, resolve every applicable pre-push or review-ready requirement from the project
常见问题
它会不经询问就推送吗?
该技能设计为在应用改动(例如推送或编辑拉取请求)之前先预览并请你确认。
它能只撰写拉取请求的描述吗?
能。仅描述模式会编写或更新描述,而不会提交或推送。
它需要 GitHub 访问权限吗?
需要。它使用 GitHub 命令行工具来打开和编辑拉取请求。
详情
作者的原始描述
Commit, push, and open a PR. Use when asked to ship/open a PR, or for PR-description-only flows like writing, rewriting, or describing a PR body.
热度
- GitHub 星标
- 26k
- 排名
- #10022
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
ce-babysit-pr
26k帮你的智能体通过处理评审意见、失败的检查和过时的分支,持续推动一个未合并的 GitHub 拉取请求走向合并。
ce-bakeoff
26k帮你的智能体为一个问题构建多个相互竞争的方案,进行比较,并把最强的部分组合成一个推荐方案。
ce-brainstorm
26k通过简短的引导式对话,帮你的智能体在任何工作开始前,把模糊的想法整理成清晰、规模合适的需求。
ce-code-review
26k帮你的智能体审查指定的代码改动或拉取请求,查找缺陷、回归、缺失的测试和规范问题,并报告清晰的发现。