git-workflows/skills/sync-main/SKILL.md
Update main from remote and merge into current or all PR branches
npx skillsauth add jacobpevans/claude-code-plugins sync-mainInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Update the local main branch from remote and merge it into the current working branch,
or all open PR branches when using the all parameter.
| Usage | Scope |
| ----- | ----- |
| /sync-main | Current branch only |
| /sync-main all | All open PR branches |
CURRENT REPOSITORY ONLY - This command never crosses into other repositories.
git branch --show-current, git status --porcelain
git fetch --all --prune --force && git pull (in main/)git fetch origin --force maingit log --oneline HEAD..origin/main (informational only)git merge origin/main --no-edit
git push origin $(git branch --show-current)Report sync status for all open PR branches.
gh repo view --json nameWithOwnergh pr list --state open --json number,headRefName,titlesuperpowers:dispatching-parallel-agents). Each checks if behind main. Do NOT merge or push.behind (not conflict) in step 5,
merge origin/main using git merge origin/main --no-edit. Branches already classified as conflict
in step 5 are skipped entirely — no merge is attempted on them, so no git merge --abort is needed.
No confirmation required.Read files, understand both versions, combine intelligently, stage resolved files, commit.
--theirs or --oursdocumentation
Use when editing GitHub Actions workflow files (.github/workflows/*.yml) in JacobPEvans repos. Documents when to target self-hosted RunsOn runners vs GitHub-hosted runners, the v3 label catalog used across the org, the required github.run_id segment, and the GitHub App allowlist prereq.
testing
Check PR merge readiness, sync local repo, cleanup stale worktrees; optional cross-repo sweep and stale-branch prune modes
tools
Local rebase-merge workflow for pull requests with signed commits
tools
Canonical reference for all gh CLI command shapes used by skills in this plugin. Defines the placeholder convention, allowed --json fields, GraphQL fallback rules, -f/-F/--raw-field flag semantics, the PR-readiness gate, code-scanning alert query, review-thread fetch/count/resolve mutations, and heredoc bodies. Prevents Unknown JSON field errors and divergent query shapes.