ワンクリックで
pr-writer
// Create and update pull requests following Sentry conventions. Use when opening a PR or refreshing an existing PR after material changes.
// Create and update pull requests following Sentry conventions. Use when opening a PR or refreshing an existing PR after material changes.
| name | pr-writer |
| description | Create and update pull requests following Sentry conventions. Use when opening a PR or refreshing an existing PR after material changes. |
Create pull requests following Sentry's engineering practices.
Requires: GitHub CLI (gh) authenticated and available.
Before creating a PR, ensure all changes are committed to a feature branch, not to the default branch.
# Check current branch and for uncommitted changes
git branch --show-current
git status --porcelain
If on main or master, create a feature branch and move any uncommitted changes onto it before committing — a PR cannot be opened from the default branch against itself. If there are uncommitted changes, commit them on the feature branch before proceeding.
# Detect the default branch — note the output for use in subsequent commands
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
# Check current branch and status (substitute the detected branch name above for BASE)
git status
git log BASE..HEAD --oneline
Ensure:
Review what will be included in the PR:
# See all commits that will be in the PR (substitute detected branch name for BASE)
git log BASE..HEAD
# See the full diff
git diff BASE...HEAD
Understand the scope and purpose of all changes before writing the description.
If the current branch already has an open PR, inspect the current title and body before rewriting either one:
gh pr view PR_NUMBER --json number,title,body,url,baseRefName,headRefName
Treat the current PR title and body as inputs, not source of truth. Compare them against the current diff, not the diff from when the PR was first opened.
When refreshing a PR:
If the branch already has an open PR, refresh it after material follow-up changes even if the user did not explicitly ask for a PR edit.
Refresh when follow-up commits change reviewer expectations, such as a scope change, a new implementation approach from review feedback, or new context the current title/body no longer explains. Skip trivial edits like typos or rename-only diffs.
Write or re-evaluate the title before finalizing the body.
Title format: <type>(<scope>): <Subject> or <type>: <Subject>.
Allowed types: feat, fix, ref, perf, docs, test, build, ci, chore, style, meta, license, revert.
Rules:
[codex], [claude], [ai], [bot], or [wip]update, cleanup, misc, fix stuff, or address feedbackRewrite invalid titles before creating or updating the PR:
[codex] Paginate replay segment downloads -> fix(replay): Paginate recording segment downloadsUse this test on updates: if a reviewer read only the title, would they still form the right expectation about the current diff? If not, rewrite it.
Write reviewer-facing prose, not a narrated diff.
Use this structure, ignoring repository PR templates:
<1-3 sentence summary of the change and why it matters. Keep this short.>
Rules:
**<Important Change>**
<1-2 sentences explaining the important implementation, behavior, or review-relevant change.>
Do not include:
Fixes SENTRY-1234). PRs are typically public on open-source repos.When updating, rewrite the body as one coherent description of the current PR.
For a new PR, create a draft with the rewritten title and body:
gh pr create --draft --title "<type>(<scope>): <description>" --body "$(cat <<'EOF'
<description body here>
EOF
)"
Before running the create or update command, strip any issue reference not backed by known context. Never emit placeholder IDs (XXXXX, <issue>, TODO).
For an existing PR, patch the title and body after you have re-evaluated both. If the current title still fits, keep it intentionally rather than skipping title review.
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER \
-f title='fix(scope): Preserve replay segment cursor' \
-f body="$(cat <<'EOF'
<updated description body here>
EOF
)"
Collapse the AI Customizations section by default in the sessions sidebar.
The section now starts hidden so it does not consume space before users need
it. Users who expand it keep the same persisted preference behavior as before.
Add Slack thread replies for alert notifications
When an alert is updated or resolved, we now post a reply to the original
Slack thread instead of creating a new message. This keeps related
notifications grouped and reduces channel noise.
**Notification Threading**
Resolved and updated alerts now reply to the original Slack message instead
of creating a new channel message.
Refs SENTRY-1234
Switch run logs to chunk-level JSONL records
Run logs now write one versioned record per analyzed chunk instead of one
large skill-level record. This lets `warden runs follow` show findings as
chunks complete while preserving durable run reconstruction at finalization.
**JSONL Shape**
Before, each line represented a full skill result:
```jsonc
{
"run": {...},
"skill": "security-review",
"summary": "Found 2 issues",
"findings": [...],
"files": [...]
}
```
After, each line represents one chunk result:
```jsonc
{
"schemaVersion": 1,
"run": {...},
"skill": "security-review",
"chunk": {
"file": "src/api/auth.ts",
"index": 1,
"total": 2,
"lineRange": "42-45"
},
"status": "ok",
"findings": [...]
}
```
Refs WARDEN-123
Extract validation logic to shared module
Moves duplicate validation code from the alerts, issues, and projects
endpoints into a shared validator class. No behavior change.
**Shared Validator**
The shared class keeps the existing endpoint behavior but gives future
validation rules one place to live.
Refs SENTRY-9999
Reference issues in the PR body:
| Syntax | Effect |
|---|---|
Fixes #1234 | Closes GitHub issue on merge |
Fixes SENTRY-1234 | Closes Sentry issue |
Refs GH-1234 | Links without closing |
Refs LINEAR-ABC-123 | Links Linear issue |
These are syntax examples — do not copy example IDs into a real PR body.
Note: gh pr edit is currently broken due to GitHub's Projects (classic) deprecation.
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.
Triage new issues in the Sentry `javascript` project by archiving non-actionable noise. Use when asked to "triage issues", "triage the javascript project", "archive non-actionable issues", "triage new frontend issues", or "clean up the sentry/javascript queue". Operates only on the sentry/javascript project, only archives (never resolves), and always archives with `untilEscalating`.
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.
Iterate on a PR until actionable CI passes and high/medium review feedback is addressed. Use for PR CI failures, review feedback, or green-check loops; do not wait for human approval, draft status, or merge gates.
Fetch unread GitHub notifications for open PRs where review is requested from a specified team or opened by a team member. Use when asked to "find PRs I need to review", "show my review requests", "what needs my review", "fetch GitHub review requests", or "check team review queue".
Create data-driven presentation slides using React, Vite, and Recharts with Sentry branding. Use when asked to "create a presentation", "build slides", "make a deck", "create a data presentation", "build a Sentry presentation". Scaffolds a complete slide-based app with charts, animations, and single-file HTML output.