anajuliabit/aeon/auto-merge
Claude Code and agent skill by anajuliabit/aeon
- community
Checking that the SKILL.md file is still in the repository.
Automatically merge open PRs that have passing CI, no blocking reviews, and no conflicts
Install
npx vskill@latest install anajuliabit/aeon/auto-mergeSKILL.md
The same SKILL.md was published earlier as anajuliabit/aeon/auto-merge.
${var} — Repo (owner/repo) to target. If empty, uses every repo in memory/watched-repos.md.Env:AUTO_MERGE_DRY_RUN=1logs intent without merging.MAX_AUTO_MERGE=Ncaps merges per run (default 3).
Merge open PRs that are fully green and pass an explicit safety policy. The policy exists because this skill runs autonomously with write access — a bug in the gate is a bug that ships to main.
Read memory/MEMORY.md and memory/watched-repos.md for repos to target. Read the last 2 days of memory/logs/ to avoid re-logging PRs already merged.
Safety policy
A PR merges only when every one of the following holds:
- Author allowlist:
author.loginis one ofdependabot[bot],renovate[bot],github-actions[bot], OR appears under a## Trusted Authorssection in memory/watched-repos.md. No allowlist → only the three bot logins are eligible. - Size cap:
additions + deletions ≤ 500. Override by applying the labelauto-merge-largeon the PR. - Base branch:
baseRefNameismainormaster. Refuse any other target. - Not a fork:
isCrossRepository == false(fork CI can be tampered with). - Not draft:
isDraft == false. - Not already queued:
autoMergeRequest == null(avoid fighting GitHub's native auto-merge if a human enabled it). - No opt-out label: none of {
do-not-merge,wip,hold,needs-review,blocked} present. - Mergeable state:
mergeStateStatus == "CLEAN"(this is stricter thanmergeable == "MERGEABLE"— CLEAN additionally requires branch-protection gates to be satisfied). - Reviews:
reviewDecision != "CHANGES_REQUESTED". - Checks: every entry in
statusCheckRolluphasconclusionin{SUCCESS, NEUTRAL, SKIPPED}. AnyFAILURE,TIMED_OUT,CANCELLED,PENDING, ornullconclusion disqualifies the PR.
Steps
- List open PRs for each watched repo with the full field set:
``bash gh pr list -R owner/repo --state open --json number,title,author,isDraft,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,autoMergeRequest,isCrossRepository,labels,additions,deletions,baseRefName ``
- Handle UNKNOWN state — GitHub computes
mergeStateStatuslazily. If a PR returnsUNKNOWN, sleep 3 seconds and re-query once:
``bash sleep 3 && gh pr view NUMBER -R owner/repo --json mergeStateStatus,mergeable,statusCheckRollup ` If still UNKNOWN after the retry, skip the PR with reason UNKNOWN-persistent` and let the next run retry.
- Apply the safety policy to each PR. Record a verdict for every PR: either
MERGEorSKIP:<specific-reason>. Reasons must name the failing gate — e.g.SKIP:author-not-allowlisted:contributor123,SKIP:size-cap:823-lines,SKIP:mergeStateStatus=BEHIND,SKIP:label:do-not-merge,SKIP:check-failed:lint. Vague reasons likeSKIP:not-readyare not acceptable.
- Merge qualifying PRs, up to MAX_AUTO_MERGE (default 3):
- If
AUTO_MERGE_DRY_RUN=1, logDRY_RUN:would-merge #Nand continue — do NOT invoke merge. - Otherwise:
``bash gh pr merge NUMBER -R owner/repo --squash --delete-branch ` If the merge fails (non-zero exit), capture stderr and log MERGE_FAIL #N: <stderr>`. A failed merge does NOT count toward the cap — continue to the next qualifying PR.
- Send a notification only when at least one real (non-dry-run) merge succeeded:
``` Auto Merge — ${today} Merged N PR(s) on owner/repo:
- #123: PR title (+45/-12, by @author) — squash merged abc1234
Queue cleared. Self-improve cycle unblocked. ``` No merges → no notification, just a log entry.
- Log to memory/logs/${today}.md under an
### auto-mergeheading:
Mode: live | dry-runRepo(s): listMerged:#N title @author +A-D SHAper lineSkipped:#N SKIP:<reason>per lineTotals:merged=X qualified=Y considered=Z- If zero qualified, include a verdict breakdown:
AUTO_MERGE_SKIP: 0/Z qualifying (behind=B blocked=L failing=F draft=D author-blocked=A size-blocked=S)
Sandbox note
gh authenticates via the workflow's GITHUB_TOKEN — no curl needed. If gh pr merge fails with Resource not accessible by integration, the workflow token lacks merge permission on that repo; log once and notify at most once per 7 days (check memory/logs/ for prior notification) to avoid alert spam.
Constraints
- Never merge a PR whose author is not allowlisted, even if every other gate is green.
- Never bypass the size cap without the explicit
auto-merge-largelabel (set by a human, not a bot). - Never auto-retry a
MERGE_FAILwithin the same run — if the first merge attempt fails, log and move on. - Do not modify PR state other than merging (no comments, no label edits, no branch updates).
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/auto-merge/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/anajuliabit/aeon/auto-merge)