Agent Skillsdyad-sh/dyad › dyad:pr-rebase

dyad:pr-rebase

GitHub

将当前分支基于最新上游代码进行变基,自动处理冲突并推送。适用于PR合并前的代码同步与冲突解决场景。

.claude/skills/pr-rebase/SKILL.md dyad-sh/dyad

Trigger Scenarios

需要更新分支以匹配主分支的最新提交 执行 git rebase 操作

Install

npx skills add dyad-sh/dyad --skill dyad:pr-rebase -g -y
More Options

Non-standard path

npx skills add https://github.com/dyad-sh/dyad/tree/main/.claude/skills/pr-rebase -g -y

Use without installing

npx skills use dyad-sh/dyad@dyad:pr-rebase

指定 Agent (Claude Code)

npx skills add dyad-sh/dyad --skill dyad:pr-rebase -a claude-code -g -y

安装 repo 全部 skill

npx skills add dyad-sh/dyad --all -g -y

预览 repo 内 skill

npx skills add dyad-sh/dyad --list

SKILL.md

Frontmatter
{
    "name": "dyad:pr-rebase",
    "description": "Rebase the current branch on the latest upstream changes, resolve conflicts, and push."
}

PR Rebase

Rebase the current branch on the latest upstream changes, resolve conflicts, and push.

Instructions

  1. Determine the git remote setup:

    git remote -v
    git branch -vv
    

    In GitHub Actions for cross-repo PRs:

    • origin points to the head repo (fork) - this is where you push
    • upstream points to the base repo - this is what you rebase onto

    For same-repo PRs, origin points to the main repo and there may be no upstream.

  2. Fetch the latest changes:

    git fetch --all
    
  3. Rebase onto the base branch:

    Use upstream/main if the upstream remote exists (cross-repo PR), otherwise use origin/main:

    # Check if upstream remote exists
    git remote get-url upstream 2>/dev/null && git rebase upstream/main || git rebase origin/main
    
  4. 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

  5. Run lint and push:

    Run the /dyad:pr-push skill to run lint checks, fix any issues, and push the rebased branch.

  6. Summarize the results:

    • Report that the rebase was successful
    • List any conflicts that were resolved
    • Note any lint fixes that were applied
    • Confirm the branch has been pushed

Version History

  • 7158f6f Current 2026-08-20 16:43

Same Skill Collection

.claude/skills/add-models/SKILL.md
.claude/skills/check-workflows/SKILL.md
.claude/skills/debug-minified-error/SKILL.md
.claude/skills/debug-with-playwright/SKILL.md
.claude/skills/deflake-e2e-from-run/SKILL.md
.claude/skills/deflake-e2e-recent-commits/SKILL.md
.claude/skills/deflake-e2e/SKILL.md
.claude/skills/e2e-rebase/SKILL.md
.claude/skills/feedback-to-issues/SKILL.md
.claude/skills/fix-issue/SKILL.md
.claude/skills/plan-to-issue/SKILL.md
.claude/skills/pr-fix-ci/SKILL.md
.claude/skills/pr-fix-comments/SKILL.md
.claude/skills/pr-fix/SKILL.md
.claude/skills/pr-push/SKILL.md
.claude/skills/pr-screencast/SKILL.md
.claude/skills/promote-beta-to-stable/SKILL.md
.claude/skills/remember-learnings/SKILL.md
.claude/skills/swarm-pr-review/SKILL.md
.claude/skills/swarm-to-plan/SKILL.md
.claude/skills/multi-pr-review/SKILL.md

Metadata

Files
0
Version
157ab55
Hash
2c1e5254
Indexed
2026-08-20 16:43

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 05:16
浙ICP备14020137号-1 $お客様$