@pollinations/sync-production
ASync the main branch into production via the GitHub merges API. Pre-checks for merge conflicts and bails out with a clear reason if the merge isn't clean. Use when asked to merge main into production, deploy main to production, or sync production.
Install
agr install @pollinations/sync-production --target claudeWrites 1 file into .claude/skills/, pinned to git-6ced7a2f.
- .claude/skills/sync-production/SKILL.md
Document
name: sync-production description: Sync the main branch into production via the GitHub merges API. Pre-checks for merge conflicts and bails out with a clear reason if the merge isn't clean. Use when asked to merge main into production, deploy main to production, or sync production.
Sync Production
Server-side merge of main → production using the GitHub merges API. No local checkout, no working tree changes.
Quick Usage
.claude/skills/sync-production/scripts/sync-production.sh
What It Does
- Fetches
origin/mainandorigin/production - Lists the commits that would be merged
- Pre-checks for conflicts with
git merge-tree(no working tree touched) - If conflicts → stops with the conflicting paths and exits non-zero. Resolve manually, then re-run.
- If clean → calls
POST /repos/pollinations/pollinations/mergesto create the merge commit onproductionserver-side
Exit Codes
0— merge succeeded, or nothing to merge2— merge would conflict (paths printed)3— GitHub merges API rejected the request (branch protection, missing branches, etc.)
On Conflict
The skill stops and reports the conflicting files. Don't try to force it — surface the reason in chat and resolve manually:
git checkout production && git pull
git merge main # resolve conflicts in editor
git push origin production
Overrides
SYNC_REPO=owner/repo SYNC_BASE=staging SYNC_HEAD=main \
.claude/skills/sync-production/scripts/sync-production.sh
Notes
- Run from repo root
- Requires
gh(authenticated, push access toproduction) andjq - Branch protection on
productionthat requires PRs will cause exit code3— open a PR manually withgh pr create --base production --head mainin that case
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-6ced7a2f2e8f2026-07-31