Kinference-AI/kinference / .agents/skills/pr
pr
VerifiedCheck the current branch against the contribution workflow and draft a pull request title and description in the shape that CONTRIBUTING.md and the template require, for an implementation, a design or a sub-issue, then open or update the pull request when asked. Use when asked to open, write, draft, update or fix a PR or a pull request description, to answer review, or to fold fixups.
Draft a pull request
Read docs/workflow.md, the "Pull requests" section of
CONTRIBUTING.md and .github/pull_request_template.md first. This
skill is steps 4 and 5 of docs/workflow.md. Only a label counts:
accepted greenlights an implementation and needs-design a design.
The skill never applies a label and never rewrites history
unprompted. The skill shows the full draft before gh pr create,
gh pr edit, gh issue comment, any commit and any push. Below,
<base> is the git ref origin/<name> and <base branch> is the
name itself.
- Find the base. Run
git fetch origin. The base isorigin/main, unless the branch forks from the head branch of another open pull request. Then the base is that head branch, and the pull request targets it. GitHub retargets the pull request tomainwhen that other pull request merges.gh pr list --state openlists the candidate pull requests.git merge-base --is-ancestor origin/<head> HEADsucceeds for the one that this branch builds on. When several succeed, take the one nearest to HEAD. - When
gh pr view --json numberfinds a pull request for the branch, the skill updates it and ends withgh pr edit. - Read the branch:
git log --reverse <base>..HEADandgit diff --stat <base>...HEAD. Every commit has aSigned-off-bytrailer. Name the commits that lack one, and go on. - Find the issue from the user or from the commit messages. When
neither names one, say "The branch names no issue. The policy
closes a pull request without one. Run
/issue, wait foraccepted, and run/pr <N>." and stop. Read the issue withgh issue view <N> --json labels,state,assignees,parent,comments. The mode is design when the diff adds a file underdesign/other thanTEMPLATE.mdwithissue: <N>, sub-issue when the issue has a parent, and implementation otherwise. - Gate. Implementation: the issue has the
acceptedlabel. Design: the issue has theneeds-designlabel. Sub-issue: the parent has theacceptedlabel, no maintainer comment on the sub-issue holds it back, and every earlier Break-down line's sub-issue is closed. When the gate fails, say which one and stop: "Issue # lacksaccepted. The policy closes a pull request without one.", or "Issue # has theneeds-designlabel. Run/design.", or "Sub-issue # lands before this one." There is no override. In update mode, an issue that went fromacceptedtoneeds-designmeans that a reviewer asked for a design. Say that the pull request waits for the design, and stop. - Claim. The assignee is the login from
gh api user --jq .login. Someone else: say "Issue # is assigned to ." and stop. Nobody: show a comment that asks for the issue, post it on a yes, and say that the pull request waits for the assignment. - Compare the diff with the issue's Done. When Done asks for something that the branch does not do, list that gap under Issues as work that the pull request leaves out, or ask the user to close the gap first.
- Fixups. Never fold unprompted. When the user says that the review is done, offer `GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash
- Flip a status only when the user asks, as one signed commit. In
design mode, set
status: acceptedbefore the fold. In sub-issue mode, when this sub-issue is the last open one, setstatus: implementedin the design file. - Title: one line in the imperative, under 72 characters, that
names the whole change. Body: the parts of the template, in its
order, each introduced by its label alone on a line, one short
paragraph each. Leave out what the diff and the docs already say.
No markdown headings, bold, task lists or links to this
conversation. Issues says
Closes #<N>. In design mode, Issues saysPart of #<N>and no Closes. For the last sub-issue, Issues saysCloses #<M>andCloses #<N>for the proposal. A stacked pull request names the pull request that it builds on. When Operator-visible changes is not "None", run the branch on a kind cluster withjust up,just test-smokeand the steps in docs/local-development.md that exercise the change. Validation says what the run showed, or says that you did not run it. - Check every sentence of the draft against the prose rules in AGENTS.md and rewrite each sentence that fails.
- Show the title and body. On a yes:
gh pr create --base <base branch> --title "..." --body-file -with the body on stdin, orgh pr editin update mode.
Done: the pull request URL. After opening or updating, end with:
"After a design pull request merges, run /breakdown. Otherwise
nothing is left."
Rationalizations to reject
| Thought | Why it is wrong |
|---|---|
| "The change is tiny, so it needs no issue." | The page has no exemption. A pull request without an accepted issue gets closed. |
| "The maintainer said yes in a comment." | Only the label counts. |
| "I will fold the fixups now to save a round trip." | Once a reviewer has commented, the history stays until the review is done and the user asks. |
| "The user is a maintainer, so I can skip the gate." | The gate is the same for everyone. The maintainer applies the label first. |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |