Append a GitHub issue link and its Linear ticket to the current PR's description. Use when asked to "link issue to pr", "fill in issue and linear in pr", "add issue refs to pr", or when given a GitHub issue URL and asked to attach it to the current PR. Resolves the Linear ticket automatically from the issue's linear-linkback comment.
Start a fresh conversation. Replace the highlighted placeholders.
Use pr-link-issue to prepare the current PR description update for [GitHub issue URL], preserving existing content and resolving its Linear ticket if present; show me the proposed change and wait for my explicit approval before publishing it.
Required inputs
[GitHub issue URL]
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: pr-link-issuedescription: Append a GitHub issue link and its Linear ticket to the current PR's description. Use when asked to "link issue to pr", "fill in issue and linear in pr", "add issue refs to pr", or when given a GitHub issue URL and asked to attach it to the current PR. Resolves the Linear ticket automatically from the issue's linear-linkback comment.
Link a GitHub Issue + Linear Ticket on a PR
Appends a Sentry-style #### Issues block to a PR description, referencing both the GitHub issue and the Linear ticket pulled from the issue's linear-linkback comment.
Inputs
<issue-url> — GitHub issue URL like https://github.com/<owner>/<repo>/issues/<n>. Issue number alone is fine if the PR is in the same repo.
(optional) <pr-number> — defaults to the open PR for the current branch.
Steps
Resolve the PR number — skip if user supplied one:
gh pr view --json number,body -q '.number'
If no PR exists on the branch, stop and tell the user.
Extract issue number + repo from the input URL, or accept a bare #1234 for current repo.
Fetch the Linear ticket from the issue's linear-linkback comment:
If no match, fall back to asking the user for the Linear key, or omit it.
Read the existing PR body so you can append rather than overwrite:
gh pr view <pr-number> --json body -q '.body'
Construct the new body. If the body is empty, use just the #### Issues block. Otherwise, append it after a blank line. Don't duplicate — if #### Issues is already present, replace that section instead of adding a second one.
If the issue doesn't have a Linear linkback yet (newly filed), proceed with just the GitHub issue reference and tell the user the Linear key is missing.
pr-link-issue by getsentry · The Skill Leaderboard