merging-to-main

Automate GitHub branch merges into main with PR creation and CI gating.

5|2|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/oduffy-delphi/coordinator-claude --skill merging-to-main
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merging-to-main
Source: https://github.com/oduffy-delphi/coordinator-claude/tree/main/plugins/coordinator/skills/merging-to-main
Command: npx skills add https://github.com/oduffy-delphi/coordinator-claude --skill merging-to-main

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the end-to-end workflow of merging a work or feature branch into main by creating a pull request, gating with CI checks, and cleaning up after a successful merge.

Core Features & Use Cases

  • Pre-flight validation: checks for uncommitted changes and ensures the local branch is ready for PR submission.
  • PR automation: generates a PR against main with a meaningful title and body derived from commit history.
  • CI gating and merge: waits for CI checks to pass and performs a clean merge with a delete-branch cleanup, then reports the result.
  • Safe cleanup: resets local and remote branches to keep main clean and synchronized.

Quick Start

Invoke this skill when a work or feature branch is ready to merge into main and let it manage PR creation, CI gating, and post-merge cleanup.

Frequently Asked Questions about merging-to-main

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate merging a feature branch to main with CI checks?

Automating a merge to main involves creating a pull request, gating on CI checks, and cleaning up branches post-merge. This workflow creates the PR, waits for CI, and deletes the branch after a successful merge.

What is the workflow for automating pull requests and branch cleanup in Git?

The workflow covers pre-flight validation, PR generation from commit history, CI gating, and safe branch cleanup. It resets local and remote branches after merging to maintain main branch hygiene.

Can I use this merge automation for GitHub repositories with CI requirements?

Yes, this merge automation is best suited for Git-based projects hosted on GitHub where PRs, CI checks, and branch hygiene are critical to maintaining stable main branches.

How do I ensure uncommitted changes are handled before creating a pull request?

Pre-flight validation checks for uncommitted changes and ensures the local branch is ready. This prevents accidental PR creation from a dirty working directory before submission.

Does the merge automation generate pull request titles and descriptions automatically?

Yes, PR automation generates a pull request against main with a meaningful title and body. These details are derived directly from the branch's commit history.

What happens to local and remote branches after a successful merge to main?

After a successful merge, safe cleanup deletes the remote branch and resets local branches. This synchronization keeps the main branch clean and ready for new work.