원클릭으로
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: