designxdevelop/agent-skills/quick-fix-deploy-sync
- community
Checking that the SKILL.md file is still in the repository.
Sync production and staging Git branches with fast-forward merges and push. Use for hotfix promotion, backports to staging, or keeping release branches aligned after a commit.
Install
npx vskill@latest install designxdevelop/agent-skills/quick-fix-deploy-syncSKILL.md
Quick Fix Deploy Sync
Goal
Find the production and staging branches in the current project, then sync them with fast-forward-only merges so both tips match — no merge commits, no force push, and the cleanest possible branch history.
When to Use
Use this skill when the user asks to:
- Quick fix deploy, hotfix, or ship a fix to production or staging.
- Promote staging to production or backport a production fix to staging.
- Sync
mainanddev/staging/develop/preview. - Fast-forward branches and keep staging and production aligned.
- Commit a fix on one branch and mirror it to the other.
Example prompts:
- "Quick fix deploy — backport this to staging."
- "Ship what's on staging to main."
- "Keep main and dev in sync after this hotfix."
- "Commit, push main, and sync staging."
Workflow
1. Resolve branch names
Discover production and staging branch names before any git writes. Check, in order:
- Project docs:
AGENTS.md,README.md,docs/setup.md,.github/workflows/* - Remote default branch:
git remote show origin | grep 'HEAD branch' - Common defaults:
- Production:
mainormaster - Staging:
dev,staging,develop, orpreview
If still ambiguous, ask once:
Which branch is production and which is staging?
Record the mapping for the rest of the session. Example:
| Role | Branch | |
|---|---|---|
| Production | main | |
| Staging | dev |
2. Preflight (always)
Run in parallel:
Then compare remote tips:
Stop and report if:
- Working tree is dirty — commit or stash first; never commit secrets
- Branches diverged (each has unique commits) — fast-forward is impossible
- Either branch is missing locally or on
origin
Do not use plain git merge, git rebase, or git push --force unless the user explicitly approves after you explain the divergence.
3. Choose sync direction
| Situation | Action | |
|---|---|---|
| Fix committed on production; staging should match | Fast-forward staging → production | |
| Fix tested on staging; ready to ship | Fast-forward production → staging | |
| User says "backport to staging" | Staging ← production | |
| User says "promote to prod" / "ship staging" | Production ← staging | |
| User says "keep them in sync" / "both branches" | Sync the lagging branch to the leading one |
Leading branch = the branch with commits the other lacks (ahead after git fetch).
If both sides are equal, report already synced — no push needed.
4. Fast-forward sync
Substitute resolved branch names below. Example uses production = main, staging = dev.
A — Production ahead (backport hotfix to staging)
B — Staging ahead (promote to production)
Return to the branch the user was on unless they asked to stay elsewhere.
5. Commit + sync (when the user includes a fix)
When the user wants commit, push, and sync both branches:
- Stage only files for the fix — exclude unrelated changes
- Commit with a concise message focused on why, not what
- Push the branch where the commit was made
- Run workflow A or B from step 4 based on which branch received the commit
- Verify both remote tips match:
6. Verify and report
After sync:
Report using this template:
If CI or deploy hooks exist, mention which branch deploys where. Do not trigger a deploy unless the user asks.
7. Diverged branches (escape hatch)
If git merge --ff-only fails, stop and present:
- Commit lists on each side:
git log --oneline --left-right <production>...<staging> - Options: open a merge PR, rebase staging onto production (needs approval), or
reset staging to production (destructive — needs approval)
Do not pick an option without user confirmation.
Guardrails
- Never
git push --forceto production or staging unless the user explicitly requests it - Never amend or rebase pushed commits without explicit approval
- Never update
git config - Never use plain
git pull— prefergit pull --ff-only - Never use
git mergewithout--ff-onlyin this workflow - Never commit secrets, credentials, or
.envfiles - If fast-forward is impossible, report the divergence — do not silently rebase or force-push
Completion Checklist
- [ ] Production and staging branch names were resolved from the repo or confirmed with the user
- [ ] Preflight ran: clean working tree, fetch completed, ahead/behind state is known
- [ ] Sync direction matches user intent (promote vs backport vs already equal)
- [ ] Only
--ff-onlymerges were used; no merge commits were created - [ ] Both remote branch tips match after sync (or divergence was reported with options)
- [ ] Final report includes both SHAs, direction, push status, and current branch
- [ ] No force push, rebase, or git config changes were made without explicit approval
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/quick-fix-deploy-sync/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/designxdevelop/agent-skills/quick-fix-deploy-sync)