/github-prs:pr-link-issuefrom github-prs
Idempotently ensure a GitHub PR body closes every issue in its own issue set (appends the `Closes
Ships in github-prs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Ensure a GitHub pull request's body links to and closes each issue it resolves, by verifying — and, if needed, appending — a closing keyword immediately followed by that issue reference in the PR body, once per issue.
Per GitHub's "Linking a pull request to an issue" docs, a closing keyword immediately followed by an issue reference in the PR description does two things at once: it creates the Development-sidebar "linked pull request" and auto-closes the linked issue when the PR merges into the default branch. A keyword in a commit message auto-closes but does not create the sidebar link, which is why this skill writes the PR body, never a commit. Both effects are intended: the sidebar link is the whole point, and auto-close-on-merge is the behavior we want.
Each issue needs its own keyword, so this skill writes one
Closes #<issue> line per issue rather than one line listing several.
The bundled script reads the body back for the lines it already
carries before writing, through gp_closing_issues — the parse the
pr-closing-issues script shares — so it appends only what is missing
and is idempotent on its own.
/pr-link-issue <PR> <issue-number>…
<PR> (required): the pull request, in any form
skills/lib/pr-reference.md lists.<issue-number>… (required): one or more issue numbers the PR
resolves — members of the branch's own issue set only, each as
N or #N, space-separated. See "Own issue set only" below.Every issue this skill writes a closing keyword for MUST be a member of the branch's own issue set — never an umbrella, parent, predecessor, or otherwise "related" issue. Aiming a closing keyword at another issue would auto-close that issue when this PR merges, which is what the closing-keyword rule — PR body only, the branch's own issue set only — exists to prevent.
That rule also settles what happens when the caller's numbers and the
branch name disagree, and applying it is not this skill's job:
/git-tools:git-issues-from-branch is the one skill that applies it.
This skill's part is small. Its claim is the caller-supplied
numbers — a caller of /pr-link-issue always has the issues in hand,
so there is nothing to look up. It hands that claim to
/git-tools:git-issues-from-branch alongside the PR's head branch,
and acts on what comes back. It never parses a branch name and never
re-derives the resolution. This skill reads no config of its own.
Resolve the set of issues to ensure. Fetch the PR's head branch:
/github-prs:pr-view <PR> --json headRefName --jq .headRefName
Invoke /git-tools:git-issues-from-branch <headRefName> <issue-number>… — the head branch first, the caller-supplied
numbers after it as the claim.
<issues>.Note the "claimed outside the branch set" numbers it reports: those never get a closing line, and the refusal is named in the report-back.
Ensure the lines with the bundled script, spelled as a bare
name, passing every member of <issues>:
pr-link-issue <PR> <issueA> <issueB>
The script reads the body and the issues it already closes. Members
already closed are left alone; for the rest it keeps the existing
body verbatim, appends one Closes #<issue> line per issue after a
blank line, writes the body back, and re-reads it. When every member
is already closed it writes nothing and prints
PR <PR> already closes <issues>. Every issue it is given that the
body does not close gets a line, so never pass an issue outside the
branch's set, and never write the keyword into a commit message.
| Exit | Meaning |
|---|---|
| 0 | the body closes every issue given; stdout names the ones already closed and the lines appended |
| 1 | a command the script ran failed, such as a gh call; its own error is on stderr above the script's line |
| 2 | a usage error; the body is untouched |
| 3 | the re-read body is not the body written; stderr says so |
On any non-zero exit, surface stderr verbatim in the report-back.
Report back a single line: which members were already linked and
which had a Closes #<issue> line appended, as the script's stdout
names them, naming <PR>, plus
any caller-supplied number step 1 reported as sitting outside the
branch's set. If step 1 gave no safe resolution, the body is
unchanged — report that outcome instead, with both sets.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub thevoskamps/claude-plugins-marketplace --plugin github-prs14 skills in this plugin
/pr-closing-issuesReport the set of issues a GitHub pull request's body closes, by relaying the line the bundled script prints. The parse is gp_closing_issues, shared by the pr-closing-issues and pr-link-issue scripts; every skill and agent outside github-prs reads a body's closing set by invoking this skill./pr-commentPost a comment on a GitHub pull request from a file, then verify the comment GitHub holds carries that file's text./pr-createOpen a draft GitHub PR for a branch against the configured base, with one closing keyword per issue in the branch's own issue set in the PR body.Other plugins' skills for the same job