con un clic
merge-to-main
Babysit a PR through CI — create, monitor, fix failures, merge when green
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Babysit a PR through CI — create, monitor, fix failures, merge when green
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Cut a clean release — bump versions across all files, update changelog, create GitHub release
Interactive project setup from the ai-project-template — replaces the static SETUP_GUIDE.md with a guided, multi-step workflow
Navigate template conventions, audit compliance, and guide upgrades for ai-project-template repos
| name | merge-to-main |
| description | Babysit a PR through CI — create, monitor, fix failures, merge when green |
| category | workflow |
| tags | ["pr","ci","merge","automation"] |
| version | 1.0.0 |
Automated PR lifecycle: prepare → create PR → monitor CI → fix failures → merge when green → update checkbox fields in the PR body.
Invoke this skill after completing work on a feature branch, when you are ready to create or update a pull request and merge it into main.
AGENTS.md and .github/PULL_REQUEST_TEMPLATE.md for conventions.<type>/<short-description> naming (e.g. feature/add-embeddings, fix/token-overflow).CHANGELOG.md has been updated under [Unreleased] (required by changelog-check.yml)..github/PULL_REQUEST_TEMPLATE.md if it exists.gh pr list --head <branch-name> --state open
If one exists, skip creation and proceed to Phase 3.gh pr create:
gh pr create --base main --title "<title>" --body "<body>"
<type>[optional scope]: <description>).--draft to create a draft PR instead.gh pr checks <pr-number>
pass or fail).
bash gh run view <run-id> --log-failed
b. Diagnose the issue.
c. Fix the issue using appropriate tools (read, edit, search, ast_edit).
d. Amend the last commit (if unpushed) or create a new fix commit.
e. Push the fix.
f. Re-enter the monitoring loop.| Symptom | Likely fix |
|---|---|
| Lint failure | Read the linter output, fix the flagged code |
| Type check failure | Fix type mismatches or missing imports |
| Test failure | Fix the failing test or the code it exercises |
| Changelog check failure | Add an entry to CHANGELOG.md under [Unreleased] |
| Missing secrets | Report to user — requires human action |
gh pr view <pr-number> --json body --jq '.body'
- [ ] CI passes → - [x] CI passes- [ ] Test suite passes → - [x] Test suite passesgh pr edit <pr-number> --body "<updated-body>"
gh pr merge <pr-number> --mergegh pr merge <pr-number> --squashmain and pull:
git checkout main && git pull
| Situation | Handling |
|---|---|
| Branch not pushed | Push it first (Phase 1) |
| PR already exists | Detect via gh pr list --head <branch> and reuse it |
| Merge conflict | Report to user — do not attempt auto-resolve |
| CI timeout (>10 min) | Report which checks are still pending |
| Unfixable failure (missing secrets, external outage) | Report and stop |
| Draft PR needed | Use gh pr create --draft instead of the default ready-for-review |
| Multiple commits on branch | Squash if many small fix commits; merge commit if single clean commit |