/pr-link-issue
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
$ npx -y skills add getsentry/sentry-skills --skill pr-link-issue --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/pr-link-issue
Context preview
The summary Claude sees to decide when to auto-load this skill.
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
SKILL.md
pr-link-issue.SKILL.mdname: pr-link-issue
description: 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
1. **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.
2. Extract issue number + repo from the input URL, or accept a bare `#1234` for current repo.
3. Fetch the Linear ticket from the issue's linear-linkback comment:
gh issue view <n> --repo <owner>/<repo> --json comments \
-q '.comments[] | select(.author.login=="linear-code") | .body' \
| grep -Eioe '[a-z]+-[0-9]+' | head -1If no match, fall back to asking the user for the Linear key, or omit it.
4. Read the existing PR body so you can append rather than overwrite:
gh pr view <pr-number> --json body -q '.body'
5. 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.
Format:
#### Issues
* Resolves: #<n>
* Resolves: <linear-key>
6. Update the PR with a heredoc to preserve newlines:
gh pr edit <pr-number> --body "$(cat <<'EOF'
<new body>
EOF
)"
7. Confirm by echoing the resulting PR URL:
gh pr view <pr-number> --json url -q '.url'
Notes
- Linear linkback comments are posted by the GitHub user `linear-code`. The body contains a markdown link whose text is the Linear key, e.g. `PY-2357`.
- Project keys vary per repo (`PY-…` for sentry-python, `JS-…` for sentry-javascript, etc.) — the regex `[a-z]+-[0-9]+` covers them.
- Don't strip existing PR content. Always read first, append/replace second.
- 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.
Read more
name: pr-link-issue description: 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
1. **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.
2. Extract issue number + repo from the input URL, or accept a bare `#1234` for current repo.
3. Fetch the Linear ticket from the issue's linear-linkback comment:
gh issue view <n> --repo <owner>/<repo> --json comments \
-q '.comments[] | select(.author.login=="linear-code") | .body' \
| grep -Eioe '[a-z]+-[0-9]+' | head -1If no match, fall back to asking the user for the Linear key, or omit it.
4. Read the existing PR body so you can append rather than overwrite:
gh pr view <pr-number> --json body -q '.body'
5. 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.
Format:
#### Issues * Resolves: #<n> * Resolves: <linear-key>
6. Update the PR with a heredoc to preserve newlines:
gh pr edit <pr-number> --body "$(cat <<'EOF' <new body> EOF )"
7. Confirm by echoing the resulting PR URL:
gh pr view <pr-number> --json url -q '.url'
Notes
- Linear linkback comments are posted by the GitHub user `linear-code`. The body contains a markdown link whose text is the Linear key, e.g. `PY-2357`.
- Project keys vary per repo (`PY-…` for sentry-python, `JS-…` for sentry-javascript, etc.) — the regex `[a-z]+-[0-9]+` covers them.
- Don't strip existing PR content. Always read first, append/replace second.
- 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.
For skills to help set up Sentry in your project or debug production issues, see Agent skills for Sentry employees, following the Agent Skills open format.
Repo: getsentry/sentry-skills
Other skills on sentry-skills.
- /agents-md
Creates and maintains concise AGENTS.md and CLAUDE.md project instruction files. Use when asked to create AGENTS.md, update AGENTS.md, maintain agent docs, set up CLAUDE.md, document repository agent conventions, or keep coding-agent instructions minimal and reference-backed.
Open skill - /blog-writing-guide
Write, review, and improve blog posts for the Sentry engineering blog following Sentry's specific writing standards, voice, and quality bar. Use this skill whenever someone asks to write a blog post, draft a technical article, review blog content, improve a draft, write a
Open skill - /brand-guidelines
Write copy following Sentry brand guidelines. Use when writing UI text, error messages, empty states, onboarding flows, 404 pages, documentation, marketing copy, or any user-facing content. Covers both Plain Speech (default) and Sentry Voice tones.
Open skill - /claude-settings-audit
Analyze a repository to generate recommended Claude Code settings.json permissions. Use when setting up a new project, auditing existing settings, or determining which read-only bash commands to allow. Detects tech stack, build tools, and monorepo structure.
Open skill - /code-review
Perform code reviews following Sentry engineering practices. Use when reviewing pull requests, examining code changes, or providing feedback on code quality. Covers security, performance, testing, and design review.
Open skill - /code-simplifier
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Use when asked to "simplify code", "clean up code", "refactor for clarity", "improve readability", or review recently modified code for elegance. Focuses on
Open skill

