Skip to content

Add /merge-green-prs skill - #17

Merged
robdevops merged 1 commit into
mainfrom
claude/merge-green-prs-skill
Oct 7, 2026
Merged

robdevops merged 1 commit into
mainfrom
claude/merge-green-prs-skill

Conversation

@robdevops

Copy link
Copy Markdown
Owner

Summary

Adds a project skill, /merge-green-prs, that checks the repo's open pull requests and merges the ones from claude/* branches whose tests have passed.

What it does

  • Lists open PRs and reads each one fresh from GitHub through the GitHub MCP tools (no gh).
  • Merges a PR only if it is open, not a draft, from a claude/* branch in this same repo, based on the default branch, mergeable_state is clean, every check run is completed and successful, and there is no requested change or unresolved review thread.
  • Merges with a merge commit pinned to the head SHA it just read, reads the PR back to confirm, and prints a table of outcomes (merged / waiting / red / blocked / skipped).
  • Never merges other branches or forks, never re-runs or skips tests, never force-pushes, approves, closes or deletes anything.

Files

  • .claude/skills/merge-green-prs/SKILL.md (new)
  • CLAUDE.md: one line in the Commands section pointing at the skill

Test plan

  • make check on Python 3.13.5 (ruff + pytest): 211 passed
  • Dry run of the read-only steps against the real repo: no open PRs, and every GitHub tool the skill names returned data
  • CI check job on this PR
  • The merge step has not been exercised; the next green claude/* PR will be its first real use

🤖 Generated with Claude Code

https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw


Generated by Claude Code

Checks each open PR fresh from GitHub, merges only claude/* same-repo PRs that
are clean with all checks passed and no changes requested, pinned to the head SHA.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
@robdevops
robdevops merged commit 6358b95 into main Oct 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants