ワンクリックで
port-pr
Port PRs from a GitHub repository. Use when you need to bring changes from a source repo. Invoke with /port-pr <github-pr-url>
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Port PRs from a GitHub repository. Use when you need to bring changes from a source repo. Invoke with /port-pr <github-pr-url>
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | port-pr |
| description | Port PRs from a GitHub repository. Use when you need to bring changes from a source repo. Invoke with /port-pr <github-pr-url> |
| argument-hint | <github-pr-url> |
| disable-model-invocation | true |
This skill enables porting PRs from a GitHub repository into this repository.
This skill receives arguments via $ARGUMENTS:
$ARGUMENTS: GitHub PR URL (e.g., https://github.com/owner/repo/pull/123)gh pr view <url> --json mergeCommit,title,body,headRepository
# Exclude lockfiles from diff - they should be regenerated via pnpm install
git diff <mergeCommit>^..<mergeCommit> -- . ':!pnpm-lock.yaml' ':!package-lock.json' ':!yarn.lock'
Run these commands in the source repository using workdir parameter.
Important: Never read or port lockfile changes (pnpm-lock.yaml, package-lock.json, yarn.lock). Always regenerate the lockfile by running pnpm install after updating package.json dependencies.
Before implementing, ask the user for clarification when:
Apply similar changes following this repository's conventions:
.js) for local importsnode: prefix for Node.js built-insAfter implementation, run:
pnpm code:checks 2>&1 | tail -20
This runs formatting, linting, and TypeScript checks. Only the tail of the output is shown to see the result.
After code checks pass, run only the unit tests from the tests-unit package:
pnpm --filter tests-unit test 2>&1 | tail -20
Important: Do NOT run pnpm test (which runs all tests), pnpm e2e:test, or any full test suite. Only unit tests from the tests-unit package should be run during the porting process.
Before creating the changeset, determine which package the changes apply to:
Ask the user: "Which package should this changeset be for - @opennextjs/aws or @opennextjs/cloudflare?"
Store the answer in $PACKAGE_NAME (e.g., "@opennextjs/cloudflare").
Create a patch changeset with the link to the PR:
# Extract PR number from the URL (e.g., "123" from "https://github.com/owner/repo/pull/123")
PR_NUMBER=$(echo "$ARGUMENTS" | grep -oE '[0-9]+$')
# Create the changeset file with the PR link (use the package name from step 7)
echo "---
\"$PACKAGE_NAME\": patch
---
Ported PR #$PR_NUMBER from source repository
$ARGUMENTS" > .changeset/port-pr-$PR_NUMBER.md
Stage all files that were modified or created during the port:
git status --short
git add .changeset/port-pr-$PR_NUMBER.md <other-modified-files>
Ask the user if they want to commit the changes directly:
Ask the user: "Should I stage all files and commit the ported PR changes now?"
Options:
If the user chooses to commit:
# Stage all modified and new files
git add <all-modified-files>
# Commit with the prepared message
git commit -m "chore: port PR #$PR_NUMBER from source repository
$ARGUMENTS
Changeset: .changeset/port-pr-$PR_NUMBER.md"
Provide a summary of: