一键导入
pr-summary
// Generate a GitHub PR title and summary from all branch changes, including Linear issue and Figma links when available. When targeting staging, generates a release changelog instead.
// Generate a GitHub PR title and summary from all branch changes, including Linear issue and Figma links when available. When targeting staging, generates a release changelog instead.
Draft and post a status update for a Linear initiative you own. Pulls the last status update plus recent issue activity across the initiative's projects, drafts a brief informative update, and posts it after confirmation.
Generate one spec per issue — repo file (canonical) + Linear document (mirror). Agent-executable implementation plans with file paths, validation commands, and acceptance criteria.
Create Linear issues from a PR audit doc — one issue per PR bucket with acceptance criteria and linked audit findings.
Multi-agent PR review — component, integration, and routing analysis merged into a structured audit doc with severity and PR buckets.
| name | pr-summary |
| description | Generate a GitHub PR title and summary from all branch changes, including Linear issue and Figma links when available. When targeting staging, generates a release changelog instead. |
| disable-model-invocation | false |
| user-invocable | true |
| argument-hint | [base-branch (default: dev)] |
You generate a concise GitHub PR title and a structured summary covering ALL changes on the current branch compared to the base branch.
When the target branch is staging, you switch to changelog mode — generating release notes from merged PRs instead of a single PR summary.
$ARGUMENTS — Optional base branch name (default: dev).
Use $ARGUMENTS if provided, otherwise default to dev.
Verify the base branch exists:
git rev-parse --verify <base-branch>
If it doesn't exist, ask the user which branch to diff against.
Switch to Changelog Mode (skip to the Changelog Mode section below) if ANY of these are true:
staging (e.g., staging, release/staging-2026-04-09)staging or matches release/staging-*When changelog mode activates and no explicit base branch was provided, auto-detect the base by diffing against dev. If the current branch is dev, diff against main.
Otherwise, continue with the normal PR summary workflow.
Run these commands to understand the FULL scope of changes on this branch (not just the latest commit):
git log <base-branch>..HEAD --oneline --no-decorate
git diff <base-branch>...HEAD --stat
git diff <base-branch>...HEAD
git status -s
If there are uncommitted changes, note them separately in the output so the user knows they won't be in the PR.
Search for Linear issue references in:
SELF-XXXX, [SELF-XXXX], or Linear URLsspecs/ for markdown files that reference the files changed on this branch. Cross-reference the changed file paths from git diff --name-only against the spec content to find the relevant issues.For each Linear issue found, fetch its details:
mcp__linear-server__get_issue with the issue IDIf no Linear issues are found, skip this section in the output.
Search for Figma resource links in:
figma.com URLsCollect unique Figma URLs with brief context (which screen/component they relate to).
If no Figma links are found, skip this section in the output.
Group changes into categories based on what was modified:
app/packages/mobile-sdk-alpha/packages/webview-app/packages/webview-bridge/packages/kmp-sdk/packages/native-shell-android/ or packages/native-shell-ios/packages/rn-sdk/noir/ or circuits/contracts/common/ or new-common/.test.ts, .spec.ts, etc.)docs/, specs/, CLAUDE.md, or other markdownpackage.json, tsconfig, CI, scripts, patches, etc.Only include categories that have changes. Collapse small categories (1-2 files) together if it aids readability.
Rules:
add, update, fix, remove, refactor, renameOutput the complete PR body using this format:
## Summary
[2-4 bullet points covering the most important changes. Focus on the "what" and "why", not file-by-file details.]
## Changes
### [Category Name]
- [change description]
- [change description]
### [Category Name]
- [change description]
## Linear Issues
- Closes [SELF-XXXX](url) — [title]
## Figma
- [brief context](figma-url)
## Test Plan
- [ ] `yarn lint && yarn types` passes
- [ ] [package-specific validation commands as relevant]
- [ ] [any manual verification steps specific to these changes]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Omit the "Linear Issues" section if none were found. Omit the "Figma" section if no Figma links were found.
If the diff touches native paths (app/, packages/native-shell-*, packages/kmp-sdk/, iOS/Android project files), append this checklist to the Test Plan section:
### Native Consolidation Checklist
- [ ] CONTRACTS.md reviewed - no unintended contract changes
- [ ] Layer 1 bridge contract tests pass (`cd app && yarn jest:run` / `yarn workspace @selfxyz/rn-sdk-test-app test`)
- [ ] Layer 3 builds pass (app iOS, RN test app iOS, RN test app Android)
- [ ] Layer 4 manual smoke test signed off (if consolidation PR)
- [ ] No new native business logic added (logic belongs in TypeScript)
Check if a PR already exists for the current branch:
gh pr view --json number,title,url 2>/dev/null
If a PR exists:
First, fetch the current PR title and body:
gh pr view --json number,title,body,url
If the PR body is empty/whitespace, the title matches the branch name, or the title is a generic default (slug-style text with slashes/hyphens, auto-generated patterns), note that it appears auto-generated.
Show the generated title and body, then ask: "PR #NNN appears to have a template/auto-generated description. Update it?"
If the PR has a meaningful hand-written title and body, show both the current and newly generated versions, then ask: "PR #NNN already has a custom title/description. Replace it?"
If the user confirms, run:
gh pr edit <number> --title "<title>" --body "<body>"
If no PR exists:
Title: [the title]
Then the full body in a fenced code block.
gh pr create --base <base-branch> --title "<title>" --body "<body>"
In both cases, if there were uncommitted changes found in Step 2, warn the user about them before proceeding.
gh pr create or gh pr edit without user confirmation.git push. The user handles pushing themselves. If the branch is not pushed, remind them to push first.This mode activates when the base branch is staging. It generates user-facing release notes from PRs merged into the current branch since it diverged from staging, focused on mobile app changes.
Determine the comparison base. The goal is to find what's new on the staging/release branch:
release/staging-*), diff against dev.dev, diff against main.git log <comparison-base>..HEAD --oneline --no-decorate
Next, find merged PRs that make up this release. Extract PR numbers from merge commits:
git log <comparison-base>..HEAD --merges --oneline
Parse PR numbers from merge commit messages (patterns like (#1234)) and fetch each PR's details:
gh pr view <number> --json number,title,body,labels,mergedAt
Also try listing PRs merged into the current branch directly:
gh pr list --base <current-branch> --state merged --json number,title,body,mergedAt,labels,headRefName --limit 100
Get the full diff to understand what actually changed:
git diff <comparison-base>...HEAD --stat
git diff <comparison-base>...HEAD
For each PR or commit group, determine if it affects the mobile app user experience. Prioritize changes that touch:
app/ — direct app changes (screens, navigation, components, assets)packages/mobile-sdk-alpha/ — SDK changes that affect app behaviorpackages/webview-app/ — WebView screens shown in the apppackages/webview-bridge/ — bridge changes that affect app functionalitypackages/rn-sdk/ — React Native SDK changesDeprioritize (but don't ignore) changes that are purely:
Search commit messages and PR titles/bodies for Linear issue references (SELF-XXXX). For each found, fetch details:
mcp__linear-server__get_issue with the issue IDGroup changes into user-facing categories:
Use the PR titles, Linear issue titles, and the actual diff to write entries. Each entry should be:
Output using this format:
## What's New — [version or date range]
### New
- [feature description]
### Improved
- [improvement description]
### Fixed
- [fix description]
### Removed
- [removal description]
---
<details>
<summary>Internal changes</summary>
- [internal change]
</details>
### Linear Issues
- [SELF-XXXX](url) — [title]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Omit any category that has no entries. The "Internal changes" section is collapsed by default.
If no version tag is available, use the date range of the merged PRs (e.g., "Mar 28 – Apr 9, 2026").
Same as Step 8 in the normal flow — check for an existing PR, show the generated changelog, and ask the user before creating or updating. Use the changelog as the PR body instead of the normal summary format.
For the PR title in changelog mode, use: Release: [version or date range summary] (e.g., Release: account recovery, nav fixes, platform renaming).