بنقرة واحدة
pr-rebase
Rebase the current branch on the latest upstream changes, resolve conflicts, and push.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Rebase the current branch on the latest upstream changes, resolve conflicts, and push.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Review recent code changes and broad codebase areas for critical and high severity security vulnerabilities. Use when Codex needs to clear `./out-security-review`, select 25 non-doc, non-test files split across past-day commits, past-week commits, and broad codebase coverage, group them into 6-8 review buckets, spawn one security-review sub-agent per review bucket, persist each candidate finding to `./out-security-review/<starting_filename>_<timestamp>.md` using a filename-safe UTC ISO 8601 basic timestamp like `20260331T214512Z`, re-verify every candidate with fresh sub-agents, and emit final confirmed findings for responsible disclosure.
Record a short Playwright-based product demo video for significant UI or user-visible functionality changes. Use when Codex needs to show a workflow in motion for a PR, either by recording an existing targeted E2E spec or by creating a disposable one-off Playwright spec that captures the changed behavior in under a minute, then uploading the final video to Vercel Blob and preparing a PR comment body that says "Demo at commit {hash}" with a 1-2 sentence summary and durable hosted link.
Review the last 7 days of recent commits for large architecture improvements that dramatically improve maintainability. Use when the agent needs to clear `./out-code-architect`, select 25 non-doc, non-test files from recent commits across different parts of the repo, spawn one architecture-review sub-agent per starting file, persist each candidate finding to `./out-code-architect/<starting_filename>_<timestamp>.md` using a filename-safe UTC ISO 8601 basic timestamp like `20260331T214512Z`, re-verify every candidate with fresh sub-agents, and emit final confirmed findings for issue filing.
Review the last 7 days of recent commits for critical and high severity bugs that break user experience. Use when the agent needs to clear `./out-bug-finder`, select 25 non-doc, non-test files from recent commits across different parts of the repo, spawn one bug-review sub-agent per starting file, persist each candidate finding to `./out-bug-finder/<starting_filename>_<timestamp>.md` using a filename-safe UTC ISO 8601 basic timestamp like `20260331T214512Z`, re-verify every candidate with fresh sub-agents, and emit final confirmed findings for issue filing.
Review recent GitHub Actions workflow runs, separate expected noise from actionable failures, and write a machine-readable workflow health report for deterministic post-agent issue handling.
Print the full host-side `scripts/pr.sh` command needed to create or switch to a feature branch, commit current changes, push, and open or update a PR outside the Docker sandbox using explicit flag-style inputs.
| name | pr-rebase |
| description | Rebase the current branch on the latest upstream changes, resolve conflicts, and push. |
Rebase the current branch on the latest upstream changes, resolve conflicts, and push.
Determine the PR base branch and git remote setup:
If an argument was provided, treat it as the PR number or URL. Otherwise use the current branch's PR.
if [ -n "${ARGUMENTS:-}" ]; then
gh pr view "${ARGUMENTS}" --json number,baseRefName,url --jq '.'
else
gh pr view --json number,baseRefName,url --jq '.'
fi
git remote -v
git branch -vv
Capture the PR base branch from baseRefName, store it in BASE_BRANCH, and use it for every fetch/rebase step below.
In GitHub Actions for cross-repo PRs:
origin points to the head repo (fork) - this is where you pushupstream points to the base repo - this is what you rebase ontoFor same-repo PRs, origin points to the main repo and there may be no upstream.
Fetch the latest changes:
git fetch --all
Rebase onto the PR base branch:
Use an explicit if/else. Do not use A && B || C for this step because a merge-conflict exit code must not start a second rebase command.
if git remote get-url upstream >/dev/null 2>&1; then
git rebase "upstream/${BASE_BRANCH}"
else
git rebase "origin/${BASE_BRANCH}"
fi
If there are merge conflicts:
Identify the conflicting files from the rebase output
Read each conflicting file and understand both versions of the changes
Resolve the conflicts by editing the files to combine changes appropriately
Stage the resolved files:
git add <resolved-file>
Continue the rebase:
git rebase --continue
Repeat until all conflicts are resolved and the rebase completes
Run checks and push the rebased branch:
Run the full check suite to make sure nothing is broken, then push the rebased branch with --force-with-lease because rebasing rewrites history:
npm run check
git push --force-with-lease origin HEAD
If npm run check fails, diagnose and fix the issues before pushing. Do not push a broken branch.
Summarize the results: